more than one iOS scroller on a card
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
more than one iOS scroller on a card
Is it possible to have more than one iOS scroller on a card?
If so, how does one do this?
Any examples available?
sims
If so, how does one do this?
Any examples available?
sims
Re: more than one iOS scroller on a card
Hi sims,
Each time you create a native scroller you set an ID of that scroller.
Simon
Each time you create a native scroller you set an ID of that scroller.
When you have multiple scrollers just keep changing the sScrollerID and reference the one you want by it.mobileControlCreate "scroller", "loremScroll"
put the result into sScrollerID
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: more than one iOS scroller on a card
Thank you for the reply Simon.
For example i want three scrollers on the same card.
Please pardon my ignorance with this but in the example they give the scroller is created in a preOpenCard handler.
That scroller has this unique ID.
Are you suggesting that I have three version of that code in the preOpenCard handler, each with different names of their group and field that contains the text - save the ID of each, perhaps as a userProp. Then call up that ID as needed?
Or are you suggesting that I create a scroller on the card each time i click on a group that represents a scroller - outside of the preOpenCard handler?
Am feeling fairly dense on this...
sims
For example i want three scrollers on the same card.
Please pardon my ignorance with this but in the example they give the scroller is created in a preOpenCard handler.
That scroller has this unique ID.
Are you suggesting that I have three version of that code in the preOpenCard handler, each with different names of their group and field that contains the text - save the ID of each, perhaps as a userProp. Then call up that ID as needed?
Or are you suggesting that I create a scroller on the card each time i click on a group that represents a scroller - outside of the preOpenCard handler?
Am feeling fairly dense on this...

sims
Re: more than one iOS scroller on a card
Hi sims,
how are you, you old son-of-a-gun?
Yes, create three scoller objects on preopencard and store their IDs in LOCAL variables.
That's what I do and I put all "mobile" hanlders also into the card script, so locals are the way to go (for me)!
Best
Klaus
how are you, you old son-of-a-gun?

Yes, create three scoller objects on preopencard and store their IDs in LOCAL variables.
That's what I do and I put all "mobile" hanlders also into the card script, so locals are the way to go (for me)!
Best
Klaus
Re: more than one iOS scroller on a card
Hey Klaus! Long time no see.
Sent you a PM.
sims
Sent you a PM.
sims
Re: more than one iOS scroller on a card
Hello there.
Following this thread up...
I appreciate that I can create many native mobile controls by using doing something like:
However...
if using a scroller for example, using the handler:
... how do you look out for each scroller control? Is there a 3rd parameter I don't know about which identifies the control?
Go on - elucidate
Kind regards, Paul.
Following this thread up...
I appreciate that I can create many native mobile controls by using doing something like:
Code: Select all
local mobCntrlA, mobCntrlB
on openCard
mobileControlCreate "scroller"
put the result into mobCntrlA
mobileControlCreate "scroller"
put the result into mobCntrlB
end openCard
if using a scroller for example, using the handler:
Code: Select all
on scrollerDidScroll pOffsetX, pOffsetY
lock screen
set the hScroll of group thisGroup to pOffsetX
set the vScroll of group thisGroup to pOffsetY
unlock screen
end scrollerDidScroll
Go on - elucidate

Kind regards, Paul.
Re: more than one iOS scroller on a card
Hi Paul,
have a look at mobileControlTarget in the dictionary.
It tells you which control has originated a certain message.
Kind regards
Bernd
have a look at mobileControlTarget in the dictionary.
It tells you which control has originated a certain message.
Kind regards
Bernd
Re: more than one iOS scroller on a card
Ah - right.
So I can just use a switch statement in eg. scrollerDidScroll to determine what controller is scrolling. I get it. Thanks.
Kind regards, Paul.
So I can just use a switch statement in eg. scrollerDidScroll to determine what controller is scrolling. I get it. Thanks.
Kind regards, Paul.