Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

2.7a - 5333 in App:Quit()

28 views
Skip to first unread message

Carlos Vazquez

unread,
Jun 2, 2004, 5:10:10 AM6/2/04
to
Hi all,
after recompiling to 2.7a from 2.6 i've discovered some weird behaviour.
In the following code if the user does not login successfully, SELF:Quit() causes the app
to terminate. This is causing a 5333 error to arise if the app is an external EXE (not
within the IDE). Not much trouble, as the app really terminates and this is the desired
behaviour in this case.

METHOD Start() CLASS App
LOCAL oFW AS FacWindow
LOCAL oLogin AS w_Login

... stuff
oFW := FacWindow{ SELF } //The shellwindow
... stuff
oLogin := w_Login{ oFW }
oLogin:Show()
IF oLogin:loginOk
SELF:Exec()
ELSE
SELF:Quit()
ENDIF
RETURN

Changing SELF:Quit() to oFW:EndWindow() solves the problem and the 5333 error no longer
appears.

IF oLogin:loginOk
SELF:Exec()
ELSE
oFW:symModo := #NoQueryClose // bypass QueryClose
oFW:EndWindow()
ENDIF

Perhaps this info is useful for someone.
It took me some hours to find out what shxy&ż?lń# piece of code cause the 5333.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net


Michael Rubinstein

unread,
Jun 2, 2004, 8:58:17 AM6/2/04
to
Carlos, what happens if you skip SELF:Quit() and just do nothing in the
ELSE part?

Michael

"Carlos Vazquez" <cvaN...@telefonica.net> wrote in message
news:2i5jrmF...@uni-berlin.de...

Carlos Vazquez

unread,
Jun 2, 2004, 10:46:11 AM6/2/04
to
Michael,
I've tested it right now and the answer is: another 5333 appears.
Another test: Calling App:Quit() after App:Exec() (for example, from the menu) terminate
the app with no error.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Michael Rubinstein" <mr_SPAM...@mrubinstein.com> escribió en el mensaje
news:2i6136F...@uni-berlin.de...

> > It took me some hours to find out what shxy&¿?lñ# piece of code cause the

Michael Rubinstein

unread,
Jun 2, 2004, 11:49:27 AM6/2/04
to
Carlos, EndWindow() sends WM_CLOSE message, that is processed in
Window:Dispatch() by calling QueryClose() and ,depending on the result of
QueryClose(), Window:Close() and Window:Destroy(). Since you don't want
QueryClose() you should be better off by calling Destroy() directly, instead
of EndWindow(). Close() should be called automatically since you don't enter
the main loop. I would place oFW:Destroy() outside tne IF/ENDIF.

HTH, Michael

"Carlos Vazquez" <cvaN...@telefonica.net> wrote in message

news:2i67hoF...@uni-berlin.de...

Carlos Vazquez

unread,
Jun 2, 2004, 12:38:07 PM6/2/04
to
Michael,
after some testings I decided to keep using EndWindow() because Destroy() don't call
Close(), and I need Close() to be called to do some cleaning.
I am still wondering why Quit() caused the 5333...
Thanks for your time.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Michael Rubinstein" <mr_SPAM...@mrubinstein.com> escribió en el mensaje

news:2i6b45F...@uni-berlin.de...

Nathan Robeson

unread,
Jun 2, 2004, 3:27:03 PM6/2/04
to
Carlos,

You may need an Axit() method within the FacWindow{} class to clean
something up

Using the debugger to step through might be helpful to isolate the trouble
spot.

Nathan

"Carlos Vazquez" <cvaN...@telefonica.net> wrote in message
news:2i5jrmF...@uni-berlin.de...

> It took me some hours to find out what shxy&¿?lñ# piece of code cause the

Phil McGuinness

unread,
Jun 2, 2004, 4:53:30 PM6/2/04
to
Carlos,

Does the function call _Quit() work any better.

I vaguely remember once deploying this for a similar issue to what you
describe on an application I had running as a NT service.

Phil McGuinness - Sherlock Software
---


Carlos Vazquez

unread,
Jun 3, 2004, 3:06:27 AM6/3/04
to
Nathan,

Thanks for your ideas.
I didn't realized previously that I can put my cleanup code into Axit() instead of
Close().
But after testing the Axit() way, surprise: the Axit() method is not called (at least
_DebOut32() inside it is ignored ¿?) - perhaps because it is the Axit of the ShellWindow??
Sincerely, I have no much time to spend on it, once I found a workaround.

METHOD Init() class FacWindow
...stuff
RegisterAxit( SELF)
RETURN SELF
METHOD Axit() class FacWindow
_DebOut32( String2Psz( 'Axit called' ) ) <---- DbgView dont catch this
return

As for the debugger, believe me that I got drunk yesterday using the debugger trying to
find out the offending piece of code. The results were erratic, nonsense. But being that
at that app stage very few code is executed I commented out almost everything until my
nose touched self:Quit().
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Nathan Robeson" <nathan@_nospam_voicecue.com> escribió en el mensaje
news:10bsaf5...@news.supernews.com...

Mario Schulz

unread,
Jun 2, 2004, 11:50:33 AM6/2/04
to
hi !

i cannot tell you the solution. i want to remark, that we have this too up
VO2.6 till now. i seemed to be not a part of Vo2.7(a)... we disable this way
and the 5333er gone...

bye,
Mario


Carlos Vazquez

unread,
Jun 3, 2004, 3:16:34 AM6/3/04
to
Phil,

Yes, _Quit() terminates the app without causing a 5333.
BTW, I looked for it in the help, but I can't find it.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Phil McGuinness" <hey...@sherlock.com.au> escribió en el mensaje
news:2i6t35F...@uni-berlin.de...

Carlos Vazquez

unread,
Jun 3, 2004, 3:27:00 AM6/3/04
to
Mario,
this is new for me because I've been using the same login routine in the Start() method
since 2.0, 2.5 and 2.6 without any problem until 2.7a.
I remember to copy it from the SSA.
But, as I said, no much problem. I found a workaround.
Greetings.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Mario Schulz" <concept...@removethisforspamfreenet.de> escribió en el mensaje
news:40becfe0$0$26132$9b62...@news.freenet.de...

Phil McGuinness

unread,
Jun 3, 2004, 3:48:24 AM6/3/04
to
Carlos,

Good it works.
I knew I have it my code for reason... and from memory it was to stop the
inexplicable 5333 !

snip[ I looked for it in the help ]

There's your first mistake. <g>
Your second mistake is if you can find it, trusting what it says !

Willie Moore

unread,
Jun 3, 2004, 8:27:07 AM6/3/04
to
Carlos,
_quit() is an undocumented function that will stop the app imidiately.

Regards,

Willie

"Carlos Vazquez" <cvaN...@telefonica.net> wrote in message

news:2i81ioF...@uni-berlin.de...

Carlos Vazquez

unread,
Jun 3, 2004, 1:21:30 PM6/3/04
to
Thanks Willie.
--
Carlos Vazquez
c...@NOSPAMtelefonica.net

"Willie Moore" <wil...@wmconsulting.com> escribió en el mensaje
news:bMEvc.2172$1s1....@bignews4.bellsouth.net...

Ginny Caughey

unread,
Jun 3, 2004, 3:00:13 PM6/3/04
to
Willie,

I assume from the discussion that _quit() doesn't fire any Axits and that is
why the 5333s disappear. I still think it would be best to find out the
cause of the 5333 though.
--
Ginny

"Willie Moore" <wil...@wmconsulting.com> wrote in message
news:bMEvc.2172$1s1....@bignews4.bellsouth.net...

Phil McGuinness

unread,
Jun 3, 2004, 6:29:56 PM6/3/04
to
Willie,

snip[ _quit() is an undocumented function that will stop the app
immediately. ]

Windows has been able to do that for years !!

Phil McGuinness - Sherlock Software

-------

"Willie Moore" <wil...@wmconsulting.com> wrote in message
news:bMEvc.2172$1s1....@bignews4.bellsouth.net...

Nathan Robeson

unread,
Jun 3, 2004, 8:58:35 PM6/3/04
to
Carlos,

The Axit may need to be in some other class that is contained in the
FacWindow Class. I am glad you have a workaround.

Nathan

"Carlos Vazquez" <cvaN...@telefonica.net> wrote in message

news:2i80vpF...@uni-berlin.de...

Willie Moore

unread,
Jun 4, 2004, 4:00:01 AM6/4/04
to
Ginny,

Agreed!

Regards,

Willie

"Ginny Caughey" <ginny.caug...@wasteworks.com> wrote in message
news:2i9aqcF...@uni-berlin.de...

0 new messages