Hi Christopher. If you're trying to access the ID of an
opensocial.Person instance, getId() is the most preferred option.

You should never access the fields_ property directly. Instead, use
the getField method and pass in the constant associated with the field
you're trying to access, e.g.
owner.getField(opensocial.Person.Field.ID)

Cheers!
- Jason

On Oct 14, 9:26 am, Markitecht <[EMAIL PROTECTED]> wrote:
> hmmm thought of something:
>
> var owner = data.get('owner').getData();
> if (owner.getId()) {
>         uid = owner.getId();
>
> }
>
> Is this approach safer?
>
> -C
>
> On Oct 14, 12:20 pm, Markitecht <[EMAIL PROTECTED]> wrote:
>
> > My live app does not function any longer in the sandbox. I am using
> > OpenSocial 0.7 and have not modified the <Require
> > feature='opensocial-0.7' /> modulepref.
>
> > The error is that when i obtain the owner information, the obj_ object
> > belonging to the owner object does not exist anymore.
>
> > That data is now within fields_
>
> > Here's my code (from within a response handler that has been passed
> > 'data' of course):
>
> > old:
> > var owner = data.get('owner').getData();
> > if (owner.obj_.Id) {
> >         uid = owner.obj_.Id;}
>
> > new:
> > var owner = data.get('owner').getData();
> > if (owner.fields_.id) {
> >         uid = owner.fields_.id;
>
> > }
>
> > So my new code works on the sandbox, but my old code works in the live
> > environment. Which should I be pushing live? I don't want to break my
> > app by pushing unsupported code live.
>
> > thanks,
> > Christopher
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to