table column in cocoa

jazz

Registered
ok, I have an NSTableView built in IB, but i want to add the columns as needed in code. The init function the have listed is initWithIdentifier, but it gives me a warning that indicates to me that it isn't working right (i think).

this is the line in question
NSTableColumn *aColumn = [[NSTableColumn alloc] initWithIndentifier:aString];

the warning says,
warning: return type for 'initWithIdentifier:' defaults to id

i get this error even when i change the line to read
id aColumn = [[NSTableColumn alloc] initWithIndentifier:aString];

anyone know what i am doing wrong?
 
That one error was probably accompanied by another error of the form:

warning: can't find method -initWithIndentifier:(NSString *) in class NSTableColumn

The reason? You misspelled it =D

It's initWithIdentifier: - you have I*n*dentifier.

HTH,
Matt Fahrenbacher

[self beginShamlessPromotion:YES];
NSLog(@"P.S. Now go try out Alarm Clock Beta 3.0!")
[self endShamelessPromotiong:YES];
 
It's good to learn what that error means, usually easier to learn it the hardway too. :D
 
Back
Top