Latest messages

6 topics, 10 messages
Kutil » Bug in Encoder.java

Hi,

There seems to be a bug in the Base64 decoder. For example, passing the following string into the decoder:

AAAATgAAAAUAAAAZAAAABQAAAE4AAAAhAAAA//////////8AGQAAAAAAB1BhdHJpY2sAAAAAAAAAAAAAAAA=

Produces (byte values separated by comma):

0,0,0,78,0,0,0,5,0,0,0,25,0,0,0,5,0,0,0,78,0,0,0,33,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,0,

25,0,0,0,0,0,7,80,97,116,114,105,99,107,0,0,0,0,0,0,0,0,0,0,-1,-1,16

But the correct bytes are:

0,0,0,78,0,0,0,5,0,0,0,25,0,0,0,5,0,0,0,78,0,0,0,33,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,0,

25,0,0,0,0,0,7,80,97,116,114,105,99,107,0,0,0,0,0,0,0,0,0,0,0,0

(Note the -1, -1, 16 sequence at the end)

In addition, shouldn't the minus character (last character) in the hash be a forward slash '/'?

Will.

Kutil » error creando una lista dimanica

la siguiente excepción se lanza en el momento de crear una lista dinámica a partir de un item de otra lista dinámica creada previamente

alguna sugerencia? gracias

java.lang.IllegalArgumentException
        at org.kalmeo.util.LinkedList.add(LinkedList.java:410)
        at org.kalmeo.kuix.core.model.DataProvider.addItem(DataProvider.java:391)
        at com.elibom.market.j2me.midlet.frames.DetallesPedidoEditarFrame.addItem(+40)
        at com.elibom.market.j2me.midlet.frames.DetallesPedidoEditarFrame.cargarDatos(DetallesPedidoEditarFrame.java:110)
        at com.elibom.market.j2me.midlet.frames.DetallesPedidoEditarFrame.onAdded(DetallesPedidoEditarFrame.java:91)
        at org.kalmeo.util.frame.FrameHandler.pushFrame(FrameHandler.java:164)
        at com.elibom.market.j2me.midlet.frames.PedidosFrame.onMessage(PedidosFrame.java:67)
        at org.kalmeo.util.frame.FrameHandler.processMessage(FrameHandler.java:253)
        at org.kalmeo.kuix.core.Kuix.callActionMethod(Kuix.java:608)
        at org.kalmeo.kuix.widget.ActionWidget.processActionEvent(ActionWidget.java:115)
        at org.kalmeo.kuix.widget.ActionWidget.processKeyEvent(ActionWidget.java:82)
        at org.kalmeo.kuix.core.focus.FocusManager.processKeyEvent(FocusManager.java:275)
        at org.kalmeo.kuix.widget.Screen$2.processKeyEvent(Screen.java:313)
        at org.kalmeo.kuix.core.KuixCanvas$2.run(KuixCanvas.java:295)
        at org.kalmeo.util.worker.Worker.run(Worker.java:164)

Kutil » error when creating a dynamic list

java.lang.IllegalArgumentException
        at org.kalmeo.util.LinkedList.add(LinkedList.java:410)
        at org.kalmeo.kuix.core.model.DataProvider.addItem(DataProvider.java:391)
        at com.elibom.market.j2me.midlet.frames.SucursalesClienteFrame.addItem(+40)
        at com.elibom.market.j2me.midlet.frames.SucursalesClienteFrame.cargarDatos(SucursalesClienteFrame.java:79)
        at com.elibom.market.j2me.midlet.frames.SucursalesClienteFrame.onAdded(SucursalesClienteFrame.java:67)
        at org.kalmeo.util.frame.FrameHandler.pushFrame(FrameHandler.java:164)
        at com.elibom.market.j2me.midlet.frames.ClientesFrame.onMessage(ClientesFrame.java:59)
        at org.kalmeo.util.frame.FrameHandler.processMessage(FrameHandler.java:253)
        at org.kalmeo.kuix.core.Kuix.callActionMethod(Kuix.java:608)
        at org.kalmeo.kuix.widget.ActionWidget.processActionEvent(ActionWidget.java:115)
        at org.kalmeo.kuix.widget.ActionWidget.processKeyEvent(ActionWidget.java:82)
        at org.kalmeo.kuix.core.focus.FocusManager.processKeyEvent(FocusManager.java:275)
        at org.kalmeo.kuix.widget.Screen$2.processKeyEvent(Screen.java:313)
        at org.kalmeo.kuix.core.KuixCanvas$2.run(KuixCanvas.java:295)
        at org.kalmeo.util.worker.Worker.run(Worker.java:164)

Kutil » Multi Threading through Worker with synchronization

Hi,

WorkerTask are executing serialy, in this case if your actions a done only in those task there no problem of synchronization.

But it's right that it's not realy in the same time. What sort of task do you want to do in the same time ?

Kutil » Multi Threading through Worker with synchronization

Hi All !

    I want to use worker in a very synchronized way for handling various tasks in the same time. Can any body tell me How to have more interactivity through Worker and WorkerTask ?

    Thanking You in Advance.

 

Kutil » Question : Frame.onMessage evolution capacities

The reason is that Frames aren't only designed to be used with Kuix. I'd like the concept of Frame and I would add the possibility to use it not only to intercept Kuix user actions.

The power of frames is to be able to hide or not special message (event) process in a very simple way. For example, it could be possible to use the frame concept to process Socket or Bluetooth binary réception. In this case the identifier could be an Integer or what else, it depends of the implemented protocol.

In Kuix use, String are needed, because of the XML origin of the actions. But for pure java use we can save memory by using smallest objects.

In an ideal way we could imagine to change te signature to Frame.onMessage(Object identifier, Object data). And in this case data could be a String[] (Kuix use) or byte[] (raw data extract from a socket or BT connection) or everything that could be an Object.

Kutil » Question : Frame.onMessage evolution capacities

Yeah, I guess it wouldn't hurt. If using string identifiers only on more cast is needes so sit should work with only minor changes to existing code. If I may enquire as to what is the reason for this change ? Or what can be done with the added flexibility ?

Kutil » Question : Frame.onMessage evolution capacities

After a big reflexion about Frame evolution capacities, I want to ask your opinion about a possible change of the onMessage signature :

from Frame.onMessage(String name, Object[] arguments) to Frame.onMessage(Object identifier, Object[] arguments).

In this case, it will be possible to use Frame with a more fexible identifier (instead of name String).

 

This decision could affect your work ... then what do you think about that ?

Kutil » Worker and WorkerTasks
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.
Kutil » Worker and WorkerTasks
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.