IOS Mail Style "Multi Line Scoller"

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

IOS Mail Style "Multi Line Scoller"

Post by Nakia » Tue Dec 04, 2012 7:06 am

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

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: IOS Mail Style "Multi Line Scoller"

Post by jmburnod » Tue Dec 04, 2012 9:47 am

Hi Nakia,
Yes it is possible.
You can build a group of flds with a scroller for the group
Best regards
Jean-Marc
https://alternatic.ch

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Location: New York
Contact:

Re: IOS Mail Style "Multi Line Scoller"

Post by endernafi » Tue Dec 04, 2012 2:29 pm

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 8)
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:
mailStyleMultiline.zip
(1.36 KiB) Downloaded 284 times
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 :oops:
and I don't fancy datagrid objects, I think they are unnecessarily complicated.


Hope it helps...

Best,

~ Ender Nafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: IOS Mail Style "Multi Line Scoller"

Post by jmburnod » Tue Dec 04, 2012 7:10 pm

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
https://alternatic.ch

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Location: New York
Contact:

Re: IOS Mail Style "Multi Line Scoller"

Post by endernafi » Tue Dec 04, 2012 7:16 pm

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 8)

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
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: IOS Mail Style "Multi Line Scoller

Post by monte » Tue Dec 04, 2012 8:23 pm

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.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Nakia
Posts: 425
Joined: Tue Feb 21, 2012 8:57 am

Re: IOS Mail Style "Multi Line Scoller"

Post by Nakia » Wed Dec 05, 2012 1:37 am

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)

hlowe
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8
Joined: Wed Dec 05, 2012 5:56 am

Re: IOS Mail Style "Multi Line Scoller"

Post by hlowe » Wed Dec 05, 2012 6:03 am

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!

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: IOS Mail Style "Multi Line Scoller

Post by Jellicle » Wed Dec 05, 2012 8:20 am

monte wrote: I've actually contemplated doing a table view external for this reason.
Do it. Do it! Do it!!!!

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: IOS Mail Style "Multi Line Scoller"

Post by monte » Thu Dec 06, 2012 8:46 am

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
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: IOS Mail Style "Multi Line Scoller

Post by Jellicle » Thu Dec 06, 2012 12:17 pm

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
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply

Return to “iOS Deployment”