AddressBook scroll?
In the AddressBook project, note the use of the code: local scroll = gre.get_value("scroll")
What is the benefit of this?
Who controls the scroll value?
And when can I make it one or other than one? Even though it's not a variable in the code, where did this variable come from?
0
Comments
Hi Salem,
The 'scroll' variable is defined in Storyboard, you can view it by pressing the top-level 'Address Book' option in the Application Model tab and viewing the 'Variables'.
If you look at the "TableLayer.ScrollUpButton" control, it has a Data Change action which sets this variable to 1 when pressed and 0 when released. The code then uses this to ensure the scroll button is pressed before triggering the scrolling timer you can see in the function ScrollUp.
This is mainly used as it's possible that a 'release' event occurs on the ScrollUpButton control without a previous 'press' event. In this case we wouldn't want the scrolling to start.
Hope this was helpful!
- Jake
Please sign in to leave a comment.