Page 1 of 1

Clipboard

Posted: Thu Aug 18, 2011 7:07 pm
by Kaubs
Hey guys, I am trying to build an app on the iPhone that requires the use of the clipboard...I read the iOS notes and see that the clipboard is not currently supported....Please correct me if I am wrong. What I want to do is paste text that I've saved on the clipboard from out of my app to a blank text field in my app. If I am understanding the iOS release notes correctly I cannot do this without writing the framework in livecode to support clipboard.

Thanks!

Re: Clipboard

Posted: Thu Aug 18, 2011 7:57 pm
by brentj84062
You're in luck! In the release notes, look up the UITextField on page 50. This is a native text field that does support copy/past/select/etc. You have to implement it as a native control, which can be a bit difficult at first, but once you get the hang of it it's very simple.

I think by "clipboard support" they mean support within livecode scripting itself: you can't manipulate the clipboard yourself, you can only copy/paste as a user through a UITextField control. You can't add your own items to the clipboard popup bubble in LiveCode, either. In your case it should be just fine.

Re: Clipboard

Posted: Thu Aug 18, 2011 10:23 pm
by Kaubs
Thanks for the response! I did have the chance to read the section about UITextField in the iOS release notes and am still having a little trouble with a paste like command. It seems great in that you can edit text, change the keyboard type etc...but I don't quite see a tie in for the native clipboard. You've given me hope tho! Thanks a ton!

Re: Clipboard

Posted: Thu Aug 18, 2011 10:53 pm
by Dixie
Kaubs...

I am a little confused about exactly what you wish to do, but, I have attached a stack... Enter text into the UITextControl, click on the text and you can cut,copy or paste it... All the handlers are in the card script.

You could then save the text to a variable as it is being input and have your own sort of 'clipboard'.

hope it helps

Dixie

Re: Clipboard

Posted: Thu Aug 18, 2011 11:13 pm
by Kaubs
Dixie that works perfectly. Thank you for your help!