Dialog_Box function fails. Stumped. Please help. (OpenInsight Specific)
At 13 JUN 2001 04:59:50AM Oystein Reigem wrote:
What can keep the Dialog_Box function from doing its job?
I have a dialog box ("DIALOG_LIST_OR_COMBO") that I use several places in my new app. It's worked well so far. Now I need it in a new place, but here I can't get it to run. Stepping with the Debugger I can see execution reaching the sentence where it's called:
RetVal=Dialog_Box( "DIALOG_LIST_OR_COMBO", @Window, InitParam )
but no dialog appears, and the returned value is null.
The dialog's got a commuter function. I've tried with a debug statement as the first statement of the commuter. In the successful cases the Debugger kicks in, but not in the problematic one.
The dialog's initially invisible, to avoid a visible jump when the CREATE handler decides from the InitParam's where on the screen to put it. But I've tried with visible too, and there's not so much as a flicker.
Neither can I see any trace of "DIALOG_LIST_OR_COMBO" when I check with the System Monitor.
Can it be one of Dialog_Box's parameters?
It can't be the first parameter. All the calls to Dialog_Box( "DIALOG_LIST_OR_COMBO", … ) are done through one certain function, and it's the exact same sentence that is executed in all cases. And the name of the dialog as a literal, as you can see. So if one case failed, all cases would.
It can't be the second parameter. I've checked with the debugger, and it's got the proper window name all right. Admittedly the window is an MDI frame, but I can't see there's room for any confusion. All calls are done from the frame's commuter function. Also there's always just one instance of that frame.
And I can't believe it's the third parameter. It's an @FM- and @VM-delimited thing, containing a hundred bytes or so. Nothing really different from the successful cases. And no foreign characters.
Can it be resources? I don't think so. I've tried checking resources immediately before the call to Dialog_Box, with calls to the GetFreeSystemResources function, which return 90 for all three kinds of resources. Also the circumstances under which the dialog is run successfully and when it fails are very similar.
So I'm stumped. Any ideas are welcome!!
- Oystein -
At 13 JUN 2001 07:42AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Hi Oystien
Have you checked Get_Status() to see is there's any clues in that?
World leaders in all things RevSoft
At 13 JUN 2001 08:37AM Oystein Reigem wrote:
Sprezzatura,
Close enough! It was an earlier call to a different function (Extract_SI_Keys) that had failed and left the error status set. Because of that Dialog_Box just gave up without even trying.
Agenda: (1) Surrounded both calls (Extract_SI_Keys and Dialog_Box) with Set_Status(0) and Get_Status(…) calls. (2) Scan all code for other occurrences of unguarded SSP calls.
Thanks a lot!!!!
- Oystein -
At 13 JUN 2001 10:58PM Steve Botes wrote:
Oystein,
Just got back from a roadshow in Chicago. The new items from Revelation are exciting. But, my real reason for this post was to let you know that there was a consensus that your posts are much appreciated. I can say for myself and I am sure others….. thanks.
Oy was singled out but from me this goes to everyone that posts both looking for help and with help….
At 14 JUN 2001 04:43AM Oystein Reigem wrote:
Steve et al,
Thank you for the kind words. Pity I haven't got the time to attend the roadshow.
- Oystein -