Discussion:
[GRASSGUI] menuform as standalone program
Jachym Cepicky
2007-11-14 22:56:49 UTC
Permalink
Guys,
I'm not able to run menuform.py as stand-alone program.

menuform.py r.stats


Two windows are always opend.

Target:

if self.parent == None:
# add new tab here and
from wxgui_utils include GMConsole
console = GMConsole(.....)
this.notebook_tab.append(console)

so first step: how to start menuform from command line, so that it has
self.parent = None ?

thanks a lot

jachym
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
Daniel Calvelo
2007-11-14 22:56:49 UTC
Permalink
Hi Jachym.

Well, it does run, only it starts with an empty Frame from which it
starts its mainFrame.

The refactoring I started yesterday is meant to remediate that. In
fact, mainFrame should be a wrapper around a wx.Panel, in which all
the logic would be embedded. That way, it could even be inserted in,
say, a window alongside the display manager, or a gismanager tab.

Another objective is to make menuform.py flexible enough to be fed
arbitrary grass_task descriptions, with arbitrary default and
prefilled arguments. In fact, the current use of the grass_task
structure for representing the command is arbitrary, and perhaps not
the best.

I'm on it... Since there is demand :) I'll prioritize the Frame/Panel
separation and standalone operation.

Details:

You can't start with self.parent=None because GUI.parseCommand opens
its own mainFrame, to which the parent is passed, and it must exist.
But mainFrame is a Frame, not a Panel, so you must parent it to some
Window. Currently that other Window is another (empty) mainFrame. I
added the "Testing purposes" comment as a bit of a joke on the
matter...

Daniel.
Post by Jachym Cepicky
Guys,
I'm not able to run menuform.py as stand-alone program.
menuform.py r.stats
Two windows are always opend.
# add new tab here and
from wxgui_utils include GMConsole
console = GMConsole(.....)
this.notebook_tab.append(console)
so first step: how to start menuform from command line, so that it has
self.parent = None ?
thanks a lot
jachym
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
_______________________________________________
grassgui mailing list
http://grass.itc.it/mailman/listinfo/grassgui
--
-- Daniel Calvelo Aros
Daniel Calvelo
2007-11-14 22:56:49 UTC
Permalink
As of SVN r344, it starts a new window all by itself.

Cheers,

Daniel.
Post by Jachym Cepicky
Guys,
I'm not able to run menuform.py as stand-alone program.
menuform.py r.stats
Two windows are always opend.
# add new tab here and
from wxgui_utils include GMConsole
console = GMConsole(.....)
this.notebook_tab.append(console)
so first step: how to start menuform from command line, so that it has
self.parent = None ?
thanks a lot
jachym
--
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
_______________________________________________
grassgui mailing list
http://grass.itc.it/mailman/listinfo/grassgui
--
-- Daniel Calvelo Aros
Loading...