开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜