I've run out of ideas on what I'm doing wrong here..
This isn't a Objective-C language question, in the future use the
Cocoa-dev list found on the same site you found this list.
I debated sending to cocoa-dev but the answers provided seem to
indicate that this was the right choice even though this problem
involves Cocoa, the root issue seems to be my understanding of what
Objective C needs/is doing. Please read on...
It was my (mis?)understanding that initialization of class objects
would happen automatically when I call [[myObject alloc] init]. Your
information tells me I need to handle object allocation in the class
myself which is fine if that's what needs to be done... just trying
to understand what needs to happen.
However, I copied and pasted this snippet and it caused some compiler
warnings:
/Users/phil/Documents/Development/Mac OS X/Projects/Test - Cocoa App/
test.m:19: warning: multiple methods named '-init' found
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:
72: warning: using '-(id)init'
/Users/phil/Documents/Development/Mac OS X/Projects/Test - Cocoa App/
test.m:18: warning: also found '-(void)init'
as well as runtime errors:
2005-09-02 18:13:33.241 Test - Cocoa App[2287] *** -[NSCFDictionary
setAttributeName:forKey:]: selector not recognized [self = 0x306c10]
2005-09-02 18:13:33.241 Test - Cocoa App[2287] *** Uncaught
exception: <NSInvalidArgumentException> *** -[NSCFDictionary
setAttributeName:forKey:]: selector not recognized [self = 0x306c10]
or more simply...
[myObj setAttributeName:@"Attr 2 value" forkey:@"TestAttr key 2"];
This part I knew... I need the C string syntax as, once this is
working, the parameters will actually be passed from C code.
[myObj release]; //when done with myObj
---
Now try it.
-Shawn
Thanks,
Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/objc-language/email@hidden