I think the problem may be your UIElement-ness. It's been ages since I worked 
on a UIElement app, and when I did it had to pop something up on the screen 
atop of everything, so I just put my window in the floating window layer (or 
was it called Utility window level? Well, one of the CGWindowLevel constants 
that you can pass to NSWindow's setLevel:).

I'm not sure if there is a way to bring windows with a document window level to 
front, but what I'd try is activating your application. I think NSApplication 
has a method to bring it to front, or make it active, or whatever the 
terminology was. Makes it the front process and swaps in its menu bar (which of 
course won't happen for your UIElement). Well, I'd try that, it may or may not 
work.

Hope these clues help you in figuring it out.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de


On 14.04.2013, at 18:33, Pax <45rpmli...@googlemail.com> wrote:
> I want my window to come to the front when I select it.  My window (with its 
> own class to handle it), sadly, has other ideas - and stays resolutely in the 
> background.  Complicating matters, my app is faceless - just a menu item to 
> show for itself, and no icon in the dock.  The code I'm having problems with 
> is as follows:
> 
> -(void) configureWindow:(id)owner
> {
>    [self showWindow:owner];
>    [infoWindow cascadeTopLeftFromPoint:NSMakePoint(20,20)];
>    [infoWindow makeKeyAndOrderFront:owner];
> }
> 
> configureWindow is called as follows (from AppDelegate.m):
> [[device objectForKey:@"InformationWindowRef"] configureWindow:self];
> 
> And the info.plist for the app contains:
> Application is agent (UIElement) YES
> 
> Given enough time, I may well crack this - but if anyone has a clever idea 
> for where I've gone wrong then I'd love to hear it.
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/witness.of.teachtext%40gmx.net
> 
> This email sent to witness.of.teacht...@gmx.net


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to