• 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
Re: Identifying Cocoa Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying Cocoa Methods


  • Subject: Re: Identifying Cocoa Methods
  • From: Jason Slack-Moehrle <email@hidden>
  • Date: Sun, 10 Oct 2010 10:11:26 -0700

Quincey,

>> I know that I need to write C-ACllable Wrapper Functions for the Cocoa stuff that I need, but I am not sure how to identify what I need to do.
>>
>> Example. I know that I will probably need to use NSOpenPanel and NSSavePanel. So I need to write a C-Callable Wrapper for the parts of NSSavePanel that I would use? Like: setTitle, setMessage, etc, etc?
>
> I don't think anyone can tell you the best way to proceed, since it depends on so many factors.
>
> Abstractly, I think I'd encourage you to operate at the highest level possible. So, rather than wrapping individual methods, as you seem to be suggesting above, rather transfer into pure Obj-C code for the entire task of handling the open or save dialog, passing in a structure of context information if you need to do something like configure the standard dialog or filter with delegate methods.
>
> That might ease your task by letting you use a natural Obj-C idiom for the Cocoa parts. Also, if you change the rest of (or, more of) the application to Cocoa later, you're not stuck with the task of re-re-converting the Carbonish Cocoa wrappers.

Good Advice for sure. I was thinking along this line:

http://developer.apple.com/legacy/mac/library/documentation/Cocoa/Conceptual/CarbonCocoaDoc/CarbonCocoaIntegration.pdf

Best,
-Jason

_______________________________________________

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: Identifying Cocoa Methods
      • From: Charles Srstka <email@hidden>
References: 
 >Identifying Cocoa Methods (From: Jason Slack-Moehrle <email@hidden>)
 >Re: Identifying Cocoa Methods (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSDictionary setValue KVO
  • Next by Date: Re: How did gcc handle synthesized atomic vs custom nonatomic setter/getter?
  • Previous by thread: Re: Identifying Cocoa Methods
  • Next by thread: Re: Identifying Cocoa Methods
  • Index(es):
    • Date
    • Thread