Oops! I am doing a BIG mistake. we can assign only Map not object.
On Tue, Jun 22, 2010 at 11:09 AM, Steve Jobs <[email protected]> wrote:
> **I apologies for duplicate posting as I already have posted it on
> stackoverflow**
> I am facing problem with setting values of model (object) containing
> numeric properties. Here is the example:
>
> This code does not work:
>
> var modelSkeleton = {id: null, name: null};
> var model = rx.data.marshal.Json.createModel(modelSkeleton);
> var x = {id:22,name:"New name"};
>
> model.set(x);
>
> However if I put quotes on id value, it works:
>
> var modelSkeleton = {id: null, name: null};
> var model = rx.data.marshal.Json.createModel(modelSkeleton);
> var y = {id:"22",name:"New name"}
>
> model.set(y);
>
> Am I doing some mistake? Any solution?
> Thanks an advance
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel