• 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: LSUIElement application and coming to the front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LSUIElement application and coming to the front


  • Subject: Re: LSUIElement application and coming to the front
  • From: Nick Beadman <email@hidden>
  • Date: Thu, 23 Oct 2008 14:51:03 -0700

Matt,

On Oct 23, 2008, at 10:40 am, Matt Neuburg wrote:

I know this isn't quite the answer you want, but one approach is to give up on LSUIElement and just have a normal app. Your app can watch what app is frontmost and show and hide itself accordingly, and can intrude its palette so that it is in front even when the other app is actually frontmost (using NSFloatingWindowLevel), thus calling attention to itself as a window supplementary to the other app, but there is still a distinction, and when
the user actually clicks on the palette to use it, your app comes to the front. I use this approach and I and my users find it a lot less confusing
than e.g. what Help Viewer does in Leopard (which is simply horrendous IMHO). m.


I actually agree that the Help Viewer is not the best UI in the Mac OS X universe. However, I am only using it as an example of an application that does exactly what I need mine to do. Believe me, my implementation will be much improved. I certainly will be very careful about the window only appearing when needed and being less intrusive than the Help Viewer.

While I would like this to be a separate application with it's own menu bar, that just simply isn't an option as I am supplementing an application which has it's own palettes and these must be on screen to maintain the illusion of my palette being part of the "host" application. Integration will be done via a plug-in in the host application which will allow me full control over the Cocoa application.

I did investigate the Help Viewer a little more and it's main window has a custom class of HVWindow. Doing an otool on the executable shows that the methods it implements are:

- (BOOL)canBecomeMainWindow
- (BOOL)becomeFirstResponder
- (BOOL)acceptsFirstResponder

which give me more clues to pursue. My next area of inquiry is going to be poking around Help Viewer using F-Script to see if I can figure out anything interesting.

Nick

--
Nick Beadman
email@hidden
(sent from my mailing list account, email@hidden)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: LSUIElement application and coming to the front (From: Matt Neuburg <email@hidden>)

  • Prev by Date: RE: Getting Carbon EventRef from cocoa NSEvent
  • Next by Date: Re: Getting Carbon EventRef from cocoa NSEvent
  • Previous by thread: Re: LSUIElement application and coming to the front
  • Next by thread: Increment object property
  • Index(es):
    • Date
    • Thread