Larry;
I'm not sure I understand. In the Class Designer I set the
datatfield to stateprov for the drop down list. I assumed it passed what
ever was selected in the drop down to the database on save.
So even a static (for lack of a better phrase) drop down needs to be bound
to the bizobj in order to be wrtten to the database on save?
Thanks for your reply
Carey
On Sun, Jul 12, 2009 at 4:01 PM, <[email protected]> wrote:
> Hello Carey,
>
> When you instantiated the dropdown did you bind it to the bizobj?...ie
> something like...
> statesdropdown = your_dDropdownList(self, DataSource = bizobject,
> DataField = "state_id_field")
>
> Larry Long
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Carey Gagnon
> > Sent: Sunday, July 12, 2009 2:31 PM
> > To: [email protected]
> > Subject: [dabo-users] Very Simple dropdownlist
> >
> > My apologies if this goes out twice. I posted to the nabble
> > forum before realizing I needed to subscribe to the mailing list.
> >
> > ## As Posted On Nabble ##
> >
> > 1st off, thanks to the developers of dabo. I'm a n00b to
> > python, wxpython and dabo. With the help of this forum and
> > the step by step guide I have managed to get everything in
> > said guide working as expected. I've even managed some simple
> > modifications as I learn dabo et al. There's one modification
> > I just can't wrap my head around that I will want to use once
> > I start developing my own app.
> >
> > Here's the problem. In the step by step the input field for
> > stateprov is currently set to a dTextBox. I would like to
> > change this to a dDropdownList.
> > I don't want to set up another db table just to do this (I've
> > got populating a drop down from the db down no problem). I
> > just want a static drop down list that will add the selected
> > state from the drop down list to the stateprov field of the
> > client table of the database (MySQL) on save. (one mod I
> > managed was an Add Client form)
> >
> > I've looked at the test in the uiwx/dDropdownList.py file and
> > have created the following via the CD. The code is located in
> > the ClientAddForm-code.py
> > file:
> >
> > def afterInit(self):
> > #def initProperties(self): ## Commented out
> > locations = ({"state": "Ak", "iid": 1},
> > {"state": "Ga", "iid": 2},
> > {"state": "Tx", "iid": 3})
> >
> > choices = []
> > keys = {}
> > for location in locations:
> > choices.append("%s" % (location['state']))
> > keys[location["iid"]] = len(choices) - 1
> > self.Choices = choices
> > self.Keys = keys
> > self.ValueMode = "key"
> >
> > The drop list with choices displays in the form no problem,
> > but when I save to the database the selection is not added to
> > the stateprov field.
> >
> >
> > H E L P ! ! !
> >
> > Thanks in advance
> > Carey
> >
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]