Subject Re: closing mdi app with menu
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Tue, 18 Feb 2020 05:26:02 -0500
Newsgroups dbase.getting-started

Paolo,

I have the following lines in a reset.prg that I use to restore the IDE to normal when I'm designing an app...

// Release any application menu, enabling a return to the default dBASE design menu
if type("_app.framewin.root") # "U"; _app.framewin.root.release(); endif        

That should do the trick in getting rid of the app menu (assuming that you attached it to _app.framewin rather than a form)

Andy  

> It\'s a very strange thing that such a problem has remained open for YEARS.
> It\'s not possible that following the tutorial trying to learn the basic of building an app with dbaseplus language i have to waste a lot of time in such a big bug.
>
> As you suggested I put some few lines of code in the _app.framewin.app.close()
>
>          f = new Form()
>          f.open()
>          f.release()
>
> and, even if i dont know why, now the app doesnt hang anymore but the standard menu and toolbar of dBASE IDE are not restored untill i click on the navigator window.
>
> Thanks
>
> Paolo Baranzoni
>
>
> Lee Grant Wrote:
>
>
> > Paolo,
> >
> > That\'s been a problem eve from previous versions of dBASE...as I
> > discovered when I did it, in dBASE 11... you have to have some form be
> > able to be opened, otherwise the application hangs as you describe or in
> > my case sometimes crashed the program trying to get it to do something
> > with the \"Not Responding\" message in the Title bar.
> >
> > Lee
> >
> > On 2/17/2020 6:01 AM, Paolo Baranzoni wrote:
> > > I have some problems building an mdi app with a simple menu.
> > > I\'m following the dBASE PLUS tutorial.
> > > I have just 4 files: start.prg, setup.prg, main.mnu and GenericMdiApp.cc
> > > These 4 files are almost the same as written in the tutorial.
> > > I have no forms because i just want to test the start/close of the program.
> > > Menu file has just one item, the exit item.
> > > But when i exit the program clicking on the exit menu item and want to come back to dBASE PLUS IDE, the menu is not restored, is still that of the app, and, if i try to open a file in the editor, IDE halts and waits ONE MINUTE before opening the editor and then the IDE menu is restored.
> > > Same behaviour with dBASE 2019 and dBASE PLUS 12.3.1
> > > In dBASE PLUS 2.8 IDE doesnt halt but menu is restored only after opening a file in the editor.
> > >
> > >
> >
>