Lesson 2 Stack with new MobGui

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
elanorb
Livecode Staff Member
Livecode Staff Member
Posts: 433
Joined: Fri Feb 24, 2006 9:45 am

Lesson 2 Stack with new MobGui

Post by elanorb » Fri Mar 21, 2014 12:35 pm

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
Attachments
Lesson2NewMobGUI.zip
(1.26 MiB) Downloaded 96 times
Elanor Buchanan
Software Developer
LiveCode

roddy
Posts: 40
Joined: Tue Mar 04, 2014 7:24 pm

Re: Lesson 2 Stack with new MobGui

Post by roddy » Tue Mar 25, 2014 2:49 am

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?

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Lesson 2 Stack with new MobGui

Post by LCNeil » Tue Mar 25, 2014 11:53 am

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
——

kendonnelly
Posts: 20
Joined: Mon Mar 10, 2014 5:15 pm

Re: Lesson 2 Stack with new MobGui

Post by kendonnelly » Wed Mar 26, 2014 4:35 pm

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
Ken Donnelly
Halifax, NS, Canada

Post Reply

Return to “idea2app and Coding School”