mui.Set Value Pairs

Discuss GUI programming with the MUI Royale plugin here

mui.Set Value Pairs

Postby djrikki » Sun Mar 18, 2018 3:34 pm

I wish I discovered the strength that using value pairs brought to the mui.Set function much sooner as this is a nifty little feature.

Whilst using this I raised an eyebrow over the use of Whitespace and the splitting of code in general over multiple lines, given this code works compiles and runs fine for me.

Code: Select all
                     "disabled", False,
                     "active", "top"

I am now wondering whether I could format my code much more akin to PHP e.g.

Code: Select all
Function base:Ellipsis(s$, len)
   Return (
      IIf( StrLen(s$) > len,
         LeftStr(s$, len) .. "...",

Declaration of multiple expressions when using an If statement works over multiple lines too it seems.

What a revelation!

Andreas, unless I missed it way back when learning HW, is there a section in the main documentation about how we can freely use whitespace and carriage returns in this manner? Would be a useful addition.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: mui.Set Value Pairs

Postby airsoftsoftwair » Tue Mar 20, 2018 8:40 pm

You can use all whitespace in the world. There are no restrictions here at all. Keep in mind though that IIf() is often not very useful because it'll always evaluate both expressions which can lead to trouble (see the doc for an example).
User avatar
Posts: 2445
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Return to MUI Royale

Who is online

Users browsing this forum: No registered users and 1 guest