Re: Using Authorization Services with a Factored Application
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.