keeping application on top

hi

I am trying to keep my application frontmost, I used to use this:

set level of window "main" to 3 -- Floating window

what is the equivalent using using ASOBJC ?

cheers

The rough equivalent would be to call this on the window:

setLevel_(current application's NSFloatingWindowLevel)

But changing the window layering does not keep an app frontmost.

thanks for that Shane

if I do change my window layering, how would I keep my app frontmost?

Maybe this is silly, but why would you require your app to be frontmost? Can’t the user make another app active? If there is some dialog they must interact with then you would want that to be modal till they dismissed/answered it. Even still sometimes a user needs to go to another application; for example to find their answer in another file/application or to make a folder on the desktop using the Finder.

gidday SuperMacGuy

my app interacts with Indesign, and requires that I be able to click buttons to do certain things in my id
fies as I work through them, so being frontmost all the time is good for me.

At times there are dialogs that pop up asking me to perform certain tasks, these also need to come to the
front, at the moment they are not.

I use this AddF’s |makeKeyAndOrderFront_|(me) to open a dialog, but the dialog remains behind my id
file, so i’m basically looking to keep my app frontmost and at the same time bring dialogs to the front also.

if your app is always frontmost, you’ll never be able to change apps. I suspect what you really want is a Utility Panel rather than a standard NSWindow – then you’ll get what you want automatically.

ok, ill look into the utility panel instead,

thanks for that