• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Newbie]: Proper window activation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Newbie]: Proper window activation


  • Subject: Re: [Newbie]: Proper window activation
  • From: John Cebasek <email@hidden>
  • Date: Mon, 7 Mar 2005 16:41:55 -0500

Hi All:

On further investigation, I stumbled on to the following:

I wrote a test harness that asks for the same right when invoking the screensaver, So the window is set at CGShieldingWindowLevel(). Because the screen behind my window wasn't black, I noticed that there was some shading where the popup menu would be.

So I'm guessing that the menu is being drawn behind the window because my window is at the top of the levels?

How do I get my menu to be at the same level as the window? Or do I have to redesign my GUI not to use popup menus?

Thanks in advance


John

On 4-Mar-05, at 5:27 PM, John Cebasek wrote:

Hi All:

My logging indicated that runModalForWindow wasn't doing much - actually it entered runModalFor..., but never returned. So I used my own event loop, which looks like this:

BOOL done = NO; // iVar
do
{
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask

untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode

dequeue:YES];
[NSApp sendEvent:event];
[pool release];
}
while (!done);

Now my window comes to the front as it should, you can drag it around, but I've got a popup menu, and when I click on the popup menu, the arrows high light, but the menu doesn't appear. If I move the mouse and release it a little lower on the screen to where another menu item would be (is?), the menu changes text. So the menu is there, just isn't drawn.

Any ideas?


John
On 4-Mar-05, at 1:14 PM, John Cebasek wrote:

Hi All:

I've got a window that thinks it's behind a window (title bar is disabled), even when it isn't.

Here's the flow:

Awake from nib;
show window: level is CGGetSheildingLevel();
Run modal for window

Note setting the window's level.

When I click in my window, the shielding window comes to the front, which hides my window. Since my window has the title bar disabled, that means I'm really not in front.

So is there anyway to make sure that my window is active and in front of the shielding window?

Thanks


John

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >[Newbie]: Proper window activation (From: John Cebasek <email@hidden>)

  • Prev by Date: Re: get superclass instance
  • Next by Date: Re: A question about binding and use
  • Previous by thread: [Newbie]: Proper window activation
  • Next by thread: retrive a variable value
  • Index(es):
    • Date
    • Thread