Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Trap window close via X in window title?
  RSS 2.0 ATOM  

Trap window close via X in window title?
Rate this thread
 
50319
 
Permlink of this thread  
avatar
  • dlcrain58
  • Posted: 09 December 2010 09:36 AM
  • Total Posts: 4
  • Joined: 09 December 2010 05:18 PM

Hi,

I’ve looked through all the docs for a way to detect when a window has been closed with the X button at the far-right of the window, without success.  Not even scriptJob has an event or condition for this, as far as I can tell.  In fact, aside from the main window, there seems to be no “window close” event nor flag in any of the UI commands (but plenty of flags for disabling the neighboring minimize/maximize buttons, and even for running a script when un-minimizing).

I need something like this so that pop-up, modeless dialog windows 1) can be removed when the invoking window (via a button) is closed this way, and 2) so that the invoking window’s functionality isn’t broken when the pop-up window is closed that way.  Because you know some users are gonna use that X button, even though there is a Cancel button provided… My only other alternative would be to abandon pop-up windows and combine all of the functionality into a single, messy window.

Thanks!



Replies: 0
avatar
  • dlcrain58
  • Posted: 10 December 2010 06:01 AM

Nevermind!  I focused too much on the lists of events and conditions in the scriptJob reference page, and missed the other flags—including the -uid and -p flags which do exactly what I want.



Replies: 0
avatar

I was looking for the same, some time back, Thanks for the Info. :)



Dushyant Kumar Kashyap.
http://programmerslimbo.blogspot.com/

Replies: 0