BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/index.php)
-   Developer Forum (http://www.blackberryforums.com/forumdisplay.php?f=15)
-   -   Problem while storing Float object in persistent storage (http://www.blackberryforums.com/showthread.php?t=2017)

Tom 11-04-2004 01:23 PM


Gothalyptic 11-04-2004 01:41 PM


bfrye 11-04-2004 02:14 PM


rimzim 01-03-2005 01:52 AM

Problem while storing Float object in persistent storage
 
Im trying to store the java.lang.Float object in the Persistent storage. It is raising an Exception NonPersistentObjectExcetion & JVM 525 error - Bad persistent object.

Right now, Im using JDE 4.0.

Can anybody help me regarding the same?
Quick reply is much much appretiable.

-Abhijit

jcomeau_ictx 01-04-2005 07:45 AM

Have you tried casting it as an Object? That's just off the top of my head.

jcomeau_ictx 01-04-2005 01:45 PM

Actually, after taking some time to look at their example code, using a DataOutputStream layered over a ByteArrayOutputStream might be a better way to go, using writeFloat() rather than writeInt() as the example shows in addScore().

(added later)... sure enough, the docs for RecordStore show its addRecord() and getRecord() as dealing with byte arrays. Maybe you were using an older version of the documentation? You have to use the one in the 4.0 JDE, the one on their website is outdated. And the link inside the JDE is broken, so you have to use the one on the start menu Start -> Research in Motion -> Blackberry JDE 4.0 -> API Reference.


All times are GMT -5. The time now is 01:04 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.