1) Verified that I declared local sScrollerID
2) I have verified that there are no remaining scrollers from the prior card, using
Code: Select all
put mobileControls() into tControlList
answer tControlList& " is mobilecontrollist"
3) I have verified that the initial scroller on that page (which is a scrolling datagrid) is deleted when I click the "message" button.
4) I have verified that when I choose the type of message, it creates a scroller (for a group) and has a ScrollerID.
4) I have verified that the size of the contentrect and the scrollerrect are reasonable.
But when I try to scroll on it (in IOS simulator), it never "hits" ScrollerDidScroll. I know that because I put a tag:
Code: Select all
put "bob" into field "test"
What else can I do to make this work?
Here is the createScroller code (this works, because I get an sscrollerID)
Code: Select all
if the platform is "iphone" or the platform is "ipad" then
if "loremscroll" is among the lines of mobileControls() then mobileControlDelete "loremscroll"
--
// Only create a scroller on a mobile device
if environment() is not "mobile" then exit createscroller
// Set the area of the scroller
put the rect of group "group_message" into tScrollerRect
// Set the are of the content to be scrolled
put 0,0,(the formattedWidth of group "group_message"),(the formattedHeight of group "group_message") into tContentRect
// Create the scroller control
mobileControlCreate "scroller", "loremScroll"
put the result into sScrollerID
answer sScrollerID
// Set the properties of the scroller
mobileControlSet "loremScroll", "rect", tScrollerRect
mobileControlSet "loremScroll", "contentRect", tContentRect
mobileControlSet "loremScroll", "visible", true
mobileControlSet "loremScroll", "scrollingEnabled", true
mobileControlSet "loremScroll", "vIndicator", true
mobileControlSet "loremScroll", "vScroll", 0
answer sScrollerID
end if
Code: Select all
on scrollerDidScroll hOffset, vOffset
put "bob" into field "test"
if the vis of group "datagrid_contacts" is true then
put "1" into field "test"
lock screen
set the dgvScroll of grp "datagrid_contacts" to vOffset
unlock screen
else if the vis of group "group_access" is true then
put "2" into field "test"
set the vScroll of group "group_access" to vOffset
else if the vis of group "group_newcontact" is true then
put "3" into field "test"
set the vScroll of group "group_newcontact" to vOffset
else if the vis of group "groupupdateit" is true and the vis of group "group_message" is false then
put "4" into field "test"
set the vScroll of group "groupupdateit" to vOffset
else if the vis of group "group_message" is true then
put "5" into field "test"
set the vScroll of group "group_message" to vOffset
else
put "6" into field "test"
end if
end scrollerDidScroll hOffset, vOffset