Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-24-2005, 03:09 PM
Member
 
Join Date: May 2003
Posts: 35
Default wnd.close() weakness

I was under the impression that the wnd.close() method would kill the application on the spot but it doesn't.

I have a script that has few database call. If an db error occurs, an error method is called to display a dialog box with the appropriate db error message and then close the application with wnd.close() when the dialog box is dismissed.

Funny thing is the calling script then continue to execute after the wnd.close() is issued.

I know that for a fact because I have a log mechanism that output db and other transaction into a text file and the wnd.onClose method is using it to output information when the application close. While onClose output the proper info, I can also see in the log file that other outputs occured after onClose was executed.

To ensure that the rest of the script won't execute I added a return statement after the error method call. This solved my problem.

I had a good look at the help file and couldn't find a method that would actually "kill" the application so any scripts or method in process would stop excuting right away.

Is swfkit provides a "kill" method?
Reply With Quote
  #2 (permalink)  
Old 06-27-2005, 02:18 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:wnd.close() weakness

The close() method just post a WM_CLOSE message to the main window which won't be received by the main window until the current script is finished. So you must add a return clause after the close method to make the script stop immediately.

We will add a Kill method in the new version to kill any processed.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:48 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.