Can't close windows and palettes created in a script (CC)

Hi,
I developped a Script for After Effects, and sometimes I need to show a window or a palette, but when this window is showed more than once, it can't be closed again (the close button, the one with the cross on the title bar) does nothing, whether it's a palette or a window.
Here's my sample code :
creating the palette :
var mesurefenetre = new Window ("palette", "test",undefined, {resizeable:true});
var resultattexte = mesurefenetre.add("statictext",undefined,"text added");
showing the palette is done with a button in my main panel :
var bouton = fenetre.add("button",undefined,"mesure");
bouton.onClick = function () { mesurefenetre.show(); };
But with this code, when the window is shown once, then closed, then shown again, it then can't be closed...
So I tried to reimplement onClose on the window :
mesurefenetre.onClose = function () { mesurefenetre.close(); }; //does nothing
mesurefenetre.onClose = function () { mesurefenetre.hide(); }; //does nothing
So my current workaround is to use the button in my main panel to check if the window is visible and hide it...
     bouton.onClick = function () { if (mesurefenetre .visible) mesurefenetre .hide(); else mesurefenetre .show(); }; //don't like this behavior, really not user friendly
This example is with a palette, but it does not work with a window too.
This seems to be a bug from After Effects, it worked well with CS4~CS6, (used this in Duik (http://ik.duduf.com) for a long time)
Any idea what I can do ?
Thanks,
Duduf

Up!
Just to let you know, this still isn't fixed in my current version of After Effects (13.2.0.49 on win7, and win8.1) and it can be reeeeeaaaaally annoying to have to always add a close/cancel button on every windows...

Similar Messages

  • My pointer arrow is jumping around.  my windows flip.  i can't close windows--there are no 3 colored dots.i don't use a mouse.  i just downloaded Lion and my mac has been acting weird since.

    ALL OF A SUDDEN , MY POINTER ARROW IS OUT OF CONTROL OR WON'T MOVE.  I DON'T USE A MOUSE.  THE WINDOWS SHAKE LIKE WHEN I'M TOLD I HAVE THE WRONG PASSWORD AND THEN THE WINDOWS FADE, SWITCH AND/OR  FLIP AROUND.  THERE ARE NOT THE 3 DOTS IN THE LEFT-HAND CORNER SO I CAN'T CLOSE WINDOWS WHEN I FINISH WORKING WITH SITES.  MY MAC HAS STARTED ACTED WEIRD SINCE I STARTED USING LION.  HELP!!!!!!!!!!!!!!!

    Hi,
    I work for Dr Pod, an iPod repair company. This sounds to be that the hard drive is dying in the iPod. As it is an older iPod it is out of its one year warranty, the iPod won't be repaired for free by Apple, and you'd need to consider wether it'd be better to have the iPod repaired by an iPod repair company such as my own, or to purchase a new one from Apple.
    If you did choose to purchase a new iPod from Apple, then they do provide 10% off the cost of a new iPod if you exchange in your old one. I'm not sure if this applies to faulty ones though (I have heard of some people being turned away for having a faulty device).
    Hope this helps,
    Mark Sweeney
    Dr Pod Founder

  • :)- I canceled the update from Snowleopard to Lion by cleaning my keys ^^. Hit the wrong key i thing. Now i'm very weird ...only can start in Windows and dont know how to get my Lion Update now...Cant start in Mac OS X (Snowleopard) now :((

    Hey Folks...i'm totally ****** off !
    ^^
    I canceled the update from Snowleopard to Lion by cleaning my keys ^^. Hit the wrong key i thing. Now i'm very weird ...only can start in Windows and dont know how to get my Lion Update now...Cant start in Mac OS X (Snowleopard) now
    Please tell me what i have to do know
    greets
    < Edited By Host >

    Hello fuchs (guess), If you cancelled while downloading the 4GB Lion, no problem, download again. Snow Leopard should run (start holding the option key).
    If you cancelled during the install process, I do not know. In this case you could try to start with the CMD + R keys pressed, and choose the restore, which may work if the creation of the restore partition of Lion has finished.
    If that does not work, reinstall Snow Leopard with the CD (start holding the C key), after that download the Combo Update 10.6.8 to update the Snow Leopard completely, then redownload Lion (App Store, click "purchases" while holding the Option Key, find Lion, click "install"). If you want to have your own copy of the Lion installer, you have to copy the installer to a Memory stick or burn to DVD before you install, see else where.
    Lex

  • Can't close windows

    I am unable to close new windows in Safari. I can close individual tabs, but I can't close the windows. It's been like this since for a few months, now, and it's driving me crazy! (I think it happened right after I installed some update, but I don't know which...)

    Hello joel:
    There is no "automatic" way to determine what you have added (IMHO, adding 'stuff' to programs is not a very good idea).
    I would try the things I mentioned above. If that does not help, delete Safari and reinstall it from your software install DVD.
    Barry

  • Can't close window from button

    I am trying out Safari 4 Public Beta on my HP 2133 which runs Vista Business with service pack 1.
    When I try to close a Safari window by left clicking on the cross in the red box on the top right of the window nothing happens. In fact all 3 buttons (minimize, window size and red cross) act as one to change the window size when I double left click.
    I can only close the window by right clicking on the application in the tray and selecting close.
    Any ideas please?

    I too was having this problem with my home HP Desktop. I love the new beta an use it on my home HP desktop, home HP laptop, and work HP desktop and was having the problem only on the Home desktop. Tonight I discovered that if I change my Windows Theme (right click desktop/personalize/theme) to anything but Windows Vista then the functionality of said buttons work again. It appears that Safari Beta does not like the straight Windows Vista theme or at least that's my diagnosis as of now.

  • How can I close windows when quitting an application - but leave desktop windows open?

    In Mavericks...
    Is there any way to close the windows of application (when quitting - ie System Preferences => General) BUT not have this affect the finder application.
    I want the windows I have opened in the finder to remain opened, but everything else to close upon quitting

    Well, for some time now (since I upgraded to Mavericks) my startup goes on and on.
    It will, on occasion, finish correctly and I can go on with my work, but usually, it hangs.
    I can restart the finder 2 or 3 times and get it to finish loading.
    If I go into System Preferences => General => and turn “Close windows when quitting an application” on, then restart, the finder usually starts up faster and does not hang
    Obviously, there is some operation that is running in the background that is trying to restore itself to some unknown state that is holding up the finder application.
    I have uninstalled and turned off all sort of applications that run in the background, but have not yet been able to locate the culprit.
    So, I’d like to be able to have “Close windows when quitting an application” on because everything else on the machine can revert to a clean start-up state -- but I want the windows I leave opened in the finder to remain opened and where I put them.

  • Finder stops responding. Can't close window or click icons in window bar without moving window.

    When moving files between disks, the Finder stops responding to the close, minimize and expand window (red, yellow, green buttons). If I grab the title bar and move the window, even one pixel, I can click on the boxes. The same is true of the trash button in the window icons.
    It's just annoying.

    I have been plagued by the same problem ever since upgrading to Mavericks.
    I click the red button on windows (various apps), it goes dark but window won't close until I actually make that window active or move it around somewhere.

  • Can't Close Windows in Safari

    Because of some bad RAM, I had to do some system and software re-installs. I am running the latest version of Tiger, and windows in Safari will not close. They will go to the dock with the yellow button, but will not close with either the red button, the close window command in the File window or the command W combination. When I quit the program, the old windows go away, but that is a pain. I wait to quit Safari until I have 6 or 8 Safari windows open in the dock. Do I need to reset Safari? (I really don't want to lose the keychain passwords.) I've checked and re-checked preferences, and I don't find anything there, either.

    Hello bassomac:
    Try a couple of things.
    Clear the Safari cache.
    Trash the Safari preference file (com.apple.safari.plist).
    Restart safari and see what happens.
    Barry

  • I can't close safari and so I can't turn off mac book air, I can't close safari and so I can't turn off mac book air

    I can't close the safari at the tool bar and when I try to turn off the computer, there's a message which says that I have to close the safari first and then turn off the computer. What can I do?

    Click on the Apple menu and choose Force Quit, or press the Option, Command, and Escape keys. Select Safari.
    (61763)

  • I can't get rid of a "Not Enough Storage" pop-up on my IPad2.  Can't close it and can't access settings.  Can't shut off the device either.  It's just locked up.  What can I do?

    How can I get rid of the "Not Enough Storage" pop-up on my IPad2?  It won't go away, I can't cancel it, I can't access settings, and I can turn off the IPad to reboot.  It is just locked up. 

    Reboot the device.
    Shut down the device by holding the sleep/wake button  and the home button at the same time.
    Hold them both until you see the screen go black. In some cases, you may need to keep holding them even after the red power off slider appears. If it does, just keep holding it.
    Wait until the white Apple logo appears.
    When this happens, you can let go - the iPhone is rebooting.

  • An uninvited web page comes up when i am working on the net. It takes over and then when i try to close it an information window comes up that says close to continue and cancel to stay on this page. well I can't close it and i dont' want to continue.

    How do i close a page that says hit close to continue and cancel to stay on the page?

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • Youtube has a left side [split window] open on the same video for months. I can't close it and it plays the same song over and over again when I open firefox. I've uninstalled and re-installed firefox and checked all settings with no help

    those are all of the details.

    I know the Firefox developers had good reasons for introducing this feature, but they failed to consider their users who are web developers.
    I've installed a web server on my computer to help with web design, and I access the homepage through http://localhost
    However this won't work in offline mode, and (with my dial-up connection and all) it's not practical to always dial in to my ISP just to have Firefox start in online mode, plus I don't need to be *actually/literally* online to access my local web server. And the extra clicks to File -> Work Offline are a pain.
    The best option IMHO would be to provide a pain-free way to disable this setting for advanced users. Emphasis on *pain-free*.
    My 2 cents, for myself and (hopefully) on behalf of the poor, forgotten web designers out there.

  • Can I migrate tags and keywords created in Elements, to Photoshop CS4?

    I have used Elements 11 for cataloguing a lot of photos but I want to use Photoshop CS4 for other purposes. The tags and keywords I created in Elements disappear in PS. How can I migrate them? Does CS4 have a similar cataloguing ability?

    When you add keywords to images in Photoshop Elements Orgainzer, they are added to the catalog not to the file directly. You can save the keywords to the file directly by using File  > Save Metadata to Files.
    If you use the Edit with Photoshop feature of the Organizer, the file does get sent to Photoshop with metadata attached (without having to use the above steps). But in order to see this data you have to go to File > File Info in Photoshop.
    Beyond that, not all file formats support metadata or keywords, and not all application have a way of displaying or reading keywords.
    Photoshop doesn't have any cataloging abilities. The closest it has is the Bridge companion app. This does not catalog your files, but simply allows you to view the files on your hard drive (similar to Windows Explorer or Mac Finder) with more information displayed.

  • Can't close window without quitting?

    I've noticed that if i try to close the iPhoto window (using Apple+W or the red gel button) that the whole program quits.
    This isn't in line with how the other apple products work is it? Normally I can close a window, yet the program remains active. The advantage being that I can open a new window very quickly instead of having to wait for the library to be created again.
    Is this in line with everyone else's experiences?
    Thanks,
    Ben

    Hi Benjamin,
    For programs that normally only use one window, like iPhoto, the program will quit when the window is closed.
    I either "Hide" iPhoto or click the middle button to swish the window into the dock, when I want to hide the window.
    Lori

  • Computer can't close anything and can't open again without slowing?

    All right, so I have Mountain Lion on another computer and I'm not sure if it's gotten it's "update" yet or not, but it sure hasn't fixed anything if the update has gone out.
    My computer will load perfectly fine after I have shut it down. Not restarted, as in, completely shut down and then turned back on again. The problem is with the programs.
    I tend to have firefox and something else open at the same time, say Microsoft Word or itunes or something, both of which can run fine after I first open them. The problem is after I try to close one of them. It doesn't matter which one, say firefox, but if I hit "quit" I WILL have to go to force quit because the program is having trouble deciding if it really wants to quit or not, I can only assume. So I force quit that, but then my WHOLE computer is now completely slowed down now that I've done that. I will constantly get the rainbow ball, it will take me 5 minutes to do something or open another program and that's even if it decides to do it instead of "not responding".
    So then, to pretty much do anything else on the computer, I have to shut it down, and then turn it on again.
    I am pretty sure that shutting your computer down at least 3 times every day isn't a good thing, but that's what I have had to resort to doing. Is there any way to fix this problem (I have the latest updates so I'm pretty sure updating wouldn't do it) or is this system just really that bad and I will have to wait for an update to see if they will even address the slowness issue?

    The next time you have the problem, note the exact time: hour, minute, second.
    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Scroll back in the log to the time you noted above. Select any messages timestamped from then until the end of the episode, or until they start to repeat. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for

  • No longer snooze times in mavericks calendar?

    I think I have this figured out now after several runs through these discussions and other forums, but I want to make sure I'm correct in my understanding... can someone please confirm? I used to rely heavily on ical alerts for things that didn't hav

  • File I/O not working in swing!

    Hi all, I have been trying to input certain parameters from a text field or a combobox from the swing UI and certain other contents into a text file.When i click a certain button 'generate'. Basically there are 3 text files namely '1.txt ', '2.txt' ,

  • How to empty XE database and re-create tables/fields from scratch?

    Hi, I've installed XE database to port my VB6/Access application to it, and I know that XE is limited to one single database, so far so good. But I want to erase everything from inside this default database to create my own tables/fields from scratch

  • 3G on lockscreen

    My iDevices except iPad turn off wifi when locked. This problem has only happened on 2 iPhone 4 devices iPhone 3GS and iPod touch 2G please help! Message was edited by: iPeto498

  • Mac is connected to network but internet still won't work?

    before chirstmas my internet was working perfectly fine, but it went down, like none of the familys laptops worked, the ipad didn't, none of the ipods, my mac or my iphone, since it was chirstmas we couldn't ring up to get it fixed.. however just aft