[GRASSGUI] menuform as standalone program

Daniel Calvelo dca.gis at gmail.com
Tue Mar 27 17:58:24 EDT 2007


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.

On 3/27/07, Jachym Cepicky <jachym.cepicky at gmail.com> wrote:
> 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
>
> _______________________________________________
> grassgui mailing list
> grassgui at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassgui
>


-- 
-- Daniel Calvelo Aros




More information about the grass-gui mailing list