Re: Best practice for when an app is sent to the background?

2015-07-23 Thread Paul Dupuis
On 7/23/2015 12:46 PM, Marty Knapp wrote:
> If you want to know when a user switches to a different app you can
> use "suspend" and then "resume" to detect when they come back.
>

Duh! I completely forgot about suspend/resume in addition to
suspendStack/resumeStack! Thank you.



___
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: Best practice for when an app is sent to the background?

2015-07-23 Thread Marty Knapp
If you want to know when a user switches to a different app you can use 
"suspend" and then "resume" to detect when they come back.


Marty Knapp

I have a multi-window (stack) desktop application. In working on some
recent enhancements to the app, I got to thinking about the apps
behavior when a user clicks on a 3rd party app (sending the app to the
background) or minimized/iconifies one or more windows of the app.
Specifically handing the messages:

suspendStack and resumeStack
and
iconifyStack and unIconifyStack

Does anyone out there have any "best practice:" guidance on how these
two message pairs should be handled - how similar are they or what are
the subtle or not so subtle differences in how they should be handled. I
realize that if you just click on another app's window, or another
stack/window in the app, a suspendstack message is sent but not
iconifyStack. If you minimize a window, an suspendStack message and then
an iconifyStack message is sent in that order (with uniconifyStack and
resumeStack being sent when restored).

So it appears to me that iconifyStack/unIconifyStack only need to be
handled is there is something specific your want to do on
minimization/iconification that your would not normally do when a stack
is suspended?

Does anyone know of a technique to differentiate in suspendStack whether
the user is just switching to a different stack/window in the same app
or to a 3rd party app?




___
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


Best practice for when an app is sent to the background?

2015-07-23 Thread Paul Dupuis
I have a multi-window (stack) desktop application. In working on some
recent enhancements to the app, I got to thinking about the apps
behavior when a user clicks on a 3rd party app (sending the app to the
background) or minimized/iconifies one or more windows of the app.
Specifically handing the messages:

suspendStack and resumeStack
and
iconifyStack and unIconifyStack

Does anyone out there have any "best practice:" guidance on how these
two message pairs should be handled - how similar are they or what are
the subtle or not so subtle differences in how they should be handled. I
realize that if you just click on another app's window, or another
stack/window in the app, a suspendstack message is sent but not
iconifyStack. If you minimize a window, an suspendStack message and then
an iconifyStack message is sent in that order (with uniconifyStack and
resumeStack being sent when restored).

So it appears to me that iconifyStack/unIconifyStack only need to be
handled is there is something specific your want to do on
minimization/iconification that your would not normally do when a stack
is suspended?

Does anyone know of a technique to differentiate in suspendStack whether
the user is just switching to a different stack/window in the same app
or to a 3rd party app?

___
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