开发者

Blackberry data binding?

I think I already know the answer, but does BB (5.0 or earlier) have any support data binding to fields?

For example, if I have a vector of items, could I bind that to a list (or some field) that will get auto-updated when new data is placed into the vector?

I'm thinking that is something I'd have to wri开发者_如何学编程te with the ListFieldCallback or it's equivalent in other fields.

Thanks


You could implement this using a homemade observer. (http://en.wikipedia.org/wiki/Observer_pattern) You could use a custom vector which was aware of the observer if you wanted to. I've done this before and it works.


Unfortunatelly such funcionality is not available right out of the box.

As a starting point to ListField implementaion on BB, take a look at Simple ListField example by peter_strange.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜