RE: setAccessoryView not responding
RE: setAccessoryView not responding
- Subject: RE: setAccessoryView not responding
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Thu, 21 Nov 2002 14:48:49 -0500
>
in .m file:
>
>
- (IBAction)print:(id)sender
>
{
>
NSView *newView;
>
NSPrintOperation *printOp;
>
>
printOp = [NSPrintOperation printOperationWithView:inLetterView];
>
newView = [customePrintView printAccessoryView];
>
[printOp setAccessoryView:newView];
>
[printOp setShowPanels:YES];
>
[printOp runOperation];
>
}
>
>
when i compile and run i got the 'accView2' does not respond to
>
'printAccessoryView'
Which is probably right. customePrintView is an instance of the accView
class. That class does not have instance method called printAccessoryView,
at least according to the debugger.
You want to create a new view and then set it as the accessory view.
Instead of the second line try:
newView = [[[customePrintView alloc] init] autorelease];
Jonathan
_______________________________________________
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.