Re: [Pyobjc-dev] NSDocument based app
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2002-11-06 09:34:47
|
On Wednesday, Nov 6, 2002, at 10:21 Europe/Amsterdam, Peter Montagner wrote: > > On Wednesday, November 6, 2002, at 07:28 PM, Ronald Oussoren wrote: > >> >> On Wednesday, Nov 6, 2002, at 08:53 Europe/Amsterdam, Peter Montagner >> wrote: >> >>> The app works correctly in all the cases you mentioned. It will also >>> correctly open a new window when it is brought to the front by >>> clicking on the dock icon, if no other documents are open. Like I >>> said, everything else I've tried works. >> The Todo application that is part of the source-tree has the same >> problem. That's not very helpfull, but at least this shows the >> problem is probably in PyObjC. > > Good to hear. No wait, that's bad. Any idea what's causing it? Not yet... > > >>> 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 >>> the selector (I have nothing to do when the sheet is closed). In >>> ObjC 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 >> 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 > delegate:(id)delegate didRunSelector:(SEL)didRunSelector > contextInfo:(void *)contextInfo The last argument is problematic: void pointers currently require manual assistance. We can at least support automatic translation from None to a NULL pointer. The error message is not very helpfull. Ronald |