more iOS questions

2012-10-31 Thread Lars Brehmer
I am slowly getting there on this first iPad project, but things that should be 
fairly easy simply aren't for me.

First the keyboard

I now know about the on keyboardActivated on keyboardDeactivated handlers, but 
I can''t figure out how to use it. In some cases I want the app to slide up 
with the keyboard. I seemed to me that in that handler I should set loc the 
bottom of the stack to to the top of the keyboard, so I tried setting item 2 in 
the bottomLeft of the stack to item 2 in the topLeft of the keyboard. But the 
script editor doesn't accept calling the keyboard the keyboard. How does one 
refer to the native keyboard? Or is this aproach just plain wrong?

Returning to the app from another app

How does one get the app to be suspended and then resumed? Everytime I return 
to the app its seems to have quit and it restarts. In the liveCode dictionary, 
suspend and resume don't apply to mobile systems. How is this done?

MobGui

I couldn't make a native scroller myself, so I tried mobGui. Is it not possible 
to try before you buy? Because I followed the simple instructions for a native 
scrolling text field, but on the iPad it made no difference whatsoever. Can't 
one try mobGui on a device begore you buy it? I plan to buy it, but I'd like to 
at least see if these things work before I do.

Cheers,


Lars



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: more iOS questions

2012-10-31 Thread J. Landman Gay

On 10/31/12 10:19 AM, Lars Brehmer wrote:


I now know about the on keyboardActivated on keyboardDeactivated
handlers, but I can''t figure out how to use it. In some cases I want
the app to slide up with the keyboard. I seemed to me that in that
handler I should set loc the bottom of the stack to to the top of the
keyboard, so I tried setting item 2 in the bottomLeft of the stack to
item 2 in the topLeft of the keyboard. But the script editor doesn't
accept calling the keyboard the keyboard. How does one refer to the
native keyboard? Or is this aproach just plain wrong?


The latest release has added the effective working screenrect which 
gives you the useable dimensions of the screen when the keyboard is 
showing. The second item in the rect would be the top of the keyboard.




Returning to the app from another app

How does one get the app to be suspended and then resumed? Everytime
I return to the app its seems to have quit and it restarts. In the
liveCode dictionary, suspend and resume don't apply to mobile
systems. How is this done?


Apps will always quit, the engine doesn't yet support suspend. To return 
to where the user left off, trap the shutdown message and save the 
current state of the app to a file on disk. On preOpenStack, restore it.




MobGui

I couldn't make a native scroller myself, so I tried mobGui. Is it
not possible to try before you buy? Because I followed the simple
instructions for a native scrolling text field, but on the iPad it
made no difference whatsoever. Can't one try mobGui on a device
begore you buy it? I plan to buy it, but I'd like to at least see if
these things work before I do.


The last time I checked, MobGUI was fully functional even if 
unregistered, but on a device or in a simulator it showed a dialog when 
the app launched that said it was an unlicensed version. If you aren't 
seeing anything at all, there might be a problem with the stack or the 
scripts.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: more iOS questions

2012-10-31 Thread J. Landman Gay

On 10/31/12 4:35 PM, J. Landman Gay wrote:

On 10/31/12 10:19 AM, Lars Brehmer wrote:


I now know about the on keyboardActivated on keyboardDeactivated
handlers, but I can''t figure out how to use it. In some cases I want
the app to slide up with the keyboard. I seemed to me that in that
handler I should set loc the bottom of the stack to to the top of the
keyboard, so I tried setting item 2 in the bottomLeft of the stack to
item 2 in the topLeft of the keyboard. But the script editor doesn't
accept calling the keyboard the keyboard. How does one refer to the
native keyboard? Or is this aproach just plain wrong?


The latest release has added the effective working screenrect which
gives you the useable dimensions of the screen when the keyboard is
showing. The second item in the rect would be the top of the keyboard.


Oops. The fourth item. Sorry.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


OK, two basic iOS questions (formerly iPad retina weirdness)

2012-10-26 Thread Lars Brehmer
Sorry if anybody reacted to this!

I finally found the iphoneUseDeviceResolution true function, and now it looks 
just like I meant it to look!

But the fact that I asked really underscores how behind I am on the learning 
curve of using liveCode for iDevices!

So my app looks very nice indeed, but two very basic problems with the 
functionality popped up.

First: I assumed that scrolling text fields were somehow handled automatically 
in iOS, that is a flick of the finger scrolls the field. I guess you all know 
that this is not the case! I have a scrolling list field which when the desired 
line is reached, mouseUp on it performs the desired operation. I found the 
iosScroller keyword and the BeginDecelerate and EndDecelerate, but 
unfortunately I couldn't figure out how to implement them!

A little help here?

The second one also involves a bad guess about what iOS automaticaly does. This 
one involves the keyboard. In iOS when you tap a field it appears. But in every 
app I have ever seen if the active field is at the bottom of the app, the 
entire app slides up, so the keyboard does not prevent you from seeing what you 
are typing. But it's not automatic. Does anyone know how to do this?

I am astonished at how fantastic liveCode works with iOS and was amazed to see 
that almost everything works smoothly on the first try, even for someone with 
my limited skills! But htese two very basic things are crucial, so I am looking 
for tips!

Cheers,

Lars
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OK, two basic iOS questions (formerly iPad retina weirdness)

2012-10-26 Thread Guglielmo Braguglia

Hi Lars,
happy that you found iphoneUseDeviceResolution :-)

So,
about iOS scrolling, see this discussion on the forum : 
http://forums.runrev.com/viewtopic.php?f=49t=13141 ...


about the keyboard ... nothing in iOS is automatic... you have to do 
manually, eg. grouping the controls and moving up/down the group 
following the keyboard status ...


Guglielmo


On 26.10.2012 15:21, Lars Brehmer wrote:

Sorry if anybody reacted to this!

I finally found the iphoneUseDeviceResolution true function, and now it looks 
just like I meant it to look!

But the fact that I asked really underscores how behind I am on the learning 
curve of using liveCode for iDevices!

So my app looks very nice indeed, but two very basic problems with the 
functionality popped up.

First: I assumed that scrolling text fields were somehow handled automatically 
in iOS, that is a flick of the finger scrolls the field. I guess you all know 
that this is not the case! I have a scrolling list field which when the desired 
line is reached, mouseUp on it performs the desired operation. I found the 
iosScroller keyword and the BeginDecelerate and EndDecelerate, but 
unfortunately I couldn't figure out how to implement them!

A little help here?

The second one also involves a bad guess about what iOS automaticaly does. This 
one involves the keyboard. In iOS when you tap a field it appears. But in every 
app I have ever seen if the active field is at the bottom of the app, the 
entire app slides up, so the keyboard does not prevent you from seeing what you 
are typing. But it's not automatic. Does anyone know how to do this?

I am astonished at how fantastic liveCode works with iOS and was amazed to see 
that almost everything works smoothly on the first try, even for someone with 
my limited skills! But htese two very basic things are crucial, so I am looking 
for tips!

Cheers,

Lars
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OK, two basic iOS questions (formerly iPad retina weirdness)

2012-10-26 Thread Dr. Hawkins
On Fri, Oct 26, 2012 at 6:21 AM, Lars Brehmer larsbreh...@me.com wrote:
 I have a scrolling list field which when the desired line is reached, mouseUp 
 on it performs the
desired operation. I found the iosScroller keyword and the BeginDecelerate and 
EndDecelerate,
but unfortunately I couldn't figure out how to implement them!

 A little help here?

Try two fingers; lots of iOs scroll that way.

-- 
Richard E. Hawkins, Esq.
(702) 508-8462

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: OK, two basic iOS questions (formerly iPad retina weirdness)

2012-10-26 Thread J. Landman Gay

On 10/26/12 11:45 AM, Dr. Hawkins wrote:

On Fri, Oct 26, 2012 at 6:21 AM, Lars Brehmer larsbreh...@me.com wrote:

I have a scrolling list field which when the desired line is reached, mouseUp 
on it performs the
desired operation. I found the iosScroller keyword and the BeginDecelerate and 
EndDecelerate,
but unfortunately I couldn't figure out how to implement them!



A little help here?


Try two fingers; lots of iOs scroll that way.



It isn't automatic, the whole thing needs to be scripted. I checked for 
a lesson on it but I don't see one, though this comes close:


http://lessons.runrev.com/s/lessons/m/4071/l/44421-how-to-create-a-scrolling-group-using-the-improved-graphics-architecture

There have been some example scripts posted here and to the forums, a 
search would probably turn them up.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-17 Thread Mark Smith
Hi Monte, just so I am sure I understand


/command mergNotify pNotification

This command registers for a notification to be sent to the calling control
(me) whenever it occurs. The same notification may be registered by multiple
controls in your app. If a single control registers for the same
notification multiple times it will receive it multiple times./

Does that mean the calling control could be a stack? And if your stack is
made up of multiple stacks do you have to set notifications for each stack
in order to be able to respond to UIApplicationWillResignActiveNotification?

Or can you set it once for the whole application?

Thanks

-- Mark




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656479.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-17 Thread Monte Goulding
Hi Mark

Yes the calling control can be a stack. Anything that you can refer to as 'me' 
in your code. Wherever you handle startup/shutdown etc you can handle 
UIApplicationWillResignActiveNotification for your whole app. Most likely in 
the mainstack script but could be in a library script or backscript.

Cheers

Monte

On 18/10/2012, at 12:53 PM, Mark Smith wrote:

 Hi Monte, just so I am sure I understand
 
 
 /command mergNotify pNotification
 
 This command registers for a notification to be sent to the calling control
 (me) whenever it occurs. The same notification may be registered by multiple
 controls in your app. If a single control registers for the same
 notification multiple times it will receive it multiple times./
 
 Does that mean the calling control could be a stack? And if your stack is
 made up of multiple stacks do you have to set notifications for each stack
 in order to be able to respond to UIApplicationWillResignActiveNotification?
 
 Or can you set it once for the whole application?
 
 Thanks
 
 -- Mark
 
 
 
 
 --
 View this message in context: 
 http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656479.html
 Sent from the Revolution - User mailing list archive at Nabble.com.
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-16 Thread Mark Smith
J. Landman Gay wrote
 It's a field in the iOS pane in standalone settings. Just choose a PNG 
 from your hard drive.

Got that working, very cool! Do you know if there is an option to remove the
shine (settings, newsstand, contacts, calendar, game centre for example
don't have shine, messages, youtube, iTunes, appstore do have shine). For my
icon image, it would be best without.

Thanks

-- Mark



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656458.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-16 Thread Colin Holgate
At the top of the icons section is a checkbox marked Prerendered Icon. Checking 
that will make it use your non-shine version.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-14 Thread Mark Smith
Jacque, thanks for the pointer re: the icon.

Monte, what I want to do is encrypt the file (mergeAES) before the system
shuts down or hibernates. Essentially trap it and send a shutdown/close
stack request to myself so I can terminate in an orderly fashion. Doable?

Thanks

-- Mark



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656371.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-14 Thread Monte Goulding

 Monte, what I want to do is encrypt the file (mergeAES) before the system
 shuts down or hibernates. Essentially trap it and send a shutdown/close
 stack request to myself so I can terminate in an orderly fashion. Doable?


mergNotify UIApplicationWillResignActiveNotification

on UIApplicationWillResignActiveNotification
   -- do your encryption here
end UIApplicationWillResignActiveNotification

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-14 Thread Mark Smith
Monte Goulding wrote
 on UIApplicationWillResignActiveNotification
-- do your encryption here
 end UIApplicationWillResignActiveNotification

Thanks



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656373.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-14 Thread Mark Smith
Monte Goulding wrote
 on UIApplicationWillResignActiveNotification
-- do your encryption here
 end UIApplicationWillResignActiveNotification

I'm going to try:


on UIApplicationWillResignActiveNotification
   close this stack
end UIApplicationWillResignActiveNotification

and see if we can get an orderly shutdown with encryption and all (all the
code to handle it is in the closestack handler) which is also sent when you
press the home button. 

Interestingly I just checked the docs on the home button and its not
mentioned except in reference to the screen orientation. But clearly when
you press home it sends a closestack message and shuts down the
application. Strange how this would not be documented (unless I missed it)?




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338p4656374.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-14 Thread Monte Goulding

On 15/10/2012, at 2:10 PM, Mark Smith wrote:

 Monte Goulding wrote
 on UIApplicationWillResignActiveNotification
   -- do your encryption here
 end UIApplicationWillResignActiveNotification
 
 I'm going to try:
 
 
 on UIApplicationWillResignActiveNotification
   close this stack
 end UIApplicationWillResignActiveNotification

Hmm... I'm not positive that's the best plan as you will probably find your 
stack is closed when the user awakens their phone. I would suggest something 
like this:

on closeStack
  encryptItAll
end encryptItAll

on UIApplicationWillResignActiveNotification
  encryptItAll
end UIApplicationWillResignActiveNotification

on encryptItAll
  -- do your encryption and save
end encryptItAll

If you really want to force quit at sleep then try:

on UIApplicationWillResignActiveNotification
  quit
end UIApplicationWillResignActiveNotification

Not sure if apple will be happy about that though

Cheers

Monte

--
M E R Goulding 
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


iOS questions

2012-10-13 Thread Mark Smith
Two, hopefully very simple, questions:

1. can we detect the on/off button (upper right, towards the rear) on an
iPad?

2. is there a tutorial around on how to add an application icon for an iPad
program?

Thanks

-- Mark





--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/iOS-questions-tp4656338.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-13 Thread Monte Goulding
I don't think you can trap this event. Also I don't think there's a separate 
notification for this button as opposed to the system just going to sleep. But 
if you just want to know if the device is put to sleep eiher way with your app 
running then that's what mergNotify was invented for. You want 
UIApplicationWillResignActiveNotification and 
UIApplicationDidBecomeActiveNotification and these are in the demo.

Cheers

Monte

--
M E R Goulding
Software development services

mergExt - There's an external for that!

On 14/10/2012, at 1:22 PM, Mark Smith mark_sm...@cpe.umanitoba.ca wrote:

 1. can we detect the on/off button (upper right, towards the rear) on an
 iPad?

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: iOS questions

2012-10-13 Thread J. Landman Gay

On 10/13/12 9:22 PM, Mark Smith wrote:


2. is there a tutorial around on how to add an application icon for an iPad
program?


It's a field in the iOS pane in standalone settings. Just choose a PNG 
from your hard drive.



--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode