Hello Arne,

I have posted a question here but haven't heard anyone from google
yet. Can you please help.

http://groups.google.com/group/opensocial-orkut/browse_thread/thread/6cc6cc9afbb66173

Thanks

Nemesh

On Jul 4, 7:34 am, "Arne Roomann-Kurrik (Google)"
<[EMAIL PROTECTED]> wrote:
> We worked this out in the IRC room but I wanted to post the answer
> here in case someone else found this thread wondering the same thing
> (sorry for the chatlog transcript, but I didn't want to misrepresent
> what was said):
>
> <kurrik>
> the response of that will be an object like { "<user id>" : <key,value
> data> }
> if the user doesn't have any data, I don't believe that they will show
> up in that object
> so if nobody has that data, then you should get  { } back
>
> <PSobota>
> ok.. would that object have any name or it's a dynamically created
> object?
>
> <kurrik>
> just dynamically created - should be what you get out of the getData()
> call
> if you set data, you should see something in there
>
> <PSobota>
> { "<user id>" : <key,value data> } is this a dictionary of
> dictionaries? what would be this called?
>
> <kurrik>
> you can think of it that way
> in js, it's all just "objects"
> but objects <==> dictionaries for the most part
>
> <PSobota>
> i am looking for a way to test whether that has nothing inside.. but
> looks like js doesn't have a dictionary syntax
> like.. have i gotten {} back? init the data to some string
>
> <kurrik>
> I see
> hm, I'm actually surprised that I wasn't able to find a better way to
> do this
> assuming the response is called "obj"
> var keys = 0;
> for (var i in obj) if (obj.hasOwnProperty(i)) keys++;
> if (keys == 0) {
>    <init the data>
>
> }
>
> On Jul 3, 1:04 pm, Pedro Sobota <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > Is there a way to check what data type is being returned from my
> > dataResponse.get(key).getData() calls?
>
> > From the docs:
>
> > "Calling dataResponse.get(key).getData() returns the actual response
> > data for a successful request. Here are response data types associated
> > with common requests:
>
> >     * When you request the viewer or owner, you get an
> > opensocial.Person object back.
> >     * When you request a group of friends, you get an
> > opensocial.Collection of opensocial.Person objects."
>
> > I am requesting a storage value and it would make sense to receive a
> > null should there be no value stored with that name, but I get instead
> > an object that doesn't equal to false, null or anything else, and that
> > I can't check the type of, and a false hadError(), meaning the
> > response was sucessful.
>
> > Thanks,
>
> > Pedro Sobota- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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