[Gambas-user] Bugreport: control content destroyed.

Benoit Minisini gambas at ...1...
Wed Jun 2 21:11:16 CEST 2004


On Tuesday 11 May 2004 20:07, nyarnon wrote:
> On Sun, May 09, 2004 at 10:24:54PM +0200, Benoit Minisini wrote:
> > On Saturday 08 May 2004 16:11, nyarnon wrote:
> > > Just an observation, query for confirmation.
> > >
> > > I use a form with a textbox control to retrieve userinput.
> > > I made form controls public.
> > >
> > > On another form following routine is used:
> > >
> > >   'calling form to input data
> > >   frmInputReq.ShowModal
> > >
> > >   'Now I test if a directory exists. If it does not exist it is
> > >   'created. After END IF the content of frmInputReq.TextBox1.Text
> > >   'remains unaltered.
> > >   'BUT! If the dir exists a warningbox is displayed and after
> > >   'END IF frmInputReq.TextBox1.Text is corrupt.
> > >   'Is Message.Warning corrupting stack?
> > >
> > >   IF IsDir(frmMain.strRootdir &/ frmInputReq.TextBox1.Text) THEN
> > >     Message.Warning("a warning that dir does not exist")
> > >   ELSE
> > >     MKDIR frmMain.strRootdir &/ frmInputReq.TextBox1.Text
> > >   END IF
> >
> > Could you send me a complete project so that I trace the interpreter to
> > see what happens ?
>
> Here you go, just put a breakpoint at the end of _new and run the form
> no enter an existing dir path. The program will warn that it exists and
> you will be dropped at breakpoint. Now 'watch' the content of
> frmInputReq.Textbox1.Text.
>

I should have fixed the problem. Instead of having crashed, you get the 
'invalid object' error message, as when the dialog is closed, the widgets 
included in the dialog are destroyed, and their associated Gambas objects 
become invalid.

> BTW Love to come to Paris, Die Zauberflöte is one of my favorites, but
> I'm afraid the distance is just a wee bit beyond budget. Any plans to
> go tour Europe? Porto or Lisbon would be fine :-)

It is not "Die Zauberflöte" from Mozart but "A Mid Summer Night's Dream" from 
Shakespeare :-)

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list