Skip to main content

setStyleProps crash -- setting resource and crash at runtime, what's wrong?

3 replies [Last post]
perkmobile_pn
Offline
Joined: 2008-06-27
Points: 0

I run into the following error when trying to run the simple HelloMidlet example in the LWUIT documentation:

using default style - no theme enabled(to enable a theme use - public void setStyleProps(Hashtable themeProps) method)

I believe this issue is with the following lines of code, where I attempt to access the resource:

try
{
Resources r = Resources.open("/myresources.res");
UIManager.getInstance().setThemeProps(r.getTheme("mytheme"));
}
catch (java.io.IOException e) {}

I've created a "myresource.res" file (which already contains the appropriate theme "mytheme") and added it to the root directory of my MIDLET project, but it doesn't seem to work. At runtime the app crashes and I'm given the error detailed above.

NOTE: I am testing on a Blackberry emulator and developing in the Blackberry JDE 4.3.0.

Any suggestions?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

This is unrelated to the code or the warning you got, please see the
discussion thread here:
http://forums.java.net/jive/thread.jspa?threadID=43015&tstart=30

Thanks,
Shai.

> NOTE: I am testing on a Blackberry emulator and developing in the
> Blackberry JDE 4.3.0.
>
> Any suggestions?
> [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=285503
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

perkmobile_pn
Offline
Joined: 2008-06-27
Points: 0

>This is unrelated to the code or the warning you got, please see the
>discussion thread here:
>http://forums.java.net/jive/thread.jspa?threadID=43015&tstart=30

I've gone through those steps (removed the appropriate files, made successful build), and [i]even[/i] participated in that discussion you referred me to.

Shai, are you saying this is something on my end? If I follow everything in that link that you sent I should have this issue in the Blackberry emulator? That all problems have since been solved?

Shai Almog

Sorry wrong link I meant to send this one with the message by Chen at
the bottom of the thread:
http://forums.java.net/jive/thread.jspa?messageID=278740

He explains where the issue is with the BB and some workarounds for
the current LWUIT drop. We will probably try to make this a smoother
process for a future drop of LWUIT.

Thanks,
Shai.

>> This is unrelated to the code or the warning you got, please see the
>> discussion thread here:
>> http://forums.java.net/jive/thread.jspa?threadID=43015&tstart=30
>
> I've gone through those steps (removed the appropriate files, made
> successful build), and [i]even[/i] participated in that discussion
> you referred me to.
>
> Shai, are you saying this is something on my end? If I follow
> everything in that link that you sent I should have this issue in
> the Blackberry emulator? That all problems have since been solved?
> [Message sent by forum member 'perkmobile_pn' (perkmobile_pn)]
>
> http://forums.java.net/jive/thread.jspa?messageID=285561
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net