Hi,

I just worked myself nearly through the whole PyCon2010 tutorial and I
think I understood some basic concepts.

As a training for a first very simple session I tried the following:

I have a very simple sqlite-table with four columns: ID, NR, NAME and
COMMENT while ID is for internal reference only and is the primary key..
The table is quite short, it has about 10 entries. I have a form with a
dropdown for NR and a text-entry for NAME and COMMENT. When the
applicatin starts the text-boxes stay empty and the dropdown-list is
filled with all entries of "NR"

What I'd tried to establish was, that a selection of a specific NR in
the dropdown loads the particular record into the text-fields of NR and
COMMENT - quite simple, or? For ID and NR I used the concept of:
http://wiki.dabodev.com/HowToPopulateAndUseListControls

I ended up with the following code in the onHit-method of dDropdownList:

def onHit (self, evt):
    myBizobj = self.Form.getBizobj("MYBIZOBJ")
    myBizobj.moveToPK(self.Value)        # Value is the Key and hence
the PK of my table
    self.Form.requery()

so far so good! But the problem is, that each time I change value of the
dropdown the application asks. if I want to save the changed data!

Is there a nicer way to perform such a simple task, or is my chosen way
ok by using "dBizobj.moveToPK"? How can I get rid of the question if
changes shall be saved?

many thanks
Leo

_______________________________________________
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]

Reply via email to