Procedure "Window.Close ()" does not work corectly?

Hello world!


I noticed that the procedure "Window.Close ()" in my scripts does not work correctly. This procedure works only for the first time.

// TWO WINDOWS TESTING
var win_1= new Window("palette", "Window 1",undefined);
var win_2= new Window("palette", "Window 2", undefined);

buildUI_window1();
buildUI_window2();

win_1.center();
win_1.show();

win_2.center();

function buildUI_window1() {
        win_1.btn = win_1.add("button", undefined, "SHOW WINDOW 2");
        win_1.btn.onClick = function() {
            win_2.btn.text = "CLOSE";
            win_2.show();
            } 
    }

function buildUI_window2() {
        win_2.btn = win_2.add("button", undefined, "CLOSE");
        win_2.btn.onClick = function() {
            win_2.close();  // This window can be close at firt time only!
            }
    }




This script showing two windows.

First time:

I opened my second window click on the button 'DISPLAY WINDOW 2 '.

He opened.

In the second window, click the CLOSE"" button.

Its closure.

Second time:

I opened my second window again.

He opened.

At this time, to close the '2' will not work.

Caveat! This second window can be removed only by closing the After Effects.

Thank you

Sergio

There is another thread in mentioning this forum cela, but can not find it... : CC as a palette that was closed may show once again, it responds perfectly, except that its function of "farm" is broken.

One solution is to:

(1) internally, do not use win.close () but win.hide)

(2) hide, the Red Cross touches the user: var win_2 = new window ("palette", "window 2', undefined, {closeButton: false}");

and add an option to the user to hide the palette (for example with a button somewhere with myButton.onClick = function() {this.window.hide () ;});)

It works very well, and if the script is run again, you can retrieve your fully functional window.

Xavier.

Tags: After Effects

Similar Questions

  • Qosmio G10: The operating system does not work corectly

    Hello. My problem is that my windows xp does not work corectly, mousecursor, sounds, videos, games, programs, everything turns into a ' stop and go '. as the cpu slows all the 1-2 seconds. I reinstalled windows now 4 times and any document in the format hd´s.

    Don t know what to do...

    and a second question... maybe this could be the answer for the first ;-)

    in my hardware-registration of my system windows are two elements, for I can't find a driver.

    -PCI-Device
    -videocontroller fuer multimedia (German ;-))
    in English systems, maybe it's the multimedia "media control device" or "videocontroller" or something...

    does anyone know if I can get the drivers, because they´re not listed on the toshiba site. and my backup-disk system was stolen. (sounds strange... I know :-))

    OK, please give me some advice, if you have any ideas!

    THX a lot, patrick

    Hello Patrick

    First of all, it will be interesting to know if the unit is pre-installed by recovery media. The installation of Qosmio is quite complicated, and I recommend you use the restore CD.

    In this way it is not possible to give a precise answer because I don't know what kind of things is installed on your device. I guess in your case, some application (such as the virus scan) runs in the background and your HARD drive can be pointed out.

    If your recovery DVDs is stolen, you can order a partner of service authorized in your country.

    Good bye

  • Don't click Desktop error "Windows explore does not work.

    Original title: Do not click on the desktop.

    My desktop computer has worked fine and now all of a sudden I am unable to click anywhere on the desktop. I am running windows 7 64 bit. If I click on the desktop, it will be then to come crash with the message Windows explores does not work then he'll recover. Other differences is that all desktop backgrounds are brighter and it disappears once it restarts, but returned about 5 seconds later. That I can not click once again. Are there any suggestions? I tried to start clean and had no success?

    Hi Nicolas,.

    I appreciate your efforts to solve the problem.

    I suggest you try the procedure described in the article and see if it helps.

    Error: Windows Explorer has stopped working
    http://support.Microsoft.com/kb/2694911/en-us

    Note:
    1) data files that are infected must be cleaned only by removing the file completely, which means there is a risk of data loss.

    2) after the boot minimum troubleshooting step, read the sections "How to reset the computer to start as usual after a clean boot troubleshooting" in the link provided to return the computer to a Normal startup mode.

    3) when you do the system restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    4) note that it takes as much time to do the upgrade as to reinstall the operating system. In addition, some of your custom Windows settings may be lost through this process.

    Hope this information helps. Answer the post with an up-to-date issue report to help you further.

  • After recent, iPhone, 6, update, Windows, Explorer, does not work, see, iPhone

    I installed the latest update required for my iphone ios 6 a few days ago, and now when I try to download pictures from my iphone to my PC (via USB connection), the PC does not see the iphone.   iTunes sees it yet, but windows Explorer does not work.  It seems that some setting has been broken through the update of ios.  A way to solve this problem?

    Restart the computer and the iPhone. Unlock the iPhone before connecting it to the computer. Any change?

    TT2

  • Satellite A300-1EH - windows installer does not work correctly

    Hello, this is my first post on this forum!

    My windows installer does not work correctly.
    What should do?

    Soryy, but I did not now much on computer systems.
    I have reinstall this installer?

    I'm waiting for your answers.

    > My windows installer does not work correctly.
    What do you mean exactly? You see a mistake? What exactly happens?
    Maybe your CD is scratched or damaged.

  • Halo 2 for windows vista does not work on my windows 7. Saiys it cannot start the direct customer

    original title: Halo 2 for windows vista

    Halo 2 for windows vista does not work on my windows 7.  Saiys it cannot start the direct customer.  It will not work in single user either...

    Hello

    Plase make sure you have the latest version of the GFWL Client installed:

    http://www.Microsoft.com/games/en-us/live/pages/livemarketplace.aspx

  • Windows crashes, Windows search does not work, EVENT ID 7042, 1006, 3024, 7040

    When I ran the pc fix - it sollution for windows crashing the results were as follows: Windows search does not work.  The reason;  An event id is logged on to windows search.  Event id numbers are... 7042, 1? 006, 1000, 3024, 7040.

    I'm sorry to say that I do not understand what it means, so I have no idea how to solve this problem.  Your help would be greatly appreciated... ty B.Gregory

    Hi beckilu,

    1. what operating system do you use?

    I suggest you run the fixit from the following link and see if that helps.

    Fix Windows Search when it crashes or shows no results
    http://support.Microsoft.com/mats/windows_search/en-us

  • SearchWindows of Windows search does not work,

    Windows search does not work "only 4 or 5 green bars just appear. I waited 45 minutes of ror, but he did say that "connection.

    Hello

    1. What is the operating system installed on your computer?
    2. don't you make changes to the computer before the show?

    Please run the fixit from Microsoft mentioned in the link below.

    Fix Windows Search when it crashes or shows no results
    http://support.Microsoft.com/mats/windows_search/en-us

  • Windows Update does not work. Microsoft Update NOT work.error code 80072EE2

    Original title: Windows Update does not work. Microsoft Update DOES not work.

    Automatic update does not work.  When I try to manually update I get error code 80072EE2.  I tried Microsoft Automated Troubleshooting Services.  Whenever it reports it has repaired errors, however there is no improvement.

    There may be another reason -

    Most popular right now: http://support.kaspersky.com/viruses/solutions?qid=208280684

    TaurArian [MVP] 07/01/2005-30/06/2011. The information has been provided * being * with no guarantee or warranty. What works for some, may not always work for others.

  • Windows Defender does not work

    Windows Defender support & apparently installs without error.  Yet it will not work.  Is it all the portions of Windows XP if you know something let me know * address email is removed from the privacy *.

    Hello

    1. What do you mean exactly by "Windows Defender does not work"?
    2. do you get any error message related to Windows Defender?

    We recommend that you check if Windows Defender service running. To do this, try the following steps:
    a. Click Start, click Run, type services.msc and click ok.
    b. right click on the Windows Defender service and click Start.
    c. restart the computer and check the difference.

    For more information, see Troubleshooting Windows Defender

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Update of Windows XP does not work, how do I stop the Office 07/10 updates?

    For these last months, the web version of Windows Update does not work with XP. When you click on the button for Express or custom installation, the stalls of system looking for updates. So I had to put windows to warn me of updates instead of going on the site, but now it keeps wanting to download me updates for Office 2007 and 2010, but I do not own these products (I use Office 2003).  I could not stop, even when I ticked the box does not warn me of those more. Finally I went to the site and found an option to disable Microsoft Update, which said I could always download the updates to the site, but I can't because he's trying to force me to re - download Microsoft Update.

    What is going on?  I don't like the new Microsoft Update as it keeps nagging me to download updates for the products that I have not yet owned. How can I update Windows XP only?  This is very fustrating.

    For these last months, the web version of Windows Update does not work with XP. When you click on the button for Express or custom installation, the stalls of system looking for updates. So I had to put windows to warn me of updates instead of going on the site, but now it keeps wanting to download me updates for Office 2007 and 2010, but I do not own these products (I use Office 2003).  I could not stop, even when I ticked the box does not warn me of those more. Finally I went to the site and found an option to disable Microsoft Update, which said I could always download the updates to the site, but I can't because he's trying to force me to re - download Microsoft Update.

    What is going on?  I don't like the new Microsoft Update as it keeps nagging me to download updates for the products that I have not yet owned. How can I update Windows XP only?  This is very fustrating.

    Hi Steve,.

    Follow these steps.

    Go to Start | Settings | Control Panel and double click on automatic updates. I'll explain why later.

    Then, tick the option at the bottom to turn off automatic updates, and then click apply/OK.

    Then, go to start, run, copy and paste this command and click OK: services.msc

    In the list of Services, you can see Background Intelligent Transfer Service ?

    Here's a pix what he looks like.

    If it is not listed, follow these steps to register the BITS service.

    Open the Windows search tool, copy / paste the following text, and then click Search: qmgr.dll

    Research should show this file in the following locations:

    C:\Windows\System32
    C:\WINDOWS\ServicePackFiles\i386
    C:\WINDOWS\system32\bits

    You might only see qmgr.dll in C:\WINDOWS\system32 depending on your configuration.

    Then, go to start, run and copy/paste: regsvr32 qmgr.dll and click OK

    Do the same with this file: regsvr32 qmgrprxy.dll

    Reboot the system and then copy / paste this command into the field run:
    %windir%\System32\rundll32.exe setupapi, InstallHinfSection DefaultInstall 132 %windir%\inf\qmgr.inf

    If you are prompted to insert the Windows installation CD, ignore this and in the dialog below, replace the path C:\WINDOWS\ServicePackFiles\i386

    If you could only see the file in C:\WINDOWS\system32, change the path to that instead.

    Restart the PC and then go to the Services and you should be able to see BITS in the list.

    Double click on it and then on the general tab, click the Start button to start the service manually. This is just a test to make sure that it works correctly.

    If you get 2 error: cannot find the specified file, click on start, then run again and copy / paste the following command, and then click OK:
    Tracking Add HKLM\SYSTEM\CurrentControlSet\Services\BITS\Parameters /v ServiceDll /t REG_EXPAND_SZ /d %windir%\System32\qmgr.dll

    Reboot again and try once more to start the PIECES. It should work fine now, but in the unlikely case where it fails again, run the following command, and then press ENTER:
    Reg add HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup

    Reboot once more and then do the following.

    Go to this link and install the IE8 December Update:
    http://www.Microsoft.com/en-GB/download/details.aspx?ID=41404

    If you use IE7, use this link instead:
    http://www.Microsoft.com/en-GB/download/details.aspx?ID=41442

    Finally, go to the Windows Update site and you should be able to download normally.

    If this is the case, re - enable automatic updates in Control Panel.

  • Windows Update does not work on new installations of XP Pro

    Hello world

    I installed a new copy of Windows XP Professional on a Dell Precision, I am about to sell, but for some reason any Windows Update does not work. I reinstalled Windows many times, but I still get the same error in WindowsUpdate.log:

    Detection of triggered via api DetectNow
    Received at THE 1 event
    Customer WU succeeds CClientCallRecorder::BeginFindUpdates of AutomaticUpdates with call id {4602F49D-1C30-4205-A0D7-8C4C7143D7A8}
    Customer WU execution call {4602F49D-1C30-4205-A0D7-8C4C7143D7A8} search Call type
    Verification of the different redirector to: http://download.windowsupdate.com/msdownload/update/v5/redir/wuredir.cab
    Verification of the different redirector to: http://download.microsoft.com/windowsupdate/v5/redir/wuredir.cab
    Verification of the different redirector to: http://windowsupdate.microsoft.com/v5/redir/wuredir.cab
    Could not download redirector ACR on test 3: 0x800b0003
    GetWuidentUrlFromRedirector failed due to error 0x800b0003
    IsUpdateRequired failed with error 0x800b0003
    Trying to get proc active data store
    Out-of-proc datastore is now active
    PT: ServerID using {9482F4B4-E343-43B6-B170-9A65BC822C77}
    PT: By using the server URL https://www.update.microsoft.com/ClientWebService/client.asmx
    PT: Calling methods on server
    Add the header accept-encoding: xpress succeeded
    DetectCompressionType return of type 1, hr = 0 x 0
    Methods: 0x8024400a
    PT: Cannot retrieve fault, origin = methods, hr is 0x8024400a
    Synchronization of updates: 0x8024400a
    Customer WU didn't search for update with 0x8024400a error
    Search booster failed, hr is 0x8024400a
    Affecting detection next time to 2012-08-10 07:38:03
    Customer WU reminded AutomaticUpdates with call failed call to search and 0x8024400a error code
    Customer WU complete and delete call {4602F49D-1C30-4205-A0D7-8C4C7143D7A8}
    EVENT REPORT: {3C043957-5881-4F80-8885-81F17DCEC18E} 17 2012-08-09 16:37:59-1000 1 148 101 {D67661EB-2423-451D-BF5D-13199E37DF28} 800b-0003 0 SelfUpdate failure software sync error: Agent failed detecting with reason: 0x800b0003
    EVENT REPORT: {96CC9537-3732-4A2E-B0E3-81C52B13B4BB} 18 2012-08-09 16:38:03-1000 1 148 101 {00000000-0000-0000-0000-000000000000} 0 AutomaticUpdates 8024400 failing software sync error: Agent failed detecting with reason: 0x8024400a

    I tried with and without Avast! Antivirus installed.

    Any suggestions are greatly appreciated - it drives me crazy!

    Thank you!
    Kyle

    You must be at Service Pack 3 level before you can use Windows updates.

    To determine which service pack is currently installed on your computer, follow these steps:

    1. Click Startand then click run.
    2. Copy and paste, or type the following command, and then click OK:

    winver

    A dialog box displays the version of Windows and the service pack that is currently installed on your computer.

    If you haven't already done so, you will need to install the SP2 and SP3 (SP1 note no longer exists).

    How to obtain the latest Windows XP service pack
    http://support.Microsoft.com/kb/322389

    Installation of SP2 - http://support.microsoft.com/gp/xpsp2getinstall

    Steps to take before you install Windows XP Service Pack 3
    http://support.Microsoft.com/kb/950717

    It is stated in "How to obtain the latest service pack XP" is.

    If you have problems obtaining the service pack from Windows Update, you can download the package of standalone update from the Download Center. This page will say that this installation package is intended for it professionals and developers. However, you can download this file safely. The following file is available for download from the Microsoft Download Center:

    Download the Windows XP Service Pack 3 package now

    See also: http://support.microsoft.com/kb/2497281
    You may be unable to access the site Web Windows Update in Windows XP, Windows 2000 or Windows Server 2003

  • Update of Windows XP does not work, error 0 x 80245003. Cannot be updated to SP 3, can't update IE 6 to IE 8. How to solve these problems?

    Update of Windows XP does not work. I tried the correction of the error 0 x 80245003 and nothing has changed. Fix, that it won't work because SP 3 is not installed, because of the Windows Update does not. I try to install SP 3 manually, then downloader windows will not install reference SP 2 must be installed. SP 2 is installed. So I tried several ways to solve this problem, and I keep running into roadblocks of Windows. Help, please.

    Hi my NameJoel,

    See the methods mentioned below and check if that helps.
     
    Method 1:
    How to troubleshoot an installation fails on Windows XP Service Pack 3
    Note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.
     
    Note: A firewall is software or hardware that checks information coming from the Internet or a network. Then the firewalleither blocks information or allows information to pass to your computer. If the information is blocked or throughdepends spent on your firewall settings. A firewall can prevent malicious software (such as worms) to access your computer through a network or the Internet. A firewall can also help stop your computer from malware sent to other computers. Windows XP, Windows XP Service Pack 2 (SP2) and Windows XP Service Pack 3 (SP3) include firewall software.
     
    See also:
    You cannot install updates from Windows Update, Microsoft Update, or by using the auto update after a repair of Windows XP after installing Windows XP SP3 immediately after a clean installation of Windows XP SP2 or
    http://support.Microsoft.com/kb/943144
     
    Steps to take before you install Windows XP Service Pack 3
    Note: Disable your antivirus software is not usually recommended, some software antivirus prevents certain system changing files. This can cause the Windows XP SP3 installation failure. To make sure that you manage to install Windows XP SP3, temporarily disable your antivirus software, including any third-party antispyware and firewall program. To do this, right-click on the icon for your antivirus program, and then click on disable. The antivirus program icon typically appears in the bottom right corner of the computer screen.
     
    Important: Make sure that you enable the antivirus software after you install Windows XP SP3.
     
    Hope this information helps.
  • Reformat and re-install XP SP2 but now struggling with the updates. Windows Update does not work. Loading SP3 will fix this?

    After repeated BSOD (FLTMGR_FILE_System 0x000000F5, 0 x 00000066, etc.) errors usually 7 to 8 minutes after the start, I reformatted the drive C: and re-installed XP SP2.  But since then, I had a very hard time updated.  I even got again the WORC and had to go back to a previous restore point after installing IE8.

    Windows Update does not work.

    [Error number: 0x8024400A]
    The website has encountered a problem and cannot display the page you are trying to view. The options provided below may help you solve the problem.

    For self-help options:

    To support options:

    Hello.

    Try the suggestions on this site:

    http://support.Microsoft.com/kb/836941

  • I am unable to run Windows Search. No matter how I open it, it says "Windows Search does not work."

    I am unable to run Windows Search.  No matter how I open it, it says "Windows Search does not work."

    What is Windows Desktop Search 4.0 that you have installed with your updates.

    If it is uninstall it from Add / Remove programs.

    The update is KB940157

    If it does not show then show updates is on top, use the method below.

    Click Start , type cmd.
    Now in the result of the research with right-click on cmd.exe and select run as administrator if you are not the administrator.
    Type regsvr32 /u "%programfiles%\Windows Desktop Search" and press enter

    You search old back, see if it works.

    The next time you do the Search 4.0 updates appears again.

    You can try it again if you wish.

Maybe you are looking for