realbasic-nug
[Top] [All Lists]

Re: Float over only specific application.

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Float over only specific application.
From: Jonathan Johnson <jon at alacatialabs dot com>
Date: Wed, 30 Jan 2008 09:33:40 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <113B185F-C74A-4590-B084-3A4FA368FB94 at wam dot net dot au> <8CC09CA9-1454-4E00-B84D-D557B7CB60CE at mac dot com> <B1FDBD54-4FBB-4AEA-BFBB-85CCFD6204D0 at wam dot net dot au> <69760664-59F7-484F-8FF7-BC1582B21835 at oxalyn dot com>
On Jan 30, 2008, at 9:11 AM, Eric Williams wrote:

>
> On Jan 30, 2008, at 4:18 AM, Jeff Ayling wrote:
>
>> Thanks for pointing me in the right direction.
>>
>> I've tried me.FloaterProcess="hook" in the open event of a global
>> floating window. hook is the creator code for iTunes but the window  
>> is
>> still floating over all windows.
>
> I believe that capability is for Mac OS 9 only.
>
>> Is anyone else able to get this to work or may have some other ideas?
>
> I recently solved this problem: unfortunately, you need to
> continuously poll the system for the front process and hide/show your
> window as appropriate. The Carbon Declare Library has enough
> functionality for you to accomplish this task.
>
> All: If there is a better, non-polling way to do this, please pipe
> up! I'd love to hear about it.

There is: Carbon Events. There are carbon events sent when a new  
application is activated. At this point, you can check what the  
creator code of the application that was activated is. If it's iTunes,  
show it, otherwise, hide it. This requires no polling, and has no CPU  
hit.

Unfortunately I'm a little busy today, but perhaps Charles has some  
code in his MacOSLib or examples that would make this fairly trivial.

HTH,
Jon


-- 
Jonathan Johnson
President
Alacatia Labs, Inc.
http://www.alacatialabs.com/


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

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>