Need some help with iOS native fields.

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Virgil
Posts: 6
Joined: Tue Jul 31, 2012 11:15 pm

Need some help with iOS native fields.

Post by Virgil » Thu Jun 08, 2023 10:18 pm

I am having trouble saving the data from native iOS fields to the matching standard fields.
I have a stack with a card that has 4 native iOS fields.
One of them is a multiline native iOS field.
Each field is created and deleted based on the code from the LiveCode iOS native field sample.
The sample code works when there is only one native field but not multiple and definitely not when there is a multiline field in that group.

If anybody has a working sample I would sure like to see it.

-Virgil

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9580
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Need some help with iOS native fields.

Post by dunbarx » Thu Jun 08, 2023 11:03 pm

Hi.
The sample code works when there is only one native field but not multiple and definitely not when there is a multiline field in that group.
I do not do mobile, but that statement seems very odd to me. With those multiple or multiline fields, does the app run in the IDE?

Craig

Virgil
Posts: 6
Joined: Tue Jul 31, 2012 11:15 pm

Re: Need some help with iOS native fields.

Post by Virgil » Fri Jun 09, 2023 12:33 am

It runs in the iPhone simulator and on the actual phone.

Virgil
Posts: 6
Joined: Tue Jul 31, 2012 11:15 pm

Re: Need some help with iOS native fields.

Post by Virgil » Fri Jun 09, 2023 1:23 am

The iOS fields are not active unless the environment is mobile. So you need to be in simulated on on an actual iOS device.

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Need some help with iOS native fields.

Post by Klaus » Fri Jun 09, 2023 8:46 am

Hi Virgil,

welcome to the forum!

Could you please post the script(s) that you use?
Thanks!

Best

Klaus

Virgil
Posts: 6
Joined: Tue Jul 31, 2012 11:15 pm

Re: Need some help with iOS native fields.

Post by Virgil » Fri Jun 09, 2023 1:21 pm

Hi Klaus,

Please find a demo stack and sql. file attached that use the iOS fields.
I ripped this from the last version of my application before I gave up and removed the iOS fields.
I made it generic and cleaned it up a bit.
Thanks in advance for looking at it.

-Virgil
Attachments
TestiOSFields.zip
(249.83 KiB) Downloaded 67 times

Virgil
Posts: 6
Joined: Tue Jul 31, 2012 11:15 pm

Re: Need some help with iOS native fields.

Post by Virgil » Mon Jun 19, 2023 12:58 am

I believe I have solved the issues concerning the native fields.
I am attaching the demonstration stack I created.
I'm sure there is a cleaner, more efficient way to script this but it is working in the simulator.
I have not been able to load it to any devices yet.

There are some scripts and techniques that new users may find useful.
The stack demonstrates the following items:

• Create, update and delete data from a SqLite database.
• Populate a scrolling list field from a SqLite database.
• Navigate to a detail card from the list field and populate it with data from the SqLite db.
• Highlight and scroll into view the last selected item when returning to the list from the detail card.

Give it a try and let me know what you think.

-Virgil
Attachments
NativeFields2.zip
(54.19 KiB) Downloaded 66 times

Post Reply

Return to “iOS Deployment”