• 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: Using Authorization Services with a Factored Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Authorization Services with a Factored Application


  • Subject: Re: Using Authorization Services with a Factored Application
  • From: Chris Hanson <email@hidden>
  • Date: Mon, 15 Dec 2003 22:56:46 -0600

On Dec 14, 2003, at 11:05 PM, Simone Manganelli wrote:
The compiler always throws an error unless I declare my tool to be a subclass of NSObject, at the very least. That's the only way I've found around the problem, anyway.

It sounds like you're a little mixed up here.

Your tool is a Mach-O executable. It isn't a class. Its entry point is main() just as with any other C program. This also isn't in a class. You don't have access to class constructs like "self" in code that isn't part of a class.

Your tool can *contain* whichever classes you want. Classes are declared within @interface ... @end blocks and defined within @implementation ... @end blocks.

Am I making any sense? I really don't have any experience in this area, but this is what I understand from what I've figured out.

You are making sense; I think you're a little mixed up object-oriented programming and Objective-C. I suggest a quick review of some of the Objective-C overview documentation; that should clear up why you can't use "self" outside a class context, among other things.

-- Chris

--
Chris Hanson <email@hidden>
Weblog: http://www.livejournal.com/users/chanson/
Resume: http://bdistributed.com/people/cmh/resume.html
Looking for work developing Java or Mac OS X applications
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Using Authorization Services with a Factored Application (From: Oleg Svirgstin <email@hidden>)
 >Re: Using Authorization Services with a Factored Application (From: Simone Manganelli <email@hidden>)

  • Prev by Date: Re: Using Authorization Services with a Factored Application
  • Next by Date: NSView -setHidden: and Jaguar Compatibility
  • Previous by thread: Re: Using Authorization Services with a Factored Application
  • Next by thread: Re: Using Authorization Services with a Factored Application
  • Index(es):
    • Date
    • Thread