Hi Guilherme,

Guilherme Aiolfi wrote:
> Hi Alex,
> 
> thanks for your anwsers.
> 
> "Important: These checks are only added in the source version."
> 
> So, in the build version qx.ui.basic.Label.$$properties.content.check will
> return null?
In the build version you'll get the same result. What I meant is that in 
the build version these checks aren't executed. So you won't get any 
warning/error if you hand in an integer value to a property which only 
accepts strings. These warnings will only be displayed in the source 
version. Nevertheless, the keys of the properties are present.

> I'm just asking because I can't really test it right now and I'm really
> curious.
I've tested it :)

cheers,
   Alex


> 
> On Wed, Dec 3, 2008 at 6:51 AM, Alexander Back <[EMAIL PROTECTED]>wrote:
> 
>> Hi Guilherme,
>>
>> my first answer fast obviously too fast. There is a possibility to get
>> the value of the "check" key.
>>
>> This
>>
>> --snip--
>> qx.ui.basic.Label.$$properties.content.check
>> --snip--
>>
>> will the value of the "check" key of the "content" property of the label
>> class.
>> One thing is important: the "$$properties" is attached at the class not
>> at the instance of a label. If you want to get the value having an
>> instance you need to use
>>
>> --snip--
>> myLabelInstance.constructor.$$properties.content.check
>> --snip--
>>
>> since the class is accessible through the "constructor" key of the
>> instance.
>>
>> cheers,
>>   Alex
>>
>> Alexander Back wrote:
>>> Hi Guilherme,
>>>
>>> Guilherme Aiolfi wrote:
>>>> How do I get the "check" value of a property?
>>>>
>>>> I want to know if it should expect "String", "Integer", etc.
>>> The "check" value of a property gets transformed into a check within the
>>> setter of the property. So there is no possibility to get the type the
>>> property accepts - as least I do not know about one.
>>>
>>> For example the setter of the "content" property at "qx.ui.basic.Label"
>>> will incorporate the following
>>>
>>> --snip--
>>> var msg = "Invalid incoming value for property 'content' of class
>>> 'qx.ui.basic.Label'";
>>> if (value !== null)
>>> {
>>>    if (!(qx.core.Assert.assertString(value, msg) || true))
>>>    {
>>>       prop.error(this, 5, "content", "set", value);
>>>     }
>>> }
>>> --snip--
>>>
>>> if the check will have the value "String".
>>>
>>> Important: These checks are only added in the source version.
>>>
>>> cheers,
>>>    Alex

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to