Ed Leafe wrote:
On Jan 17, 2006, at 1:24 PM, Don Taylor wrote:


Are you setting RegID for every control? The vast majority of controls will never need or use a RegID; it will remain blank. Only those controls which need to be referenced from somewhere else ever need a RegID. The philosophy is that if objects need to communicate with each other, there needs to be an absolute, unambiguous and reliable method for such communication. Let's say that the control with the fully-qualified pathname above has the RegID of 'street'; any object can now interact with it by using 'self.Form.street'. Sure, it could also use 'self.Form.mainPageFrame.pgAddress.pnlTop.txtStreet', but that requires an awful lot more tight coupling between the controls and the form. If another programmer were to later rename 'mainPageFrame', say, to something else, the long path name is now broken, whereas the RegID reference is still intact.

I don't know about Dabo's concepts of page frame's etc... In fact, Dabo's gui internals are completely opaque to me. Now that you have stated some rules then I can carry on, but ...

I am reluctant to expose my ignorance any further here, but I had thought that you might be doing something like this under the covers (this is Boa Constructor generated code):

self.textCtrlMsgFolder = wx.TextCtrl(id=wxID_YGSGUITEXTCTRLMSGFOLDER, name='textCtrlMsgFolder', parent=self.panel1, pos=wx.Point(5, 5),
              size=wx.Size(659, 28), style=0, value='Message folder')

Boa only makes me think up one name and then uses it in three different ways. I don't think that this leads to the qualified pathname problem that you describe, but I could be wrong. (YGSGUI in the wxID above is derived from the name of the frame which is 'YgsGui')

Don.


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users

Reply via email to