Working With Online Searches

Discussion in 'Mac Programming' started by Blakeasd, Mar 21, 2011.

  1. Blakeasd macrumors 6502a

    Joined:
    Dec 29, 2009
    #1
    Hello Everyone,
    I would like to be able to take a cocoa text box and place it in my application so that when the user clicks search the text box goes to an online text box, searches and finds the data to display in a Cocoa control. For example how can I take a text box so that when a user types something in it searches youtube and displays it in some sort of object. I have never done any type of web work before, so I don't know where to start.
    Thanks
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
  3. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
  5. PatrickCocoa macrumors 6502a

    Joined:
    Dec 2, 2008
    #5
    Let's All Smile

    Cocoa has smiley faces now? I guess they're aiming at a younger crowd.
     
  6. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    If i'm talking about functions in english and not writing a block of code i never use code tags. Maybe noparse tags would work to prevent smilies but keep the text in-line instead of putting it in a box? I don't know. Let's see: I want to talk about initWithContentsOfURL:options:error:. Yep, noparse seems to do it. Maybe I'll be able to remember that in the future. It seems like maybe autosmilying could be turned off on the programming subforums? We're always getting method signatures smilitized because of the : separator.

    Also, I'm not totally crazy, the OP originally asked about documents to look at, i didn't just throw that out there unsolicited. They must have edited their second post. Oh well.

    -Lee
     
  7. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009
    #7
    I did change the second reply to thanks, but I think I wrote too soon. I downloaded the GData stuff from Google, but I cam across several problems. The GData Obj-c framework has 2000 + errors so I think I am going to go the NSXMLDocument route. How can I use this method to get Youtube video searches. I would then like to visualize this data in a cover-flow like view, so will this NSXMLDocument way still work?
    Thanks!
     
  8. jiminaus, Mar 22, 2011
    Last edited: Mar 22, 2011

    jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #8
    I used to religiously add noparse tags, until I noticed there's a "disable smilies in text" checkbox amongst the additional options when replying. But perhaps noparse tags are more friendly for when someone quotes you.
     
  9. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #9
    NSXMLDocument will only parse the XML response into a tree-link data structure. You'd need to extract the required information from the tree.

    It looks the media:thumbnail elements will give you links to the thumbnails of the videos and and the media:title elements will you give the video titles. You'd need to extract this information from each of the entry elements.

    I haven't tried to get NSXMLDocument is parse of these responses. I hope it won't complain about an undeclared media XML namespace.
     
  10. Blakeasd thread starter macrumors 6502a

    Joined:
    Dec 29, 2009
    #10
    Never worked with any web stuff, do you know of any documentation or tutorials?
    Thanks
     

Share This Page