main logo
Subject: Re: Close form on ESC
Author: Sal Brasko
Posted: 2001/06/12 19:56:24
 
View Entire Thread
New Search


OK, this one is solved:

don't ask me why, but my cbizObjForm did not have cToolbarClass property at all. Instead it had cToolbar.

All I did was I created cToolbarClass in cbizObjForm and put iNavToolbar there and deleted the code from CreateToolbar class in ibizObjForm (this one I copied for debuging purposes) so the method will get inhereted.

After that, iNavToolbar gets properly created.

Thanks James for giving me hints and directing me in right direction.

I was looking at the CreateToolbar method in cBaseForm: IF !EMPTY(THIS.cToolbarClass) - it wasn't looking in cToolbar at all. I guess somehere in the past who ever maintained this code before me, screwed up?

I'm still wondering about different behaviour when run from EXE and source code. When run from source, iNavToolbar was created properly. When run from EXE - it didn't.

<i><font color="#113300">
Greetings Sal,
Sounds to me like it is not really getting created.
Put a debug mark next to the .ADD() line and follow it through.
</font></i>
<i><font color="#663300">Immediately after the line

IF goApp.oToolbars.Add(This.cToolbar)

I put
WAIT WINDOW "It's been added"
WAIT WINDOW loToolbar.Name

then I added ELSE to this IF and WAIT WINDOW "It's not been added"

When run from source code, I see 2 WAIT WINDOWs: It's been added and oiNavToolbar.
When run from EXE, I see WAIT WINDOW It's been added and after that no second one.

</font></i>


 
©2001 Sal Brasko
<-- Prior Message New Search Next Message -->