menuform as standalone program

3 messages Options
Embed this post
Permalink
Jachym Cepicky

menuform as standalone program

Reply Threaded More More options
Print post
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

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Daniel Calvelo

Re: menuform as standalone program

Reply Threaded More More options
Print post
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.

On 3/27/07, Jachym Cepicky <[hidden email]> 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
> [hidden email]
> http://grass.itc.it/mailman/listinfo/grassgui
>


--
-- Daniel Calvelo Aros

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui
Daniel Calvelo

Re: menuform as standalone program

Reply Threaded More More options
Print post
Permalink
In reply to this post by Jachym Cepicky
As of SVN r344, it starts a new window all by itself.

Cheers,

Daniel.

On 3/27/07, Jachym Cepicky <[hidden email]> 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
> [hidden email]
> http://grass.itc.it/mailman/listinfo/grassgui
>


--
-- Daniel Calvelo Aros

_______________________________________________
grassgui mailing list
[hidden email]
http://grass.itc.it/mailman/listinfo/grassgui