customizing save panel
customizing save panel
- Subject: customizing save panel
- From: Damien Pacaud <email@hidden>
- Date: Wed, 27 Aug 2003 16:30:37 +0200
hi,
I am trying to customize the save panel for a cocoa app.....
I tried this :
-(IBAction)compress:(id)sender;
{
NSSavePanel *savePanel = [NSSavePanel savePanel];
NSView *testView = [[NSView alloc]init];
NSTextField *textField = [[NSTextField alloc]init];
[textField setStringValue:@"toto"];
NSLog(@"valeur : %@",[textField stringValue]);
[testView addSubview:textField];
[testView setNeedsDisplay:YES];
[textField setNeedsDisplay:YES];
[savePanel setAccessoryView:textField];
[savePanel setRequiredFileType:@"cod"];
[savePanel beginSheetForDirectory:nil
file:nil
modalForWindow:[self window]
modalDelegate:self
didEndSelector:@selector(didEnd:returnCode:contextInfo:)
contextInfo:nil];
}
but that does not work, the save panel appears but it does not hold the
the accessory view ...
running in debug mode tells me that the accessoryView points to the
view I declared....
I am kind of lost here, if anyone has an idea or a link for me to
follow, it would be great....
btw : I just tested the NSDocument method prepareSavePanel , which does
not work for me either...
I think something is wrong within the declaration of the view but i
can't find what...
thanks a lot for any answer ;-)
Damien
_______________________________________________
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.