Xojo Conferences
XDCMay2019MiamiUSA

Move it to the back (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Open source license
Next thread: re: listbox


Win32 API Declares   -   Berg, Heath
  Move it to the back   -   Eric Richards
   Re: Move it to the back   -   Arnaud Nicolet
   Re: Move it to the back   -   Eric Richards
   Re: Move it to the back   -   Arnaud Nicolet
   Re: Move it to the back   -   Charles Yeomans
   Re: Move it to the back   -   Eric Richards

Move it to the back
Date: 02.08.06 23:12 (Wed, 02 Aug 2006 17:12:30 -0500)
From: Eric Richards
Hi -

How do I send my app to the back, for Os 9 & 10, with Rb tripple 5 ?

Thanks

Eric

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Move it to the back
Date: 03.08.06 19:09 (Thu, 3 Aug 2006 20:09:56 +0200)
From: Arnaud Nicolet
Hi,
It depends of what you mean by "send to the back".

If you mean "hide the application", like when you choose the "Hide
<current application" menu item, it can be done by a declare or using
apple script.

For MacOS X:
tell application "System Events"
set i to first process whose frontmost is true
set visible of i to false
end tell

For MacOS 9:
tell application "Finder"
set i to first process whose frontmost is true
set visible of i to false
end tell

If you mean "put all other applications in front of your", then the
only way is to bring every other application to the front , like this:

tell application "System Events" --or "Finder" for MacOS 9
set i to every process whose frontmost is false
set c to 1
repeat
if c > (count items of i) then exit repeat
set p to item c of i
set frontmost of p to true
set c to c + 1
end repeat
end tell

(but the second case should probably not be done).

Le 3 août 06 à 00:12 Matin, Eric Richards a écrit:

> Hi -
>
> How do I send my app to the back, for Os 9 & 10, with Rb tripple 5 ?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Move it to the back
Date: 04.08.06 19:47 (Fri, 04 Aug 2006 13:47:08 -0500)
From: Eric Richards
>
>If you mean "put all other applications in front of your", then the
>only way is to bring every other application to the front , like this:
>
>tell application "System Events" --or "Finder" for MacOS 9
> set i to every process whose frontmost is false
> set c to 1
> repeat
> if c > (count items of i) then exit repeat
> set p to item c of i
> set frontmost of p to true
> set c to c + 1
> end repeat
>end tell
>
>(but the second case should probably not be done).
>
Yep that be it.

Humm, this can't be done by declares ?

This shouldn't be done ? Why's that ?

I was just testing out something I wanted to try.
This did work, though it means having apple script installed.



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Move it to the back
Date: 04.08.06 20:29 (Fri, 4 Aug 2006 21:29:53 +0200)
From: Arnaud Nicolet

Le 4 août 06 à 20:47 Soir, Eric Richards a écrit:
>>
>> If you mean "put all other applications in front of your", then
>> the =20
>> only way is to bring every other application to the front , like
>> this:
>>
>> tell application "System Events" --or "Finder" for MacOS 9
>> set i to every process whose frontmost is false
>> set c to 1
>> repeat
>> if c > (count items of i) then exit repeat
>> set p to item c of i
>> set frontmost of p to true
>> set c to c + 1
>> end repeat
>> end tell
>>
>> (but the second case should probably not be done).
>>
> Yep that be it.
>
> Humm, this can't be done by declares ?

Yes, it can be done. I remember having seen a "Process Declares" (or
such name) RB project, when RB 3 was the current version. I think
it's not simple but it is possible.

> This shouldn't be done ? Why's that ?

This is mostly my opinion.

I believe it 's not recommended in the Apple Interface Guidelines. I
don't know if I'm right, but this approach seems disapointing (I'd
like to do that sometimes, but it's not "classic").
First, you have to take care of processes the user has explicitly
hidden. You should not make them visible again.
Second, bringing an app to the front also brgins all of its windows
to the front. An user may explicitly keep a window to the back but
bring another window of the same app to the front. You don't preserve
the order of the windows using the code above. (argument mostly for
MacOS X).
Third, since "send to back" is not a declare, I believe there are
other cases where you should avoid doing that.

> I was just testing out something I wanted to try.
> This did work, though it means having apple script installed.

...the MBS plugin also handles process' declares in an easy way.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Move it to the back
Date: 05.08.06 14:53 (Sat, 5 Aug 2006 09:53:27 -0400)
From: Charles Yeomans

On Aug 4, 2006, at 3:29 PM, Arnaud Nicolet wrote:

>
> Le 4 août 06 à 20:47 Soir, Eric Richards a écrit:
>>>
>>> If you mean "put all other applications in front of your", then
>>> the =20
>>> only way is to bring every other application to the front , like
>>> this:
>>>
>>> tell application "System Events" --or "Finder" for MacOS 9
>>> set i to every process whose frontmost is false
>>> set c to 1
>>> repeat
>>> if c > (count items of i) then exit repeat
>>> set p to item c of i
>>> set frontmost of p to true
>>> set c to c + 1
>>> end repeat
>>> end tell
>>>
>>> (but the second case should probably not be done).
>>>
>>>
>> Yep that be it.
>>
>> Humm, this can't be done by declares ?
>
> Yes, it can be done. I remember having seen a "Process
> Declares" (or such name) RB project, when RB 3 was the current
> version. I think it's not simple but it is possible.

Actually, it's pretty simple. See the Process Manager of my declares
book at <http://www.declareSub.com/>.

Charles Yeomans_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Move it to the back
Date: 05.08.06 18:07 (Sat, 05 Aug 2006 12:07:24 -0500)
From: Eric Richards
>
>>This shouldn't be done ? Why's that ?
>>
>This is mostly my opinion.
>
>I believe it 's not recommended in the Apple Interface Guidelines. I
>don't know if I'm right, but this approach seems disapointing (I'd
>like to do that sometimes, but it's not "classic").
>First, you have to take care of processes the user has explicitly
>hidden. You should not make them visible again.
>Second, bringing an app to the front also brgins all of its windows
>to the front. An user may explicitly keep a window to the back but
>bring another window of the same app to the front. You don't preserve >
>the order of the windows using the code above. (argument mostly for
>MacOS X).
>Third, since "send to back" is not a declare, I believe there are
>other cases where you should avoid doing that.
>
Ahh, I see interesting.

Thanks.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>