Re: [Pyobjc-dev] NSDocument based app
Brought to you by:
ronaldoussoren
|
From: Peter M. <zig...@po...> - 2002-11-06 09:21:22
|
On Wednesday, November 6, 2002, at 07:28 PM, Ronald Oussoren wrote:
>
> On Wednesday, Nov 6, 2002, at 08:53 Europe/Amsterdam, Peter Montagner =20=
> wrote:
>
>> The app works correctly in all the cases you mentioned. It will also =20=
>> correctly open a new window when it is brought to the front by =20
>> clicking on the dock icon, if no other documents are open. Like I =20
>> said, everything else I've tried works.
> The Todo application that is part of the source-tree has the same =20
> problem. That's not very helpfull, but at least this shows the problem =
=20
> is probably in PyObjC.
Good to hear. No wait, that's bad. Any idea what's causing it?
>> Except printing. How do selectors work? Specifically I need to call
>>
>> runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:
>>
>> How do I pass a selector to this? I actually want to send a NULL for =20=
>> the selector (I have nothing to do when the sheet is closed). In ObjC =
=20
>> I'd do something like:
>>
>> [self runModalPrintOperation:op
>> delegate:nil
>> didRunSelector:NULL
>> contextInfo:NULL];
> Selectors (type SEL in Objective-C) are represented as strings in =20
> Python:
>
> self.runModalPrintOperation_delagate_didRunSelector_contextInfo_(
> op, nil, "mySelector:", None)
For some unknown reason, that isn't working. It dies while executing
- (void)runModalPrintOperation:(NSPrintOperation *)printOperation =20
delegate:(id)delegate didRunSelector:(SEL)didRunSelector =20
contextInfo:(void *)contextInfo
Here the method:
# Print our document
def printShowingPrintPanel_(self, showPanels):
printInfo =3D self.printInfo()
printOp =3D =20
NSPrintOperation.printOperationWithView_printInfo_(self.rtfTextView,prin=20=
tInfo)
printOp.setShowPanels_(showPanels)
=20
self.runModalPrintOperation_delegate_didRunSelector_contextInfo_(
printOp, self, "printOperationDidRun:success:contextInfo:", =
=20
None)
It gets this error:
objc_sizeof_type: Unhandled type '=00'
I'm probably doing something stupid.
Peter=
|