FROM : Jonathan E. Jackel
DATE : Thu Nov 21 20:48:49 2002
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Thu Nov 21 20:48:49 2002
> 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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| David Wu | Nov 21, 20:16 | |
| Jonathan E. Jackel | Nov 21, 20:48 |






Cocoa mail archive

