Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Nov 17, 2019 8:09 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Window.Open does not work until after a MsgBox call
PostPosted: Fri Feb 18, 2011 3:33 pm 
Offline

Joined: Thu Feb 17, 2011 8:20 pm
Posts: 5
My app must be run from a logon script enforced by an AD GPO. As a result it runs after the user logs in but before the OS launches the Windows Explorer app. My app does not initially open a window. It crashes when it reaches the Window.Open statement. My app does not crash under any of the following circumstances:

In the same GPO call a VBScript first that opens a dialog using MsgBox.
The VBScript that is opening my RB app first opens a dialog using MsgBox.
My RB app first opens a dialog using RB's MsgBox call before the Window.Open call.

It appears that something has to be done to kick start the windowing system, and calls by VB or RB do this when their respective MsgBox functions are used, but the call to Window.Open is not doing the same initialization.

Am I missing an important step? Is this something I can fix?

Greg Schumacher
Computer Guy


Top
 Profile  
Reply with quote  
 Post subject: Re: Window.Open does not work until after a MsgBox call
PostPosted: Fri Feb 18, 2011 3:55 pm 
Offline

Joined: Thu Feb 17, 2011 8:20 pm
Posts: 5
A little more info....

As a test, I set the window as the default for the app, with Visible set to false. When executed manually the app behaves as desired. When executed during the logon process the app crashes at the Window.Visible = true statement.

Greg Schumacher
Computer Guy
Head Scratcher


Top
 Profile  
Reply with quote  
 Post subject: Re: Window.Open does not work until after a MsgBox call
PostPosted: Fri Feb 18, 2011 6:20 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
What kind of exception is crashing it? I'd bet dollars to doughnuts that it's a NilObjectException. I'd guess that you're right in thinking that the Window Manager needs to be initialized somehow and that RB's built-in window functions are not doing it. Maybe playing with CreateDialog and EndDialog as a temporary workaround?

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Window.Open does not work until after a MsgBox call
PostPosted: Fri Feb 18, 2011 6:29 pm 
Offline

Joined: Thu Feb 17, 2011 8:20 pm
Posts: 5
When it crashes my RB app does not present an error dialog. It just silently terminates, though there is an Event Viewer entry that makes no sense to me. It is included below.

wtest.exe
1.0.0.0
4d0a4684
wtest.exe
1.0.0.0
4d0a4684
c0000005
00152148
10e0
01cbcfb1c0e551cf
\\sea.ddb.com\SysVol\sea.ddb.com\scripts\wtest.exe
\\sea.ddb.com\SysVol\sea.ddb.com\scripts\wtest.exe
ff202643-3ba4-11e0-b491-544c7f1e3010

I'll investigate CreateDialog and EndDialog. Thanks for the recommendation.

Greg Schumacher
Head Scratcher


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