Scrolling field or datagrid with Native scroller?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Scrolling field or datagrid with Native scroller?
Hi all,
A handler was missing in that version so not a neat code but works the same.
I forgot to mention that i am using MobGUI.!
Rgds.
A handler was missing in that version so not a neat code but works the same.
I forgot to mention that i am using MobGUI.!
Rgds.
- Attachments
-
- Modified_AZIndexDemoV2.livecode.zip
- (192.43 KiB) Downloaded 263 times
Re: Scrolling field or datagrid with Native scroller?
Hi Youks,
thanks for posting your example.
Kind regards
Bernd
thanks for posting your example.
Kind regards
Bernd
Re: Scrolling field or datagrid with Native scroller?
Couldn't get it to open in LC 5.02. =[
Re: Scrolling field or datagrid with Native scroller?
Hi Fireworx,
Try this one.
Rgds
Try this one.
Rgds
- Attachments
-
- Modified_AZIndexDemoV2.zip
- (192.43 KiB) Downloaded 276 times
Re: Scrolling field or datagrid with Native scroller?
Strong work !!! Just so you know in v LC 5.02 the line of code shown below in the openstack handler Throws an error. However it seems to work fine with it commented out.
Here is the line:
set the compositorType of stack "ScrollerAZIndexDemo" to "opengl"
I looked over your code but was unable to find what happens on: scrollerUpdate "Scroller"
Also
Not exactly sure where all the contacts data is stored and how you pull it out based on the index alpha request to display a subset of the entire list.
Can you elaborate on this a little?
This would be some great stuff for me to use to cross reference an alpha indexed list of streets to their map pages in my mapping application. I do have MobgGui and sadly have not had much luck with it so I would be excited to put the cash outlay to work.
Dave
Here is the line:
set the compositorType of stack "ScrollerAZIndexDemo" to "opengl"
I looked over your code but was unable to find what happens on: scrollerUpdate "Scroller"
Also
Not exactly sure where all the contacts data is stored and how you pull it out based on the index alpha request to display a subset of the entire list.
Can you elaborate on this a little?
This would be some great stuff for me to use to cross reference an alpha indexed list of streets to their map pages in my mapping application. I do have MobgGui and sadly have not had much luck with it so I would be excited to put the cash outlay to work.
Dave
Re: Scrolling field or datagrid with Native scroller?
Hi Dave,
Basically don't pay attention to that error with set the compositorType of stack "ScrollerAZIndexDemo" to "opengl" it is normal and has no effect when you try it on the simulator because "openGl" is just for the IOS so it triggers that error msg on the IDE.
I have just adapted the original code from Splash21 to suit my need and the "scrollerupdate" is a MobGUI feature that allows you to update the scroller when its content has changed.
Regarding the different lists, they are just on the second card embedded in different field contents (from A to Z) that i refer to when needed.
The big issue with the original code was that if you apply a scroll on the screen and then select another letter, the content of the scroller will update its content but continue scrolling......which is not like the behavior of the native address book. So i tried somehow to get rid of that !
I am sure that my code is not perfect and i hope that it will be improved.
Kind Regards.
Basically don't pay attention to that error with set the compositorType of stack "ScrollerAZIndexDemo" to "opengl" it is normal and has no effect when you try it on the simulator because "openGl" is just for the IOS so it triggers that error msg on the IDE.
I have just adapted the original code from Splash21 to suit my need and the "scrollerupdate" is a MobGUI feature that allows you to update the scroller when its content has changed.
Regarding the different lists, they are just on the second card embedded in different field contents (from A to Z) that i refer to when needed.
The big issue with the original code was that if you apply a scroll on the screen and then select another letter, the content of the scroller will update its content but continue scrolling......which is not like the behavior of the native address book. So i tried somehow to get rid of that !
I am sure that my code is not perfect and i hope that it will be improved.
Kind Regards.

Re: Scrolling field or datagrid with Native scroller?
If you would like to combine your 26 Alpha indexed fields into just one field for easy maintenance just replace the one line of code.
put fld ("Contacts_"&tIndexChar) of cd "ItemsList" into fld"Contacts"
with
repeat with x = 1 to the number of lines of field "MyContacts" of card 2
if char 1 of line x of field "MyContacts" of card 2 is tIndexChar then
put line x of field "MyContacts" of card 2 & CR after tNewList
end if
end repeat
put tNewList into fld "contacts"
------------------------
Works pretty good here is the stack. PS had to sort the lines starting with "The" into the "T" group.
Dave
put fld ("Contacts_"&tIndexChar) of cd "ItemsList" into fld"Contacts"
with
repeat with x = 1 to the number of lines of field "MyContacts" of card 2
if char 1 of line x of field "MyContacts" of card 2 is tIndexChar then
put line x of field "MyContacts" of card 2 & CR after tNewList
end if
end repeat
put tNewList into fld "contacts"
------------------------
Works pretty good here is the stack. PS had to sort the lines starting with "The" into the "T" group.
Dave
- Attachments
-
- Scrl AZIndexDemo Mod.zip
- (202.53 KiB) Downloaded 284 times
Re: Scrolling field or datagrid with Native scroller?
Hi Dave,
you could also "filter" instead of a repeat loop:
Best
Klaus
you could also "filter" instead of a repeat loop:
FireWorx wrote: ...
put fld ("Contacts_"& tIndexChar) of cd "ItemsList" into fld "Contacts"
put field "MyContacts" of card 2 int tNewList
filter tNewList with(tIndexChar & "*")
put tNewList into fld "contacts"
...

Best
Klaus
Re: Scrolling field or datagrid with Native scroller?
Thanks Klaus,
Yes I like that better.
However so as not to confuse. The first line of your code is the one that is being replaced. So Just have one field rather than 26 and name it "MyContacts" and then the following script.
put field "MyContacts" of card 2 int tNewList
filter tNewList with(tIndexChar & "*")
put tNewList into fld "contacts"
Dave
Yes I like that better.
However so as not to confuse. The first line of your code is the one that is being replaced. So Just have one field rather than 26 and name it "MyContacts" and then the following script.
put field "MyContacts" of card 2 int tNewList
filter tNewList with(tIndexChar & "*")
put tNewList into fld "contacts"
Dave
Re: Scrolling field or datagrid with Native scroller?
Hi,
Thx Dave & Klaus!
Rgds
Thx Dave & Klaus!
Rgds
