I think there is already a bugzilla report open for this. Please search 
there in the first instance.

Cheers,

Sebastian


dperez schrieb:
> Hi
> 
> You can add your requirement to the wishlist:
> http://qooxdoo.org/documentation/wishlist
> 
> 
> Ralf Nieuwenhuijsen wrote:
>> I've already found the solution by looking at the source package. For
>> those
>> wondering (searching the docs and or forum for the same info). Inheritance
>> is now done like:
>>
>>     qx.OO.defineClass ('Phrase', qx.ui.basic.Atom, Phrase);
>>
>> About the localization issues (having to subclass every component in the
>> framework), i've come up with a wishlist/feature-request:
>>
>>    1.  A LocalizationManager. Which has just two properties (HtmlHandler
>> and
>> TextHandler). These properties contain functions. By default they are
>> assigned the id-function (return the input as output).
>>    2. Have all widgets use these handler for all user-supplied text and
>> html.
>>    3. Have all widgets update themselves using the handler _again_ when an
>> LocalesChangedEvent occurs.
>>
>> The idea is that by default the widgets behave the same as they do now.
>> But
>> we can optionally create a special handler function that comes between all
>> the visible text. This way one can use a central store for all text, or
>> translate it on the fly using some internet translation service, or if you
>> feel like it, spell check it. Auto-format certain common expressions, etc.
>>
>> My guess is that it would concern the following Widgets: atom, label,
>> button, window (the title), groupbox, radiobox, combo-box, menu-item,
>> pop-up, tooltip.
>> Typical usage would be:
>>
>>   qx.locales.getInstance().setHTMLHandler (function (name) {
>>     if (name ==  "SayHi" && lang == "en") return "Hello, world";
>>     elseif (name == "SayHi && lang == "nl") return "Hallo, wereld";
>>   });
>>   v = new qx.ui.basic.Atom ("SayHi");
>>
>> Off course, I've simplified the handler a bit. In reality you would have
>> some javascript associative-array there.
>> Advantages:
>>   - seperate content from the code (perhaps getting the content from a
>> database)
>>   - add languages by supplying extra language-packs
>>   - underline certain words in text mode, etc.
>>
>> Off course you would need to take care of all the details yourself, but at
>> least you only have to take care of it once.
>> The only workaround currently possible to add these kinds of behaviour is
>> by
>> subclassing all the widgets you use.
>>
>> Maybe something for QooxDoo 6.1 ?
>>
>> Greetings,
>> Ralf N.
>>
>> 2006/8/21, Ralf Nieuwenhuijsen <[EMAIL PROTECTED]>:
>>> The approach used for object inheritance seems to have been changed with
>>> 0.6 (rc1)
>>> So how does it work now?
>>>
>>> This is a simplified example of what I use now:
>>>
>>> function Phrase (key, icon)
>>> {
>>>   qx.ui.basic.Atom.call (this, null, icon);
>>>   Session.connectPhrase (this, 'label', key);
>>> }
>>> Phrase.extend ( qx.ui.basic.Atom, 'Phrase' );
>>>
>>> It's actually used to create atoms of which the label is looked-up from a
>>> json-loaded-table, and which gets updated when the user switches his
>>> language-choice. (i.e. clicks a dutch or english flag).
>>>
>>> I actually have a big set of classes that just inherit a core Qooxdoo
>>> class but lookup their name, icon and tooltip from the database. (the
>>> whole
>>> language-pack is cached though, when you switch language, another
>>> language-pack is loaded).
>>>
>>> But this does make me wonder, will qooxdoo ever support localization out
>>> of the box?
>>> My current trick is not that clean, since for every widget I use that
>>> contains text, I need to subclass and connect it. Perhaps there is a
>>> smart
>>> way?
>>>
>>> Greetings and thanx in advance...
>>>
>>> Ralf Nieuwenhuijsen
>>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to