From: jamesr <cir...@gm...> - 2004-09-14 04:29:55
|
I was perhaps not specific enough in that I would like a volunteer or two to experient with the framework i have, and report to the list in general as to your opinion of it. It represents the (text only) portion of a standard way of laying out python card program that would be created and edited in a gui framework (!) in a future iteration. the setup allows for a clean seperation of different gui elements and it is especially for a code generation developemtn environment that attaches python code to the larger strucuture sensibly. Any one with experience in python card and is willing to listen to <5 minutes of explanation would suffice. At this point i think having some peer-review is my only chance to have such a setup realistially considered by the group. Please email cir...@gm... if you will beta test. I appreciate the support, James. On Mon, 13 Sep 2004 20:48:31 -0700, pyt...@li... <pyt...@li...> wrote: > Send Pythoncard-users mailing list submissions to > pyt...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > or, via email, send a message with subject or body 'help' to > pyt...@li... > > You can reach the person managing the list at > pyt...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pythoncard-users digest..." > > Today's Topics: > > 1. Calendar component will use datetime (Kevin Altis) > 2. wrapping wx.Notebook (Kevin Altis) > > --__--__-- > > Message: 1 > Date: Mon, 13 Sep 2004 15:13:11 -0700 > From: "Kevin Altis" <al...@se...> > To: "pythoncard-Users" <pyt...@li...> > Subject: [Pythoncard-users] Calendar component will use datetime > > This is just an FYI that I plan to have the Calendar component support > the new wxPython datetime methods that will be in wxPython 2.5.2.9 and > later. I've already checked in some changes so that calendar events now > have a date attribute and there is also a date attribute. If you have > one of the wxPython 2.5.2.9 daily builds installed then you can see the > methods at work in the widgets sample: > > >>> comp.calCalendar.date > datetime.date(2004, 9, 13) > >>> import datetime > >>> comp.calCalendar.date = datetime.date(2004, 9, 20) > > http://starship.python.net/crew/robind/wxPython/daily/20040910/ > CHANGES.html > > "Extended the wx.calendar.CalendarCtrl class with methods that get/set > a Python datetime or date object. (These will only work with Python > 2.3+) The methods are PySetDate, PyGetDate, PySetLowerDateLimit, > PySetUpperDateLimit, PySetDateRange, PyGetLowerDateLimit, and > PyGetUpperDateLimit. Also, CalendarEvent was extended with PySetDate > and PyGetDate methods." > > http://docs.python.org/lib/module-datetime.html > > ka > > --__--__-- > > Message: 2 > Date: Mon, 13 Sep 2004 16:41:30 -0700 > From: "Kevin Altis" <al...@se...> > To: "pythoncard-Users" <pyt...@li...> > Subject: [Pythoncard-users] wrapping wx.Notebook > > From an earlier message: > "It is probably time for a separate discussion thread on the issues and > possible solutions such as treating each page as a type of child window > where only the components of the child window resource are used. I'm > just brainstorming here. You would end up with a separate source and > resource file for each tab/page. I guess the references to each tab > layout would end up being something like > self.components.notebook[0].components.field1, etc. where each page > (window) of the notebook is referenced via a list." > > I sat down after the earlier posts about Notebook and did some > experiments. I created a Notebook component and made a simple sample > that uses the Notebook component and then manually adds a Panel with a > TextCtrl to the notebook. That worked fine and the resourceEditor > worked with the Notebook component too on the first try, though of > course there weren't any page attributes to complicate matters. Then I > started trying to add existing backgrounds as pages in the > on_initialize method. You can't add a wx.Frame as a notebook page and > PythonCard backgrounds subclass wx.Frame so that didn't work. > > I was able to get it to work by making a PageBackground class that is > almost identical to Background except that instead of a wx.Frame it > subclasses wx.Panel. Of course, many of the features of a Background > don't make any sense for a notebook page, so I commented out the > menubar, statusBar, and all of the events except idle. I had to make > some further tweaks to the event binding and dispatch to correctly deal > with the notebook pages without breaking events in Background and > CustomDialogs, but it all seems to be working now. I made a sample that > uses the minimal and widgets backgrounds without any changes except > that instead of model.Background, the Minimal and WidgetsTest > background subclass model.PageBackground. > > Since this was a fairly quick "hack" I hesitate to check it into cvs > without some discussion on the subject. > > If we went with a solution like this I would probably modify the > resourceEditor to support a new PageBackground template type. A > PageBackground is basically going to be like a Background, but there > won't be any menus, statusBar, etc., otherwise the .rsrc.py files will > be almost identical to keep things simple. You would edit each page of > the notebook separately just like you do different backgrounds today. > If and when the resourceEditor is changed to allow editing of multiple > windows at once that would be a little less clunky. > > The notebook component wouldn't have an attribute list for all the > pages, instead you would add those manually by calling addPage, most > likely in your on_initialize method. I made a pageWindow function that > is almost identical to the childWindow function so that adding a page > looks something like this: > > page = model.pageWindow(self.components.notebook, minimal.Minimal) > self.components.notebook.AddPage(page, 'minimal', True) > > Since I didn't hide the wxPython methods behind a list interface, > accessing a elements of the child pages look like: > > print self.components.notebook.GetPage(0).components.field1.text > > So, will people be happy with this kind of solution? Any alternative > suggestions? If I check this into cvs does anyone have a app or dialog > they've been wanting to do that needs a wx.Notebook so we would have a > decent test case to flesh out other issues? > > ka > > --__--__-- > > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > End of Pythoncard-users Digest > |