Ed Leafe wrote:
> On Apr 23, 2007, at 4:45 PM, Carl Karsten wrote:
> 
>> The code and cdxml should be 'really close' - I just need figure  
>> out how to tell
>> the cdxml engine how to find myObj.MyProp1, 2 and .swap().  That is  
>> what I need
>> help with.
> 
>       I don't understand the problem. You have two properties on some  
> object, and you want to bind the textboxes to them. So give the  
> objects unique identifiers (i.e. RegIDs), and bind the textboxes:
> 
The problem is I don't understand what you mean when you say
"give the objects unique identifiers (i.e. RegIDs)"

objects is plural?  that makes me think you are talking about the GUI objects.

If so, I did, and you didn't say it was wrong.  from the cdxml I posted:

<dTextBox sizerInfo="{...}"
Height="41"
designerClass="controlMix"
DataSource="myObj"
RegID="MyProp1"
DataField="MyProp1"></dTextBox>

but that doesn't work, so I am guessing that isn't what you mean.  So what 
objects are you talking about?

 > tx1.DataSource = self.Form.objRegID
 > tx1.DataField = "MyProp1"
 > tx2.DataSource = self.Form.objRegID
 > tx2.DataField = "MyProp2"

I don't know what tx1 is.  I think it relates to my dTextBox, but your use of 
quotes around .DataField but not .DataSource makes me think this should go in 
code somewhere, not the cdxml.

How about a concrete example building on what I posted at the start of this 
tread.  Or tell me that it is so far off the mark it isn't worth fixing and 
I'll 
start over.

> 
>       Then in the click handler, you write:
> 
> obj = self.Form.objRegID
> obj.MyProp1, obj.MyProp2 = obj.MyProp2, obj.MyProp1
> self.Form.update()
> 
>       Of course, if the handler is a method of the form, change the  
> 'self.Form' to 'self'.

What if the handler is myObj.swap()   At least that is what should be called 
when the button is clicked - so that makes myObj.swap() the handler, right?



_______________________________________________
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/dabo-users/[EMAIL PROTECTED]

Reply via email to