NSClassFromString help
NSClassFromString help
- Subject: NSClassFromString help
- From: "William Zumwalt" <email@hidden>
- Date: Wed, 13 Jun 2007 22:38:27 -0500
I've connected an action from my NSBrowser to this method which I
copied from the SimpleBrowser example (and it compiles), but it's not
compiling in my project.
So I'm trying to step through this thing line by line to get it
working, and as I try to look up 'Class' in the API docs, I'm not
finding anything there, or for super_class.
I keep getting the following error which compiles in the SimpleBrowser
example project ...
error: dereferencing pointer to incomplete type
- (IBAction) classBrowserChanged:(id) sender
{
NSArray *selectionArray = [[networkBrowser path]
componentsSeparatedByString:[networkBrowser pathSeparator]];
NSString *selectedClassificationName = [selectionArray lastObject];
Class selectedClassification =
NSClassFromString(selectedClassificationName);
// Error appears on this line which I can't find any docs
// for on Class or super_class
Class superClass = selectedClassification->super_class;
NSString *classificationName = @"";
/*
if (superClass) {
classificationName = [NSString stringWithCString:superClass->name];
}
NSLog(@"classificationName %@", classificationName);
[classNameField setStringValue:selectedClassificationName];
[superclassNameField setStringValue:superclassName];
// update the method and ivar browsers
[ivarController setBrowserElements:
InstanceVariableNamesForClass(selectedClass)];
[methodController setBrowserElements:
MethodNamesForClass(selectedClassification)];
*/
return;
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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