Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Fri Sep 18, 2020 4:11 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: The close event of a window does not work
PostPosted: Fri Jul 01, 2011 2:44 am 
Offline

Joined: Tue Mar 22, 2011 4:46 am
Posts: 28
Hi,

I've found this issue only after upgrading from v2011 r1 to v2011 r2.
I have a process that kills itself by calling "window1.close"

After the upgrade to 2011 r2 the process restarts when I do "window1.close"
I can close the process properly using the X button (top right of the window) or using the Task Manager.
Anyone else have this issue?

rb 2011 r2 on Windows 7


Top
 Profile  
Reply with quote  
 Post subject: Re: The close event of a window does not work
PostPosted: Fri Jul 01, 2011 10:16 am 
Offline

Joined: Mon May 30, 2011 12:56 am
Posts: 702
Quote:
I have a process that kills itself by calling "window1.close"


Only if you are lucky.
For that to work as you expect, you must have implicit instantation turned on, have no windows open except the one and only Window1, and have the app set to quit when the last window closes.

(If implicit instantiation is on, Window1.close will will close Window1, but may not close the COPY of it from which the code is run)

To close the window which is open, use self.close
To quit the app, also use app.quit


Top
 Profile  
Reply with quote  
 Post subject: Re: The close event of a window does not work
PostPosted: Sun Jul 03, 2011 1:02 am 
Offline

Joined: Mon Sep 22, 2008 9:01 pm
Posts: 61
http://docs.realsoftware.com/index.php/ ... n.AutoQuit


Top
 Profile  
Reply with quote  
 Post subject: Re: The close event of a window does not work
PostPosted: Mon Jul 04, 2011 3:08 am 
Offline

Joined: Tue Mar 22, 2011 4:46 am
Posts: 28
Thanks all for your replies/help.

I didn't know all these about "Close" event of a Window. Thanks for the lesson kermit.
I'm now using "self.close" to close the window of my application and Quit to close my application.

The weird is that the "close" event was always working before the upgrading (worked more than 10000 times).

Anyway I face another issue after upgrading. The f.exists (f As FolderItem) does not return True even if the file that f is pointing to exists.
Is there something I don't know about this also? :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group