Search found 682 matches

by djrikki
Sun Mar 18, 2018 2:36 pm
Forum: Wishlist
Topic: Switch...Case - multiple expressions
Replies: 8
Views: 6875

Re: Switch...Case - multiple expressions

I will have to give it a try for real, but Fallthrough by it's name suggests inheritance is lost.
by djrikki
Sun Mar 18, 2018 2:34 pm
Forum: MUI Royale
Topic: mui.Set Value Pairs
Replies: 1
Views: 2613

mui.Set Value Pairs

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 fi...
by djrikki
Sun Mar 18, 2018 2:16 pm
Forum: Wishlist
Topic: Switch...Case - multiple expressions
Replies: 8
Views: 6875

Re: Switch...Case - multiple expressions

@JPV, the contains of the msg object will contain the properties of the final expression.

Code: Select all

   layout:SaveUserData( MidStr(msg.id,0, FindStr(msg.id,"-")))
by djrikki
Sun Mar 18, 2018 1:49 pm
Forum: MUI Royale
Topic: Application.Sleep
Replies: 1
Views: 2535

Application.Sleep

Question for Thore really I suppose, I guess the answer might be 'it's historical'. I've always wondered why the property Sleep of the Application class is stackable? How can this behaviour be useful? In fact I created my own base function in Hollywood to prevent the stacking nature of this property...
by djrikki
Sun Mar 18, 2018 1:37 pm
Forum: Wishlist
Topic: Switch...Case - multiple expressions
Replies: 8
Views: 6875

Re: Switch...Case - multiple expressions

The new FallThrough() statement enables fall through it doesn't exhibit the same behaviour I am discussing. I am looking for "OR' logic.

msg.id would not contain a matching expression, just the last one it finds.

Code: Select all

      layout:SaveUserData( MidStr(msg.id,0, FindStr(msg.id,"-")))
by djrikki
Sun Mar 18, 2018 12:31 pm
Forum: Wishlist
Topic: Switch...Case - multiple expressions
Replies: 8
Views: 6875

Switch...Case - multiple expressions

I wish this DRY code was possible with the Switch-Case statement: Switch msg.id Case "listtree-draganddrop" Case "listtree-sorthook" Case "pageview-pagemode" Case "group-orientation" layout:SaveUserData( MidStr(msg.id,0, FindStr(msg.id,"-"))) EndSwit...
by djrikki
Sun Mar 18, 2018 12:13 pm
Forum: Hollywood bugs
Topic: EndsWith and StartsWith
Replies: 1
Views: 2814

EndsWith and StartsWith

bool = EndsWith(s$, substr$[, casesen, encoding]) This function can be used to check if s$ ends on the substring specified by substr$. If it does, True is returned, False otherwise. If the optional argument casesen is set to False, the strings do not have to match in case. The optional encoding par...
by djrikki
Sun Mar 18, 2018 11:42 am
Forum: General programming
Topic: String interpolation
Replies: 2
Views: 3279

Re: String interpolation

(OP Edit time elapsed: code corrections) Attempting to make the following code valid: ;base:FuncOnField(msg.id,"contents","LowerStr") Function base:FuncOnField(obj, field, func) mui.Set(obj.id, field, func(obj.triggervalue)) EndFunction I am trying to avoid the verbose old skool ...
by djrikki
Sun Mar 18, 2018 11:05 am
Forum: General programming
Topic: String interpolation
Replies: 2
Views: 3279

String interpolation

Hi Andreas, I am trying to dramatically reduce lines of code in my program and I would like to know if it is possible to perform string interpolation in Hollywood? Take the following code which I am attempting to make valid: Function base:FuncOnField(id, field, func) mui.Set(id, mui.Get(id, field), ...
by djrikki
Sat Mar 17, 2018 12:10 am
Forum: MUI Royale
Topic: Area.ContextMenu (none)
Replies: 3
Views: 3605

Re: Area.ContextMenu (none)

Specifies a context sensitive popup menu for the current object. For MUI, popup menus are nothing else but standard intuition menus, so you must specify the id of a MUI menustrip object here. Whenever the user hits the RMB and the mouse is above the parent object, MUI will present the popup menu in...