Made existing template fields editable so I don't have to edit templates in the Hex Editor anymore.

This commit is contained in:
Uli Kusterer 2003-08-08 06:26:28 +02:00
parent d3ad470d45
commit ef49978240
4 changed files with 18 additions and 1 deletions

View File

@ -18,5 +18,6 @@
-(short) shortValue;
-(NSString*) stringValue;
-(void) setStringValue: (NSString*)str;
@end

View File

@ -64,5 +64,15 @@
}
-(void) setStringValue: (NSString*)str
{
char cstr[256];
char* endPtr = cstr +255;
strncpy( cstr, [str cString], 255 );
shortValue = strtol( cstr, &endPtr, 10 );
}
@end

View File

@ -45,7 +45,7 @@
[self setStringValue: [NSString stringWithCString:buf length:4]];
NSLog(@"PSTR: %@", stringValue);
NSLog(@"TNAM: %@", stringValue);
}

View File

@ -239,6 +239,12 @@
return [item valueForKey:[tableColumn identifier]];
}
-(void) outlineView:(NSOutlineView *)outlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
{
[item takeValue:object forKey: [tableColumn identifier]];
}
-(BOOL) windowShouldClose: (id)sender // Window delegate.
{