Page 1 of 1

Lesson 2 Stack with new MobGui

Posted: Fri Mar 21, 2014 12:35 pm
by elanorb
Hi everyone

Attached is a pdf and a version of the app, up to the end of Lesson 2 created with the new version of MobGUI. I have also attached some additional icons in the blue and yellow default colours used by MobGUI.

I hope this helps. If you have any questions please do let us know.

Kind regards

Elanor

Re: Lesson 2 Stack with new MobGui

Posted: Tue Mar 25, 2014 2:49 am
by roddy
Hi Elanor,

My navigation seems to work fine using the new MobGui without the pass statements in the button scripts.

my control group script:

on mouseUp
set the mgText of group "titleButton" to the mgOptionText of me
visual effect push left fast
go to card the mgOptionText of me
end mouseUp

Wondering if it's built in to the new MG behavior?

Re: Lesson 2 Stack with new MobGui

Posted: Tue Mar 25, 2014 11:53 am
by LCNeil
Hi Roddy,

As you have experienced,in the context of your script it will work without the inclusion of the pass "mouseUp". The pass is included as it allows the mouseUp message to be handled further down the LiveCode message path. An example would be if you also had a mouseUp handler on your card script. If you did not include the pass then the card script would not receive the message but if the pass is included then the cards mouseUp handler will also be executed.

More information on the LiveCode message path can be found here-

http://lessons.runrev.com/s/3527/m/4603 ... ssage-path

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
——

Re: Lesson 2 Stack with new MobGui

Posted: Wed Mar 26, 2014 4:35 pm
by kendonnelly
Neil,

That link was very helpful in explaining the message path. One question:

Is there a convention with respect to the placement of handlers? For example, to have message handlers at all steps along the path, even if they are only meant to pass the message along? Or to place a comment describing what the intended destination is? It seems to me that it would be painful to open up someone else's code and have to look in multiple locations to see where a message is actually being handled.

Cheers,

Ken