Page 1 of 1
IOS Mail Style "Multi Line Scoller"
Posted: Tue Dec 04, 2012 7:06 am
by Nakia
Hi,
I am trying to understand if its possible to make a Mutline Text field "Scroller" that behaves like the mail App on IOS.
In particular I need to have the ability to have more than 1 line of data in each of the lines of the multiline text fld.
I will try and explain further.
Data in line 1
- more data of line 1 of fld x
- more data of line 1 of fld x <-------------------------------Press over any of these lines and this returns a click line of 1 with the hilite state encasing all four lines
- more data of line 1 of fld x
Data in line 2
- more data of line 2 of fld x
- more data of line 2 of fld x <-------------------------------Press over any of these lines and this returns a click line of 2 with the hilite state encasing all four lines
- more data of line 2 of fld x
Re: IOS Mail Style "Multi Line Scoller"
Posted: Tue Dec 04, 2012 9:47 am
by jmburnod
Hi Nakia,
Yes it is possible.
You can build a group of flds with a scroller for the group
Best regards
Jean-Marc
Re: IOS Mail Style "Multi Line Scoller"
Posted: Tue Dec 04, 2012 2:29 pm
by endernafi
Hi Nakia,
You can do that in many possible ways.
* Use a html file prepared on-the-fly by script and show it within a browser object.
Look at
this as an example.
I know it's not what you want but just an example about what can be done.
* Use a form-style datagrid object and customize its template based on your needs.
Look at
this lesson and many other there.
* Use groups of groups of groups

Well, basically you can build a template group of fields and background images, etc. based on your needs.
Then copy it, set the loc of it, change the content of it all by script.
Here is an example:
Beware that it's not pretty nor scripted.
Merely an example to my point.
Personally I prefer the third way.
Because I know next to nothing about html/css/javascript
and I don't fancy datagrid objects, I think they are unnecessarily complicated.
Hope it helps...
Best,
~ Ender Nafi
Re: IOS Mail Style "Multi Line Scoller"
Posted: Tue Dec 04, 2012 7:10 pm
by jmburnod
Hi
Yes groups are a good way, i use it, but it seem there is a maximum height for a group
The user guide 5.5.1 say:
Maximum size of an object Unlimited
I remember I met mistake with a group > 32400 height
I tested it with your stack and it seem it is possible to have 270 groups.
The height of group "multiLineBaseGroup" = 32400
After this limit the script don't work well and refuse a new group
Fortunately we should find a way to jump this limit with the help of our companions
Best
Jean-Marc
Re: IOS Mail Style "Multi Line Scoller"
Posted: Tue Dec 04, 2012 7:16 pm
by endernafi
Hi Jean-Marc,
You're absolutely right;
there is a limit, unfortunately.
I hit that bump while building a photo gallery via a paging-enabled scroller.
Only solution I could find was embedding an open-source html5/javascript
photo gallery into a browser object, i.e. option 1
In Nakia's case, I don't know if there's a fourth solution.
I'd be happy to hear though, if there is.
Best,
~ Ender Nafi
Re: IOS Mail Style "Multi Line Scoller
Posted: Tue Dec 04, 2012 8:23 pm
by monte
I have played with various ways to use the data grid for mobile scrolling. There is a drop tool available on mergExt. After recent issues with a client I should point out that you can't scroll anything in LiveCode as smooth as a native table view. I've actually contemplated doing a table view external for this reason. Currently though if you need smooth scrolling then use jquery mobile in a web view.
Re: IOS Mail Style "Multi Line Scoller"
Posted: Wed Dec 05, 2012 1:37 am
by Nakia
Thanks everyone for your help.
I downloaded the DataGrid Sampler from the RunRev lessons and it seems fairly easy to use so I will
try that method first providing the scrolling (IOS Scroller) is going to be relatively smooth.
Does anyone have an example of an IOS App that I could reference the effectiveness of the scroller?
(I am at work now and cant add a scoller to the example to test myself)
Re: IOS Mail Style "Multi Line Scoller"
Posted: Wed Dec 05, 2012 6:03 am
by hlowe
I agree that scrolling data grids under iOS LC are sluggish. LC native support for UITableView should be relatively easy to implement and a huge plus!
Re: IOS Mail Style "Multi Line Scoller
Posted: Wed Dec 05, 2012 8:20 am
by Jellicle
monte wrote: I've actually contemplated doing a table view external for this reason.
Do it. Do it! Do it!!!!
Gerry
Re: IOS Mail Style "Multi Line Scoller"
Posted: Thu Dec 06, 2012 8:46 am
by monte
Hi Gerry
I might do... It would need a good custom control that acts as a placeholder. If I could afford to sit around writing third party LiveCode extensions all day I probably would
Cheers
Monte
Re: IOS Mail Style "Multi Line Scoller
Posted: Thu Dec 06, 2012 12:17 pm
by Jellicle
monte wrote:Currently though if you need smooth scrolling then use jquery mobile in a web view.
Just playing with jquery mobile. Looks cool (I already use html/css/web views for lists). But I can't get the html it produces to fit the width of an iOS app

It's too wide and I'm not very .css literate.
Gerry