Bo
Moderator
337 messages 2008-04-15 |
%I18N_KEY% will be replace by it's i18n corresponding value in /i18n/message.properties or /i18n/message.XX.properties
${myProperty} and @{myProperty} do basicly the same thing : extract a value from a DataProvider given while calling loadScreen or loadXml methods by invoking myDataProvider.getValue("myProperty"). The main difference reside in the life time of the linkage between the widget where to put the value and the DataProvider.
${propertyName} is converted to its value only at parse time. No linkage between the Widget and the DataProvider is kept.
@{propertyName} is converted to its value at parse time and a the widget is binded to the DataProvider if not nul. The main goal of this feature is to be able to change the value directly in the DataProvider and it generate automaticaly the update on all binded widgets. THe concept go forward because you can mix more than one property in an attribute definition.
For exemple :
<text>
<_text>${prop1} any text @{prop2} any text @{prop3}</_text>
</text>
In this example prop1 was converted at parse time. And the Text widget is binded to the DataProvider on prop2 and prop3. Then if one of the two properties change the text is updated.
|
|
tsyvanpe
54 messages 2008-04-14 |
Thank you very much for the quick reply. I'll try this out tomorrow. A follow-up question came to mind. What is the difference of parsed properties, I mean the difference of @{...}, ${...} and %...% ?
|
|
Bo
Moderator
337 messages 2008-04-14 |
With 0.9.1 there's two way to use your own widgets.
- Override the KuixConverter and override the convertWidgetTag() method as you did. And in your widget class override the setAttribute() method to catch your special attributes.
- Simply add the custom widget name (case sensitive) in the xml like that : In this case the class org.mypackage.TestWidget will be automaticaly created. And like the way 1 override the setAttribute() method to catch yout own attributes.
CAUTION : parsed properties like @{...}, ${...}, %...% are ignored while use this syntax :
You need to use this syntax :
<widget>
<_myAttribute>@{value}</_myAttribute>
</widget>
|
|
tsyvanpe
54 messages 2008-04-14 |
Aah.. Sorry, seems that the xml tags got stripped.. The widget in xml was: <testwidget value="@{customvalue}" />
|
|
tsyvanpe
54 messages 2008-04-14 |
I've managed to create my own custom widget by extending the Widget class and adding my on custom KuixConverter class which returns the correct widget from convertWidgetTag. But how can I add support for custom attributes which use a DataProvider to the widget defined via the xml file ?
For example a widget .
How can I get the value attribute updated via the DataProvider ?
|
|
Bo
Moderator
337 messages 2008-04-14 |
Hi,
Actualy, all tasks are removed when the worker is stopped. It's right it is not necessary the best way because KuixMIDlet already stop and resume the worker if the app is paused.
In the next kutil release this will be fix by adding a new method removeAllTasks() to the worker and kept the tasks list while invoking the stop method.
|
|
tsyvanpe
54 messages 2008-04-14 |
I'm trying to use the Worker and WorkerTask to run background tasks on my application. When I call Worker.instance.stop() do the pushed tasks get automatically removed ? So am I doing it right if in my KuixMIDlet I push a task and start the worker in my onStarted method and when onPause gets called I stop the worker and in onResumed I push the task again and start the worker ? At least it seems that only one task gets pushed when doing things like this.
|
|
Benjamin
Moderator
13 messages 2008-04-11 |
Kalmeo welcomes all Kuix developpers!
We hope that Kuix will help you to create efficiently new mobile applications. However, if you have some improvements ideas, feel free to post in this forum. We will take them into consideration for further releases.
|
|
Benjamin
Moderator
13 messages 2008-04-11 |
With the new licensing policy, a new release of KUtil has been released.
It adds a converter method for integers and shorts to and from bytes array in org.kalmeo.util.NumberUtil.
|
|
Benjamin
Moderator
13 messages 2008-04-11 |
According to our open source strategy, KUtil is now released under GPL.
You can now download the full source code of this library.
|
|
Benjamin
Moderator
13 messages 2008-04-11 |
Kuix 0.9.1 has been released. It include several improvements like enhanced loading screen support, extended CSS capabilities and widget customization support.
Important note: this release is NOT COMPATIBLE with kuix 0.9.0. If you want to upgrade your old midlet with Kuix 0.9.1, you will need to move your code from our old Canvas class to the midlet (were 2 abstract methods were added). Please, refer to the CHANGELOG file in the package for more informations.
The tutorial section has also been updated to reflect the structural changes.
|
|
Bo
Moderator
337 messages 2008-04-11 |
Today the a new release of Kuix (0.9.1) is out. It is not decribe in change log, but it fix a bug with sub menu that can produce memory leaks.
|
|
tsyvanpe
54 messages 2008-04-11 |
Urgh.. Sorry about that. Posted a bit too soon. It seems that when I called the removeFrame(instance), and then pushed it again, the onAdded - method gets called each time. And the screen object was loaded each time it was called. Just changed the method so that it only loads the screen from the xml file the first time onAdded is called.. Sorry for the confusion.
|
|
tsyvanpe
54 messages 2008-04-11 |
Am I doing something wrong, or have I stumbled upon a possible memory leak.
I have a very simple test app where from the initial canvas I call:
Kuix.getFrameHandler().pushFrame(TestFrame.instance);
This will show the frame test, now in test frame there is nothing else in the xml layout than one menu entry which takes you to the next screen by calling:
Kuix.getFrameHandler().pushFrame(Test2Frame.instance);
Now on the second screen there is a menu entry which takes you back to first screen by calling:
Kuix.getFrameHandler().removeFrame(instance);
and (in onRemoved() method):
TestFrame.instance.showScreen();
As you can see the basic structure is the same as in kaprice.
Now just by going back and forth between these two frames, the available memory decreases and eventually I get an OutOfMemoryException.
Am I doing something wrong, or is there something to it ?
|
|
Bo
Moderator
337 messages 2008-04-10 |
Hi, in the demo, the background color is realy light. Maybe the color is not visible on your E51 or not in the color palette of your phone. Does the problem persist if you change the bg-color by red ?
|
|