Background process?

I currently have an ASOC application that runs alongside Adobe Illustrator containing all sorts of Illustrator scripts. One of the problems with it is that all Illustrator palettes disappear when I switch to my ASOC application.

One could argue that this is normal behaviour, but I noticed QuickKeys’ toolbars don’t show this behaviour. When I grab one of QuicKeys’ toolbars and drag it around, Illustrator is still the frontmost application. Is something like that possible with an ASOC application?

Yes, you can do that – try using a panel, and make it Non Activating in Attributes.

Cool, that’s the way to go. The only thing I’m struggling with is that the panel disappears as soon as the app runs, unless it’s a HUD-panel.

edit: this seems to give some hints how to deal with it: http://www.cocoadev.com/index.pl?NSPanel

Start by playing with Visible at Launch and Hide On Deactivate.

Thanks, I’ve got it working now. Apart from one thing. It really doesn’t get along very well with this little fella:

on applicationShouldTerminateAfterLastWindowClosed_(sender)
	return true
end applicationShouldTerminateAfterLastWindowClosed_

As soon as I call any other panel, say a color picker, my application quits. It’s as if my application suddenly realises there isn’t a single NSWindow open, only two NSPanels.

Either change it to return true, or add code to check if a panel is open.

Thanks, that works a treat. What really gets me is how obvious it is once you’re told. Again, thanks a lot Shane.

Sometimes it’s worse when that’s not the case…