开发者

How to save a long type data with Persistent Object on Blackberry?

开发者 https://www.devze.com 2023-04-09 09:41 出处:网络
I have a class DataContext to save data by Persistent Object. DataContext data = new DataContext(); data.set(\"edit\",myEditField.getText(); // 开发者_开发技巧ok

I have a class DataContext to save data by Persistent Object.

DataContext data = new DataContext();
data.set("edit",myEditField.getText(); // 开发者_开发技巧ok

but

data.set("date",myDateField.getDate()); // not accept for save long type.

How can I save myDateField with Persistent object ?


BlackBerry persistent objects can only store objects and a long is a primitive. Just use the Long wrapper object and store that with your PersistentObject.

0

精彩评论

暂无评论...
验证码 换一张
取 消