Page 1 of 1

How to use the navigation bar

Posted: Fri Aug 28, 2015 3:32 am
by bman46
I was trying to make a app for iPhone in livecode 8 (Dp 3) using the navigation bar and the header bar and i could not find any articles on how to use them. I am using them to navigation from card to card

Re: How to use the navigation bar

Posted: Fri Aug 28, 2015 6:10 am
by Simon
Hi bman46,
First off. Welcome to the forums :)

LiveCode 8 is in DP (Developer Preview) and it has a ton of cool stuff that will eventually be kind'a drag/drop/set some labels. At the moment though, it's only for people who know liveCode really well. Maybe you do know it well and your ? is legit. In which case ignore this post.
Do a search on mobgui and tmcontrol2, they are the forerunners to UI widgets. Yes, you'll have to pay more for them and soon (my guess is the end of this year) they'll be unnecessary (ok that isn't true, the developers of those are really smart people, they'll always be ahead of the curve).
Now I'm not saying that you should wait until then to start learning liveCode, everything the navigation widget can do you can do now but with a lot more coding (no drag 'n drop). Someone will correct me on the word "everything" above.

Simon
Edit: If you are starting out download one of the "Stable" versions, you'll see that on the download page. err there is a problem with xcode 6.4 I think and an rc should be used instead.

Re: How to use the navigation bar

Posted: Fri Aug 28, 2015 3:20 pm
by bman46
Ok thanks, I also looked at a article but it is not very good at providing code.

Re: How to use the navigation bar

Posted: Sat Aug 29, 2015 11:30 pm
by livecodeali
The navigation bar widget has a navigate message which is posted to its script object when a new icon is clicked.

So to use it for card navigation you would put

on navigate pLabel
go card pLabel
end navigate

in the script of the widget (if your cards are suitably named - if not you can use a switch control structure).

This is available in the dictionary by choosing Navigation Bar from the dictionary dropdown.

However I checked the header bar docs and there is nothing about the messages it posts to its script object, so I have reported a bug for me to fix next week :-) Thanks!
http://quality.runrev.com/show_bug.cgi?id=15815

Re: How to use the navigation bar

Posted: Sun Aug 30, 2015 1:16 am
by bman46
Ok thanks, that helped a lot.