Hi,
I have a CRUD form to maintain account codes which has all the normal
navigation buttons. I have added a drop down list of the account codes with
keys of the record ids. The dropdown list loads correctly when the form is
loaded and shows a correct list of account codes. I have also set up code to
update the list whenever a record is added or deleted. I then added code to
update the current record on the form when a code on the drop down list is
selected - code follows :-
In my forms afterInit(self) :-
codes, keys = accountsBizobj.getAccountCodes()
self.AccountLookupLbl = dabo.ui.dLabel(self.basePanel, Left=184,
Top=65,Caption="Lookup")
self.AccountCodeDDL = dabo.ui.dDropdownList(self.basePanel, Width=60,
Height=20,
Left=184, Top=80, ValueMode="Key", Choices = codes, Keys = keys,
OnHit=self.codeDDLClick)
and then I have the following :-
def codeDDLClick(self, evt):
self.PrimaryBizobj.moveToPK(self.AccountCodeDDL.Value)
self.refresh()
def afterSave(self):
self.updateDDL()
def afterDelete(self):
self.updateDDL()
def updateDDL(self):
codes, keys = self.PrimaryBizobj.getAccountCodes()
self.AccountCodeDDL.Choices = codes
self.AccountCodeDDL.Keys = keys
Two problems are now occuring :-
1/ When I select an item in the drop down list the data on the
form is not updated.
2/ After adding a record, or deleting one, if I click on the drop
down list to display the account codes I get a correctly updated list
displayed, but my form the locks up (and I have to CTRL_ALT_DEL out of it).
I'm hoping I am doing something wrong here as a wx problem will mean
I'll have to adopt a different approach. Can anyone help me?
Thanks
Rodgy
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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/a01dbcaf33044ce3b4396f050e01d...@roger