MVC in wxPython HELP!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • meonimarco@gmail.com

    #1

    MVC in wxPython HELP!

    Hi to all.
    I woud implement MVC with wxPython. Is it possible? Is there anyone
    that have experience in this?
    The only correct example according to Observer Pattern that i found on
    web is not the formal implementation of MVC (is Document/View) and is
    implemented with gtk...
    How can i translate this gtk example in wx?
    Does exist a tutorial, a archive of example or anything about MVC in
    wx?
    Thanks all!
    Sorry for my "italian" english!

    The gtk example that i talk about in my previous message is here:


  • Diez B. Roggisch

    #2
    Re: MVC in wxPython HELP!

    meonimarco@gmai l.com wrote:
    [color=blue]
    > Hi to all.
    > I woud implement MVC with wxPython. Is it possible? Is there anyone
    > that have experience in this?
    > The only correct example according to Observer Pattern that i found on
    > web is not the formal implementation of MVC (is Document/View) and is
    > implemented with gtk...
    > How can i translate this gtk example in wx?
    > Does exist a tutorial, a archive of example or anything about MVC in
    > wx?
    > Thanks all!
    > Sorry for my "italian" english![/color]

    The problem here is that MVC is not a "thing" (or class or whatever) that
    can demonstrated once and for all, but a design concept for
    GUI-applications.

    You can do MVC in _all_ toolkits, and html, and even ncurses. Some toolkits
    have "support" built-in in the way that their more complex widgets - like
    tables or treeviews - expect a so-called model. That means that instead of
    having e.g. a table-row-object that you add to a table and that you fill,
    the table will query your model with an interface like this:

    class TableModel:
    def __len__(self):
    ....

    def column_count(se lf):
    ....

    def get_value(self, row, column):
    ....


    I have very limited experience with wx - but short googling reveals e.g.

    wx.lib.mvctree

    Note the (Basic)TreeMode l

    Basically, you should try and look for wx(Python)-examples that use tree or
    list widgets.

    Regards,

    Diez


    Comment

    • snoe

      #3
      Re: MVC in wxPython HELP!

      See this recent explanation by has:

      (The rest of the thread may lead you to more concrete examples as well.)

      Comment

      • Scott David Daniels

        #4
        Re: MVC in wxPython HELP!

        meonimarco@gmai l.com wrote:[color=blue]
        > Hi to all.
        > I woud implement MVC with wxPython. Is it possible? Is there anyone
        > that have experience in this?
        > The only correct example according to Observer Pattern that i found on
        > web is not the formal implementation of MVC (is Document/View) and is
        > implemented with gtk...
        > How can i translate this gtk example in wx?
        > Does exist a tutorial, a archive of example or anything about MVC in
        > wx?
        > Thanks all!
        > Sorry for my "italian" english!
        >
        > The gtk example that i talk about in my previous message is here:
        > http://www.pyj.it/sorgenti/2004/01/doc-view.zip
        >[/color]
        Can I just suggest you search in Google Groups for the message by
        "has" labelled "Re: MVC programming with python (newbie) - please help".
        Dated: 7 Jan 2006 07:03:04 -0800. It is one of the nicest short
        descriptions of the MVC pattern and why it works.

        The link I have is huge, but:

        thread/eb0be1531e01027 3/
        9b80e79d4706200 d?tvc=2&q=MVC+d aniels#9b80e79d 4706200d

        I've inserted returns at two points in the url directly after slashes,
        drop tose returns and the associated spaces.

        --Scott David Daniels
        scott.daniels@a cm.org

        Comment

        • has

          #5
          Re: MVC in wxPython HELP!

          If folk wish to post that spiel anywhere else, be my guest. Public
          domain and all that.

          has

          Comment

          • bwaha

            #6
            Re: MVC in wxPython HELP!

            > Can I just suggest you search in Google Groups for the message by[color=blue]
            > "has" labelled "Re: MVC programming with python (newbie) - please help".
            > Dated: 7 Jan 2006 07:03:04 -0800. It is one of the nicest short
            > descriptions of the MVC pattern and why it works.[/color]

            I'll second that !!!!


            Comment

            Working...