• 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: Charles Srstka <email@hidden>
  • Date: Sun, 10 Oct 2010 19:37:15 -0500

On Oct 10, 2010, at 12:11 PM, Jason Slack-Moehrle wrote:

> 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

That document is out of date. If you want to convert to 64-bit, you’ll probably need to convert to a bona-fide Cocoa application, since I believe that not only the GUI functions but the Carbon event mechanism itself is no longer supported in 64-bit. You’ll need a Cocoa run loop, and so you might as well write the whole GUI in Cocoa, and incorporate the lower-level non-GUI code from your existing code base where appropriate.

Charles_______________________________________________

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

References: 
 >Identifying Cocoa Methods (From: Jason Slack-Moehrle <email@hidden>)
 >Re: Identifying Cocoa Methods (From: Quincey Morris <email@hidden>)
 >Re: Identifying Cocoa Methods (From: Jason Slack-Moehrle <email@hidden>)

  • Prev by Date: RE: NSDictionary allValues not mutable
  • Next by Date: Trouble binding against transient Core Data property
  • Previous by thread: Re: Identifying Cocoa Methods
  • Next by thread: Re: Identifying Cocoa Methods
  • Index(es):
    • Date
    • Thread