Ed Leafe wrote:
> On Jan 24, 2007, at 5:18 PM, Uwe Grauer wrote:
>
>> I tried to add a property "ParentForm" to a childform to be able
>> to call createForm("myform.cdxml", ParentForm=self) in my parentform.
>> So, if they have types we should add all python types.
>>
>> Not very nice for a dynamic language.
>
> Why would this be a property? Sounds like a simple attribute to me.
Paul told me that i could do in createForm by using properties.
This looked somehow cleaner to me.
Of cause, i can stick with the way i did it before.
>
> Anyway, the other reason for specifying the type is if you have a
> default value. Since everything gets typed in the dialog as a string,
> I need to be able to format it correctly when generating the class
> code. The difference between these two statements:
>
> self.MyProp = "42"
> -and-
> self.MyProp = 42
>
> ... depends on being able to know if the value you entered is a
> string or an int. If you don't set a default value, you don't need to
> specify a type.
Ok, that clears it up.
>> One more:
>> Should i be able to use the property like self.ParentForm in my
>> childform?
>> Doesn't seem to be working.
>
> If there is an error in the code, the property definition will fail,
> and of course it won't be available. But otherwise, yes, you should
> be able to reference it just like any other property.
>
There are errors at least in Classdesigner:
http://dabodev.com/tracker/0288
Thank's,
Uwe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev