• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
First trials in Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

First trials in Cocoa app


  • Subject: First trials in Cocoa app
  • From: Remco Poelstra <email@hidden>
  • Date: Wed, 8 Sep 2010 10:21:59 +0200

Hi all,

I'm very new to Cocoa and I'm trying to build my first app after reading and doing tutorials.
I've a view with a UITextView on it and a button. When I press the button I want to call a third party C library which sends out and UDP packet searching for devices on the network. The responses of the devices are reported back with a callback that I've to supply.
In the callback I want to store the string information in a NSMutableString and then update the UITextView with that string.
I've a few problems: How can I pass a method from an object to the C library as callback? I'm currently using the NSViewController to define the method/callback.
If that's not possible, how can I define a function that can reach the objects of my application? The ViewController is stored in the ApplicationDeletegate, but I can't find any reference to that object.
I've defined the NSMutableString as a global in the viewcontroller header file, is that a good idea given the MVC design pattern?
Hope someone can get me started on this one.

Kind regards,

Remco Poelstra

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: First trials in Cocoa app
      • From: Dave Carrigan <email@hidden>
  • Prev by Date: why textFieldShouldBeginEditing is called twice in iOS4?
  • Next by Date: Compress/decompress NSStrings or NSData
  • Previous by thread: why textFieldShouldBeginEditing is called twice in iOS4?
  • Next by thread: Re: First trials in Cocoa app
  • Index(es):
    • Date
    • Thread