> public void commandAction(Command c, Displayable s) {
> ========================================================
> out.writeUTF( "Boki Back Msg" );
> out.flush();
> ========================================================
> }
How do you obtain "out" in this case? Do you use the samme Connection
calls you do in the posted run() method?
boki - 23 Mar 2005 12:35 GMT
> > public void commandAction(Command c, Displayable s) {
> > ========================================================
[quoted text clipped - 5 lines]
> How do you obtain "out" in this case? Do you use the samme Connection
> calls you do in the posted run() method?
Yes, I use the same conector.open
> Hi All,
> I try a bluelet demo, I change some code here, I want to move
[quoted text clipped - 5 lines]
>
> to a soft key event, but it never work ( exception error is 0 / null )
Right there's your answer, but you didn't write out the actual error so
I have to assume it. You're getting a null pointer exception. Think
about it for a minute: what could be null in the following code block?
> public void commandAction(Command c, Displayable s) {
> ========================================================
> out.writeUTF( "Boki Back Msg" );
> out.flush();
> ========================================================
> }

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard
Boki - 24 Mar 2005 15:20 GMT
Yes, it is a null pointer exception, you are right.
but, what could I do...
the variables define in try {} will be deleted when process exit.
Should I keep the try { c=connector.open(XXX) .........} live?
Best regards,
Boki.
"Darryl Pierce" <mcpierce@gmail.com>
???????:2%y0e.51707$c72.25105@bignews3.bellsouth.net...
>> Hi All,
>> I try a bluelet demo, I change some code here, I want to move
[quoted text clipped - 16 lines]
>> ========================================================
>> }
Darryl Pierce - 26 Mar 2005 05:06 GMT
> Yes, it is a null pointer exception, you are right.
>
[quoted text clipped - 3 lines]
>
> Should I keep the try { c=connector.open(XXX) .........} live?
That depends on your application's needs. If the connection needs to be
used for more than a single method invokation then you need to have a
reference to it somewhere so it can be accessed from those other locations.

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard