IOS layout / process question.. how would you do it?

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
sx-74
Posts: 22
Joined: Wed Nov 30, 2011 11:27 pm

IOS layout / process question.. how would you do it?

Post by sx-74 » Fri Dec 09, 2011 10:50 pm

Greetings all,
I am about 30 hours into LIveCode programing and climbing that vertical learning curve. :)
One issue that I have run into is how I should tackle a feature request.

I have a request to create a form that the IOS user can fill in on their device which will end up printed at the main office.
Here is my question.

Would it be easier to create a form on our website - have the livecode app go to the page, fill it in and submit it.
OR
Can I build something on the IOS device that gets sent (email / FTP, etc) to the Main office.

The more I think about this, the webform sounds like a better solution, however, will not look as elegant as something in the livecode app.

Thoughts?

- Jay

kvn
Posts: 12
Joined: Thu Dec 08, 2011 1:32 am

Re: IOS layout / process question.. how would you do it?

Post by kvn » Fri Dec 09, 2011 11:55 pm

I have not really had much experience, thus far, with actually coding apps, but I do plenty of weighing pro's and con's and troubleshooting ideas.

I'm not sure what the form is for or how important the information is, but if you do a webpage that loads into the app you will be dependent upon the device's connectivity. Meaning if they click the "form" button and they have a poor connection due to no wifi or wireless provider being down, then your page in the app won't load. As far as it looking "as elegant as if it were built in iOS".. there shouldn't be any visual difference there really. Since the webpage would load into your app, the UI would remain the same. It would just be a matter of designing your webpage to mimic your applications visual style.. giving it a seamless appearance.

If you build your form within the app then you have some options available. If the device does not have connectivity, you could create your form in such a way that it stores the form data in the background until the device has connectivity again... at which point it would send the data. And of course, since the form is built into the app, you will never have problems displaying that page if the device has no connectivity.

I didn't really answer the question of "how do you tackle feature requests", but I think I hope I've made sense with regards to your main questions.

sx-74
Posts: 22
Joined: Wed Nov 30, 2011 11:27 pm

Re: IOS layout / process question.. how would you do it?

Post by sx-74 » Sat Dec 10, 2011 12:05 am

kvn wrote:I have not really had much experience, thus far, with actually coding apps, but I do plenty of weighing pro's and con's and troubleshooting ideas.


If you build your form within the app then you have some options available. If the device does not have connectivity, you could create your form in such a way that it stores the form data in the background until the device has connectivity again... at which point it would send the data. And of course, since the form is built into the app, you will never have problems displaying that page if the device has no connectivity.
.
Thanks.. what would be some of the options available to keep it in the app?
Note, this would only be used in the mobile environment, I would not be using this on a Mac/PC/*nix platform.

kvn
Posts: 12
Joined: Thu Dec 08, 2011 1:32 am

Re: IOS layout / process question.. how would you do it?

Post by kvn » Sat Dec 10, 2011 12:29 am

What I meant by "options available" is that if it's built as a webpage, your options are controlled by the device connectivity. If it's built in the app then you have freedom to implement work arounds and fallbacks dependent on the devices connectivity.

All in all, if it were me I would build it within the app. But maybe some other people can offer different perspectives on this.

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: IOS layout / process question.. how would you do it?

Post by CALL-151 » Sun Dec 11, 2011 3:24 pm

I agree, create the form on a card in your app. You could then save it as a text file or PDF in the documents folder if the user has no connectivity and/or email it as an attachment back to the office when there's a connection. But as of LC 5.0.1, do not include any graphic effects in your PDF- they'll crash your app (to be fixed soon I hope).

sx-74
Posts: 22
Joined: Wed Nov 30, 2011 11:27 pm

Re: IOS layout / process question.. how would you do it?

Post by sx-74 » Tue Dec 13, 2011 12:58 am

OK,
I have made a card with several fields in it so that when completed, it stuffs all of the data into the body of an email.
I think I have that all figured out.. (very crude.. if there are better solutions I am all ears..)

Code: Select all

on mouseRelease
  revMail "demoemail@abc.xyz",,"Contact Information", field "Field date" & cr & field "Field_semester_teaching" & cr & field "Field_your_name"
end mouseRelease
However, I have now discovered that 1/2 of the fields are covered by the keyboard when it "pops up" to enter text in the fields.
Is there a way to make my card scrollable so that the user can scroll up and down with the keyboard still "up"?

And, once the keyboard is "up" how to do you make it go away?

Thanks again.

- Jay

josephreesGA75ef
Posts: 22
Joined: Mon Dec 05, 2011 5:33 pm

Re: IOS layout / process question.. how would you do it?

Post by josephreesGA75ef » Tue Dec 13, 2011 8:33 am

Wow, something I know how to answer!

You'll probably want to group all of your input fields together first. Then you'll do something like:

Code: Select all

on keyboardActivated
   set the top of group "whatever_you_named_it" to -20 -- This would move the top of the entire group of controls to 20 pixels above the visible area of the card/stack
end keyboardActivated

on keyboardDeactivated
   set the top of group "whatever_you_named_it" to xxx -- Move it back to the original location
end keyboardDeactivated
Hope this helps!

Post Reply