pyobjc-dev Mailing List for PyObjC (Page 35)
Brought to you by:
ronaldoussoren
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(30) |
May
(18) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2002 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
|
Sep
(23) |
Oct
(180) |
Nov
(291) |
Dec
(95) |
2003 |
Jan
(338) |
Feb
(352) |
Mar
(97) |
Apr
(46) |
May
(226) |
Jun
(184) |
Jul
(145) |
Aug
(141) |
Sep
(69) |
Oct
(161) |
Nov
(96) |
Dec
(90) |
2004 |
Jan
(66) |
Feb
(87) |
Mar
(98) |
Apr
(132) |
May
(115) |
Jun
(68) |
Jul
(150) |
Aug
(92) |
Sep
(59) |
Oct
(52) |
Nov
(17) |
Dec
(75) |
2005 |
Jan
(84) |
Feb
(191) |
Mar
(133) |
Apr
(114) |
May
(158) |
Jun
(185) |
Jul
(62) |
Aug
(28) |
Sep
(36) |
Oct
(88) |
Nov
(65) |
Dec
(43) |
2006 |
Jan
(85) |
Feb
(62) |
Mar
(92) |
Apr
(75) |
May
(68) |
Jun
(101) |
Jul
(73) |
Aug
(37) |
Sep
(91) |
Oct
(65) |
Nov
(30) |
Dec
(39) |
2007 |
Jan
(24) |
Feb
(28) |
Mar
(10) |
Apr
(2) |
May
(18) |
Jun
(16) |
Jul
(21) |
Aug
(6) |
Sep
(30) |
Oct
(31) |
Nov
(153) |
Dec
(31) |
2008 |
Jan
(63) |
Feb
(70) |
Mar
(47) |
Apr
(24) |
May
(59) |
Jun
(22) |
Jul
(12) |
Aug
(7) |
Sep
(14) |
Oct
(26) |
Nov
(5) |
Dec
(5) |
2009 |
Jan
(10) |
Feb
(41) |
Mar
(70) |
Apr
(88) |
May
(49) |
Jun
(62) |
Jul
(34) |
Aug
(15) |
Sep
(55) |
Oct
(40) |
Nov
(67) |
Dec
(21) |
2010 |
Jan
(60) |
Feb
(17) |
Mar
(26) |
Apr
(26) |
May
(29) |
Jun
(4) |
Jul
(21) |
Aug
(21) |
Sep
(10) |
Oct
(12) |
Nov
(3) |
Dec
(19) |
2011 |
Jan
(3) |
Feb
(13) |
Mar
(8) |
Apr
(8) |
May
(17) |
Jun
(20) |
Jul
(21) |
Aug
(7) |
Sep
|
Oct
|
Nov
(9) |
Dec
(11) |
2012 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
(4) |
Jun
(14) |
Jul
(5) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(23) |
Dec
(1) |
2013 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(1) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(12) |
Nov
(10) |
Dec
(3) |
2014 |
Jan
(7) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(11) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(2) |
2015 |
Jan
(9) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(7) |
Jun
|
Jul
(5) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2016 |
Jan
(1) |
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(21) |
Oct
(17) |
Nov
|
Dec
(36) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2018 |
Jan
(2) |
Feb
(3) |
Mar
(3) |
Apr
(14) |
May
(2) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
(6) |
2019 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(1) |
2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Orestis M. <or...@or...> - 2009-11-24 14:24:47
|
On 24 Nov 2009, at 16:20, Ronald Oussoren wrote: > > On 24 Nov, 2009, at 15:16, Orestis Markou wrote: > >> On 24 Nov 2009, at 14:56, Ronald Oussoren wrote: >> >>> >>> On 24 Nov, 2009, at 8:19, Orestis Markou wrote: >>> >>>> Hello, >>>> >>>> I would like to use the latest version (SVN) of PyObjC in my applications, both on 10.5 and on 10.6 (10.6 ships with a version of PyObjC that doesn't work with my apps). >>>> >>>> I'm having trouble building everything and getting it to work. I tried to modify the 02-develop-all.sh script to install instead of develop, but it seems not to be working. I will have to try again to give more information there. >>>> >>>> Is there an easy way to produce a build of PyObjC + Frameworks that can be easily dropped into an app bundle and used? >>>> >>>> The app should run on stock Python 2.5 on 10.5 and 10.6. >>> >>> I'll upload a new release to pypi later today. When that's done 'easy_install pyobjc==2.2' should work. >>> >>> PyObjC 2.2 will be the version that's currently in the repository, with updated version numbers. >> >> Thanks for that - I'm still wondering how to do a full build from source though (in case I want to fix a bug or try out something new). Right now with easy_install I can't find any option that will allow me to point to a directory and say 'install from here'. > > "python setup.py install" in the right order should work (that's what the develop.sh script does). > > I just noticed that you try to install an updated version of pyobjc in the system install of Python. I wouldn't do that, I know Apple used pyobjc in the past, and AFAIK still does so on the server. Upgrading PyObjC might break that code Accidentally de-cced the list. Re-adding now. I'm installing this into a clean virtualenv, and then copy all packages out. I may have to fiddle with .pth files a bit though to get everything working. OK, so I do have to install every framework wrapper separately. I was hoping that since the dependencies are all listed in the 'empty' pyobjc project I could reuse that somehow. I will tweak develop.sh to do what I want and report back. Orestis |
From: Ronald O. <ron...@ma...> - 2009-11-24 14:15:34
|
On 24 Nov, 2009, at 4:01, Daniel Miller wrote: >> You seem to get a bus error, although the code looks fine at first glance. Could you create a small self-contained project that suffers from the same problem, that would make debugging a lot easier for me. > > Sorry for the delay in getting this to you. The example is attached. I modified the TinyTinyEdit example found in PyObjC 1.4 (and updated it slightly to use the new subclassing mechanism rather than the old NibClassBuilder.AutoBaseClass). Anyway, this little program will reproduce the error I described in the first email in this thread. Instructions to reproduce the error (execute the following at the command line after unpacking the zip file): > > Dependencies (This is what's on my system. Other versions may also produce the same error. 10.4 with PyObjC 1.4 did NOT produce this error to my knowlege.): This is a rather annoying issue, and a instance where the Python<->ObjC bridge suddenly leaps into view to mess things up. I have committed a quick workaround in the repository, but that does require a change to your code. To call the delegate method use: getattr(delegate, selector)(self, 1, context) rather than: perform_selector(delegate, selector, self, 1, context) Some notes: * You do not have to translate the selector name into a python identifier, that's a hack but is supported behaviour (that is, if I ever change PyObjC to be stricter about the names passed to __getattr__ there will be a transition period) * This does require the very latest version of PyObjC that I'm in the process of releasing. * My fix does not work with perform_selector and I don't know if I can get that version to work without a lot of work. Ronald > > Snow Leopard 10.6 > Python 2.6 > PyObjC 2.2b2 > py2app 0.4.2 (dev?) > > $ cd TinyTinyEdit > $ python setup.py py2app -A > $ dist/TinyTinyEdit.app/Contents/MacOS/TinyTinyEdit > > The TinyTinyEdit window should pop up at this point. Type something in the window to make the document dirty. Then hit [Command]+Q. You should get a traceback in your terminal window. The Apple crash reporter will probably pop up as well. > > Context: the action you performed by following the steps outlined above simulates what would happen in my application if the user were to quit the application with unsaved documents, and then clicked "Don't Save" for each unsaved document. > > ~ Daniel > > <TinyTinyEdit.zip> > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Ronald O. <ron...@ma...> - 2009-11-24 12:57:15
|
On 24 Nov, 2009, at 8:19, Orestis Markou wrote: > Hello, > > I would like to use the latest version (SVN) of PyObjC in my applications, both on 10.5 and on 10.6 (10.6 ships with a version of PyObjC that doesn't work with my apps). > > I'm having trouble building everything and getting it to work. I tried to modify the 02-develop-all.sh script to install instead of develop, but it seems not to be working. I will have to try again to give more information there. > > Is there an easy way to produce a build of PyObjC + Frameworks that can be easily dropped into an app bundle and used? > > The app should run on stock Python 2.5 on 10.5 and 10.6. I'll upload a new release to pypi later today. When that's done 'easy_install pyobjc==2.2' should work. PyObjC 2.2 will be the version that's currently in the repository, with updated version numbers. Ronald |
From: Orestis M. <or...@or...> - 2009-11-24 07:20:20
|
Hello, I would like to use the latest version (SVN) of PyObjC in my applications, both on 10.5 and on 10.6 (10.6 ships with a version of PyObjC that doesn't work with my apps). I'm having trouble building everything and getting it to work. I tried to modify the 02-develop-all.sh script to install instead of develop, but it seems not to be working. I will have to try again to give more information there. Is there an easy way to produce a build of PyObjC + Frameworks that can be easily dropped into an app bundle and used? The app should run on stock Python 2.5 on 10.5 and 10.6. Thank you, Orestis |
From: Daniel M. <mil...@gm...> - 2009-11-24 03:02:02
|
> You seem to get a bus error, although the code looks fine at first > glance. Could you create a small self-contained project that suffers > from the same problem, that would make debugging a lot easier for me. Sorry for the delay in getting this to you. The example is attached. I modified the TinyTinyEdit example found in PyObjC 1.4 (and updated it slightly to use the new subclassing mechanism rather than the old NibClassBuilder.AutoBaseClass). Anyway, this little program will reproduce the error I described in the first email in this thread. Instructions to reproduce the error (execute the following at the command line after unpacking the zip file): Dependencies (This is what's on my system. Other versions may also produce the same error. 10.4 with PyObjC 1.4 did NOT produce this error to my knowlege.): Snow Leopard 10.6 Python 2.6 PyObjC 2.2b2 py2app 0.4.2 (dev?) $ cd TinyTinyEdit $ python setup.py py2app -A $ dist/TinyTinyEdit.app/Contents/MacOS/TinyTinyEdit The TinyTinyEdit window should pop up at this point. Type something in the window to make the document dirty. Then hit [Command]+Q. You should get a traceback in your terminal window. The Apple crash reporter will probably pop up as well. Context: the action you performed by following the steps outlined above simulates what would happen in my application if the user were to quit the application with unsaved documents, and then clicked "Don't Save" for each unsaved document. ~ Daniel |
From: Greg E. <gre...@ca...> - 2009-11-21 21:20:36
|
Thomas Heller wrote: > Is the list available on gmane? Not yet, but I'll look into making it so. -- Greg |
From: Gregory E. <gre...@ca...> - 2009-11-21 00:28:21
|
There is now a mailing list for discussion of PyGUI: http://mail.python.org/mailman/listinfo/pygui What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. |
From: Aahz <aa...@py...> - 2009-11-19 21:28:17
|
Howdy, If you tried getting a PyObjC app running on 10.6 a couple of months ago and gave up, you should try again now. I just ran software update and my app works fine now, without any changes (still building on 10.5). -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan |
From: Michael S. <mst...@gm...> - 2009-11-19 17:47:19
|
I am using webkit2png from on machine to another and this setup has been working fine but now seems to not be. We have been using the script for a few years on an OS X 10.4.11 machine and am moving the setup to another, Intel 10.4.11 machine. MacPython 2.5 and PyObjC 1.4 is installed and everything is working fine when called from the command line. But when called from a PHP system call through the web server I get the following errors any idea? The web server is running under the username of a logged in user which I found was necessary before in order to have the PythonLauncher to work correctly. I know this is probably something you haven't dove before but any help would be great. I pretty sure it's some kind of permissions problem. Any suggestions would be helpful. Thanks! See /usr/include/servers/bootstrap_defs.h for the error codes. 2009-11-19 03:47:00.215 Python[26600] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (NSApplication-MainThread-67e8-37265842139429#) 2009-11-19 03:47:00.215 Python[26600] *** Assertion failure in -[NSApplication _createWakeupPort], AppKit.subproj/NSApplication.m:3578 Traceback (most recent call last): File "/Library/WebServer/Documents/sendfax/webkit2png.5", line 285, in if __name__ == '__main__' : main() File "/Library/WebServer/Documents/sendfax/webkit2png.5", line 252, in main app = AppKit.NSApplication.sharedApplication() objc.error: NSInternalInconsistencyException - CFMessagePortCreateLocal returned NULL port Thanks! Michael |
From: Ronald O. <ron...@ma...> - 2009-11-19 08:18:37
|
On 19 Nov, 2009, at 1:48, Daniel Miller wrote: > I'm having problems calling the selector provided by > > NSDocumentController.closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo: > > Here's my code: > > class DocumentController(NSDocumentController): > ... > def closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo_( > self, delegate, selector, context): > def callback(result): > log.debug("%s.%s(%s, %s, %s)", > delegate, selector, self, result, context) > perform_selector(delegate, selector, self, result, context) > saver = DocumentSavingDelegate.alloc().\ > initWithDocuments_callback_context_( > self.controller.iter_dirty_documents(), callback, context) > saver.save_next_document() > > def perform_selector(delegate, selector, *args): > # sel = selector.replace(":", "_") # HACK > # getattr(delegate, sel)(*args) > inv = NSInvocation.invocationWithMethodSignature_( > delegate.methodSignatureForSelector_(selector)) > inv.setTarget_(delegate) > inv.setSelector_(selector) > for i, arg in enumerate(args): > inv.setArgument_atIndex_(arg, i + 2) > inv.invoke() > > Here's the debug message and stack trace I get when the callback gets called: > > DEBUG <DocumentController: 0x114ab0>._documentController:shouldTerminate:context:(<DocumentController: 0x114ab0>, True, 1401200) > 2009-11-18 19:32:36.137 EditXTDev[51404:60b] *** ObjC exception 'NSUncaughtSystemExceptionException' (reason: 'Uncaught system exception: signal 10') discarded > Stack trace (most recent call last): > -[NSMenu _performActionWithHighlightingForItemAtIndex:] (in AppKit) + 49 > -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit) + 174 > -[NSMenuItem _corePerformAction] (in AppKit) + 435 > -[NSApplication sendAction:to:from:] (in AppKit) + 112 > -[NSApplication terminate:] (in AppKit) + 519 > -[NSApplication _shouldTerminate] (in AppKit) + 669 > -[NSApplication sendEvent:] (in AppKit) + 6431 > -[NSWindow sendEvent:] (in AppKit) + 5549 > -[NSControl mouseDown:] (in AppKit) + 812 > -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 524 > -[NSCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 1808 > -[NSCell _sendActionFrom:] (in AppKit) + 169 > -[NSControl sendAction:to:] (in AppKit) + 108 > -[NSApplication sendAction:to:from:] (in AppKit) + 112 > -[NSAlert buttonPressed:] (in AppKit) + 392 > -[NSApplication endSheet:returnCode:] (in AppKit) + 349 > -[NSAlert didEndSheet:returnCode:contextInfo:] (in AppKit) + 133 > -[NSWindow orderOut:] (in AppKit) + 50 > -[NSWindow orderWindow:relativeTo:] (in AppKit) + 105 > -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit) + 1836 > -[NSWindow(NSSheets) _orderOutRelativeToWindow:] (in AppKit) + 123 > -[NSMoveHelper(NSSheets) _closeSheet:andMoveParent:] (in AppKit) + 463 > -[NSWindow(NSSheets) _detachSheetWindow] (in AppKit) + 501 > -[NSNotificationCenter postNotificationName:object:] (in Foundation) + 56 > -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) + 128 > _CFXNotificationPostNotification (in CoreFoundation) + 186 > __CFXNotificationPost (in CoreFoundation) + 905 > _nsnote_callback (in Foundation) + 176 > ffi_closure_SYSV (in _objc.so) + 196 > method_stub (in _objc.so) + 1687 > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > function_call (in libpython2.6.dylib) (funcobject.c:524) > PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) > PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > pysel_call (in _objc.so) + 1264 > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > function_call (in libpython2.6.dylib) (funcobject.c:524) > PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) > PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > pysel_call (in _objc.so) + 1264 > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > function_call (in libpython2.6.dylib) (funcobject.c:524) > PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) > PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3802) > PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) > PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3802) > PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) > PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) > PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) > objcsel_call (in _objc.so) + 230 > PyObjCFFI_Caller (in _objc.so) + 2709 > ffi_call (in _objc.so) + 147 > .LCFI1 (in _objc.so) (x86-darwin.S:84) > -[NSInvocation invoke] (in CoreFoundation) + 136 > __invoking___ (in CoreFoundation) + 29 > -[NSDocumentController(NSInternal) _documentController:shouldTerminate:context:] (in AppKit) + 321 > 0xffffffff > _sigtramp (in libSystem.B.dylib) + 43 > NSExceptionHandlerUncaughtSignalHandler (in ExceptionHandling) + 65 > > Am I doing something wrong or is this a bug? You seem to get a bus error, although the code looks fine at first glance. Could you create a small self-contained project that suffers from the same problem, that would make debugging a lot easier for me. Ronald |
From: Greg E. <gre...@ca...> - 2009-11-19 08:04:01
|
PyGUI 2.1.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ This is an emergency bugfix release to repair some major breakage in the gtk version. Also corrects some other problems. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ |
From: Daniel M. <mil...@gm...> - 2009-11-19 00:48:38
|
I'm having problems calling the selector provided by NSDocumentController .closeAllDocumentsWithDelegate:didCloseAllSelector:contextInfo: Here's my code: class DocumentController(NSDocumentController): ... def closeAllDocumentsWithDelegate_didCloseAllSelector_contextInfo_( self, delegate, selector, context): def callback(result): log.debug("%s.%s(%s, %s, %s)", delegate, selector, self, result, context) perform_selector(delegate, selector, self, result, context) saver = DocumentSavingDelegate.alloc().\ initWithDocuments_callback_context_( self.controller.iter_dirty_documents(), callback, context) saver.save_next_document() def perform_selector(delegate, selector, *args): # sel = selector.replace(":", "_") # HACK # getattr(delegate, sel)(*args) inv = NSInvocation.invocationWithMethodSignature_( delegate.methodSignatureForSelector_(selector)) inv.setTarget_(delegate) inv.setSelector_(selector) for i, arg in enumerate(args): inv.setArgument_atIndex_(arg, i + 2) inv.invoke() Here's the debug message and stack trace I get when the callback gets called: DEBUG <DocumentController: 0x114ab0>._documentController:shouldTerminate:context: (<DocumentController: 0x114ab0>, True, 1401200) 2009-11-18 19:32:36.137 EditXTDev[51404:60b] *** ObjC exception 'NSUncaughtSystemExceptionException' (reason: 'Uncaught system exception: signal 10') discarded Stack trace (most recent call last): -[NSMenu _performActionWithHighlightingForItemAtIndex:] (in AppKit) + 49 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit) + 174 -[NSMenuItem _corePerformAction] (in AppKit) + 435 -[NSApplication sendAction:to:from:] (in AppKit) + 112 -[NSApplication terminate:] (in AppKit) + 519 -[NSApplication _shouldTerminate] (in AppKit) + 669 -[NSApplication sendEvent:] (in AppKit) + 6431 -[NSWindow sendEvent:] (in AppKit) + 5549 -[NSControl mouseDown:] (in AppKit) + 812 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 524 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] (in AppKit) + 1808 -[NSCell _sendActionFrom:] (in AppKit) + 169 -[NSControl sendAction:to:] (in AppKit) + 108 -[NSApplication sendAction:to:from:] (in AppKit) + 112 -[NSAlert buttonPressed:] (in AppKit) + 392 -[NSApplication endSheet:returnCode:] (in AppKit) + 349 -[NSAlert didEndSheet:returnCode:contextInfo:] (in AppKit) + 133 -[NSWindow orderOut:] (in AppKit) + 50 -[NSWindow orderWindow:relativeTo:] (in AppKit) + 105 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] (in AppKit) + 1836 -[NSWindow(NSSheets) _orderOutRelativeToWindow:] (in AppKit) + 123 -[NSMoveHelper(NSSheets) _closeSheet:andMoveParent:] (in AppKit) + 463 -[NSWindow(NSSheets) _detachSheetWindow] (in AppKit) + 501 -[NSNotificationCenter postNotificationName:object:] (in Foundation) + 56 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) + 128 _CFXNotificationPostNotification (in CoreFoundation) + 186 __CFXNotificationPost (in CoreFoundation) + 905 _nsnote_callback (in Foundation) + 176 ffi_closure_SYSV (in _objc.so) + 196 method_stub (in _objc.so) + 1687 PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) function_call (in libpython2.6.dylib) (funcobject.c:524) PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) pysel_call (in _objc.so) + 1264 PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) function_call (in libpython2.6.dylib) (funcobject.c:524) PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) pysel_call (in _objc.so) + 1264 PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) function_call (in libpython2.6.dylib) (funcobject.c:524) PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3802) PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3802) PyEval_EvalCodeEx (in libpython2.6.dylib) (ceval.c:2968) PyEval_EvalFrameEx (in libpython2.6.dylib) (ceval.c:3917) PyObject_Call (in libpython2.6.dylib) (abstract.c:2492) objcsel_call (in _objc.so) + 230 PyObjCFFI_Caller (in _objc.so) + 2709 ffi_call (in _objc.so) + 147 .LCFI1 (in _objc.so) (x86-darwin.S:84) -[NSInvocation invoke] (in CoreFoundation) + 136 __invoking___ (in CoreFoundation) + 29 -[NSDocumentController(NSInternal) _documentController:shouldTerminate:context:] (in AppKit) + 321 0xffffffff _sigtramp (in libSystem.B.dylib) + 43 NSExceptionHandlerUncaughtSignalHandler (in ExceptionHandling) + 65 Am I doing something wrong or is this a bug? Versions: Mac OS X 10.6 Python 2.6.2 PyObjC 2.2b2 Thanks in advance for any help you can provide. ~ Daniel |
From: Vernon C. <ver...@gm...> - 2009-11-16 23:43:56
|
Often new version announcements (like the one Greg just sent) are cross posted to related groups. The traffic is not heavy and the service useful. As for ongoing discussions (good idea!), I would suggest http://www.python.org/community/lists/ from which I quote: To request a new list, send e-mail to postmaster @ python.org That's where the pywin32 group lives, and it works rather well. -- Vernon Cole On Mon, Nov 16, 2009 at 3:31 PM, Greg Ewing <gre...@ca...> wrote: > > John Finlay wrote: > >> Start your own list for the community that is interested in your project. > > That's not going to reach anyone who doesn't already > know about it. > > It's probably a good idea for ongoing discussion, > though. Any suggestions on the best way of going > about it? I could start a Google Group, but I'd > prefer a real mailing list server if possible. > > -- > Greg > _______________________________________________ > python-win32 mailing list > pyt...@py... > http://mail.python.org/mailman/listinfo/python-win32 |
From: Greg E. <gre...@ca...> - 2009-11-16 23:38:42
|
Anders Hovmöller wrote: > As I understand it there are three cases: > 1. [1, 2, 3] # explicit list > 2. [x for x in foo] # list comprehension > 3. [foo bar] # objc message send > So the only thing I needed to do was to split once on zero or more > spaces and if the second identifier is "for" or begins with comma it's > python code and I should leave it alone. Um, not quite... [foo.baz bar] [foo[baz] bar] [foo.baz(42) bar] [foo+baz bar] etc. However you're probably right if you're willing to do a full parse, since you end up with an expression followed immediately by an identifier, which is not currently legal. -- Greg |
From: Greg E. <gre...@ca...> - 2009-11-16 22:32:17
|
John Finlay wrote: > Start your own list for the community that is interested in your project. That's not going to reach anyone who doesn't already know about it. It's probably a good idea for ongoing discussion, though. Any suggestions on the best way of going about it? I could start a Google Group, but I'd prefer a real mailing list server if possible. -- Greg |
From: Ronald O. <ron...@ma...> - 2009-11-16 21:29:34
|
On 15 Nov, 2009, at 22:17, Greg Ewing wrote: > John Finlay wrote: >> Greg, >> >> Why do you post to mailing lists that are unrelated to your project? I >> would appreciate it if in future you didn't post a message about your >> project ot the PyGTK mailing list. > > I posted the announcement to the pyobjc, pygtk and pywin32 > lists because PyGUI uses all of those libraries, and because > I don't know of any single mailing list where people interested > in Python GUIs in general can be found. > > However, if the consensus is that PyGUI announcements are > not welcome on those lists, I will be happy to cease posting > them there. > > What is the general feeling out there? Should I stop posting > PyGUI messages to these lists? Is there another GUI-related > list that would be more appropriate? I (as the PyObjC maintainer) don't mind these announcements on the pyobjc list. Ronald |
From: Ronald O. <ron...@ma...> - 2009-11-16 21:27:58
|
On 15 Nov, 2009, at 13:01, Jonas Zimmermann wrote: > Hi, > > I'm quite new to Python and pyobjc; I've searched the pyobjc documentation and this list archive but couldn't find an answer to my problem: > > I'd like to wrap the SkimNotes framework. It extends several standard Cocoa classes such as PDFDocument and NSFileManager using informal protocols. > The methods defined in the framework are actually implemented as well. In the examples I've found for using objc.informal_protocol it seems that these are expected to be implemented in the Python code? > So if I want to use the framework with code like this: > > objc.loadBundle("SkimNotes", globals(), bundle_path=objc.pathForFramework(pathToSkimNotes)) > SKNPDFDocument = objc.informal_protocol('SKNPDFDocument',[objc.selector(None, > selector="SkimNotesAtURL",signature="[@]@:@",isRequired=0), objc.selector(None, > selector="notes",signature="[@]",isRequired=0)]) > > how do I actually get an instance of PDFDocument that listens to the method SkimNotesAtURL defined and implemented in the framework? > > Sorry for being confus(ed/ing)... If I understand what you write correctly and the SkimNotes framework implements the informal protocol when loaded you don't have to do anything beyond the 'loadBundle' call, you don't even have to create the informal_protoco object. PyObjC automaticly scans classes for methods when it accesses a class. There is one reason why you might have to do more: if the class has pointer arguments (such as an 'NSError**' or 'int*' argument) you have to tell PyObjC what it should do with the pointer. Ronald > > Jonas > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Aahz <aa...@py...> - 2009-11-16 20:24:32
|
On Mon, Nov 16, 2009, Anders Hovm?ller wrote: > > I thought about this thing a little bit more and realized that the obj-c > calling syntax is totally unambiguous with python. It's a pretty minor > change to the regex actually. As I understand it there are three cases: > 1. [1, 2, 3] # explicit list > 2. [x for x in foo] # list comprehension > 3. [foo bar] # objc message send > So the only thing I needed to do was to split once on zero or more spaces > and if the second identifier is "for" or begins with comma it's python code > and I should leave it alone. If it passes this test it is invalid python > code anyway so I can easily assume it's an objc-style call and just convert > it. Please tell me if there is a case I missed. You need to use a real parser as Ronald indicated: [ #test 1 , ] Also, I agree with Ronald that "$[foo bar]" overall makes more sense with Python. (This is my opinion as someone who has done functionally zero ObjC programming but with more than ten years of Python.) However, because there's essentially zero chance of getting this integrated into Python it doesn't much matter. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan |
From: Ronald O. <ron...@ma...> - 2009-11-16 11:59:30
|
Anders, The syntax is unambiguous, but it will be very hard to support this in a real parser. IMHO a production-quality implementation of this feature should use a real parser (based on Python's parser) and generate compiled code (and a .pyc file) directly. Both should be doable on top of the stdlib compiler and ast modules. Doing that should be feasible using my '$[object message]' syntax, but will be a lot harder with straight ObjC syntax. The possibility for confusion for human readers are also worrying. Ronald On Monday, November 16, 2009, at 10:18AM, "Anders Hovmöller" <bo...@ki...> wrote: >------------------------------------------------------------------------------ >Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >trial. Simplify your report design, integration and deployment - and focus on >what you do best, core application coding. Discover what's new with >Crystal Reports now. http://p.sf.net/sfu/bobj-july >_______________________________________________ >Pyobjc-dev mailing list >Pyo...@li... >https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > |
From: John F. <fi...@mo...> - 2009-11-16 01:48:22
|
Greg Ewing wrote: > John Finlay wrote: > >> Greg, >> >> Why do you post to mailing lists that are unrelated to your project? I >> would appreciate it if in future you didn't post a message about your >> project ot the PyGTK mailing list. >> > > I posted the announcement to the pyobjc, pygtk and pywin32 > lists because PyGUI uses all of those libraries, and because > I don't know of any single mailing list where people interested > in Python GUIs in general can be found. > > However, if the consensus is that PyGUI announcements are > not welcome on those lists, I will be happy to cease posting > them there. > > What is the general feeling out there? Should I stop posting > PyGUI messages to these lists? Is there another GUI-related > list that would be more appropriate? > > Start your own list for the community that is interested in your project. John |
From: Rob <rob...@gm...> - 2009-11-15 23:24:08
|
It took me a few minutes to get what you were saying, but you are right. Your comment did get me sorted. The code I initially used was listed on numerous blogs as an example of how to do the sheet, so just so others searching on this find a conclusive answer: This method signature is correct: @PyObjCTools.AppHelper.endSheetMethod def openPanelDidEnd_returnCode_contextInfo_(self, panel, returnCode, contextInfo): However "hooking up the callback" (or whatever the proper term is) like this: 'openPanelDidEnd:panel:returnCode:contextInfo:' is incorrect, because there are too many parameters. Setting up the callback with 4 parameters works in Leopard, but it does not in Snow Leopard for some reason (probably because it's wrong). Using the call back of: 'openPanelDidEnd:returnCode:contextInfo:' Makes joy. And to do some ascii art to solidify what Ronald was saying 'openPanelDidEnd:returnCode:contextInfo:' ^ ^ ^ 1 2 3 openPanelDidEnd_returnCode_contextInfo_(self, panel, returnCode, contextInfo): ^ ^ ^ 1 2 3 Thanks again Ronald rob On Fri, Nov 13, 2009 at 11:28 PM, Ronald Oussoren <ron...@ma...>wrote: > (mobilme webmail seems to mess up quoting, hence my toppost). > > The callback method should be named 'openPanelDidEnd:returnCode:contextInfo:', (that is "openPanelDidEnd_returnCode_contextInfo_". The name your using contains 4 underscores, and should therefore have 5 arguments (including 'self'), while the sheet expects a method with 3 arguments. > > Ronald > > On Friday, November 13, 2009, at 07:14AM, "Rob" <rob...@gm...> wrote: > >------------------------------------------------------------------------------ > >Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > >trial. Simplify your report design, integration and deployment - and focus on > >what you do best, core application coding. Discover what's new with > >Crystal Reports now. http://p.sf.net/sfu/bobj-july > >_______________________________________________ > >Pyobjc-dev mailing list > >Pyo...@li... > >https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > > > > (Please tell me if this is the wrong list for this kind of thing) > > I am trying to port an application written against the stock python+pyobjc > on Leopard to one on snow leopard, and I've hit and error I can't solve. I > have a sheet that pops in that allows one to select files, and it does this: > > > self.panel.beginSheetForDirectory_file_types_modalForWindow_modalDelegate_didEndSelector_contextInfo_( > os.getcwd(), > None, > self.filetypes, > NSApp().mainWindow(), > self, > 'openPanelDidEnd:panel:returnCode:contextInfo:', > 0) > > the key being the 'openPanelDidEnd:panel:returnCode:contextInfo:' part. > > The signature of that method seems to have changed between Leopard and > Snow Leopard, but the decorator in pyobjc doesn't appear updated. I am > guess this is what is going on because my method defined as: > > @PyObjCTools.AppHelper.endSheetMethod > def openPanelDidEnd_panel_returnCode_contextInfo_(self, panel, returnCode, > contextInfo): > > (which works fine in Leopard) throws the error: > > objc.BadPrototypeError: Python signature doesn't match implied > Objective-C signature for <unbound selector > openPanelDidEnd:panel:returnCode:contextInfo: of desktop_uploaderAppDelegate > at 0x2fb6d70> > > I've tried to figure out how to write the signature myself, but I seem to > suck badly at doing so. Nothing I have tried has worked. I've tried (some > were just googled, some I tired to write myself by looking at the apple > docs): > > @objc.signature('v@:^@i^v') > @objc.signature('v16@4:8@12i16i20') > @objc.signature('v@:@i^v') > > amongst others, but everything I try just throws > that objc.BadPrototypeError: and crashes the program. > > Seems like it should be an easy fix if I could sort out the signature - > can anyone help or point me in the right direction? > > cheers, > rob > > -- > http://robrohan.com > http://twitter.com/robrohan > -- http://robrohan.com http://twitter.com/robrohan |
From: Barry W. <bar...@gm...> - 2009-11-15 21:55:07
|
Greg, Given that your project uses PyObjC, I certainly don't mind hearing about its progress on the pyobjc-dev list. -Barry On Sun, Nov 15, 2009 at 1:17 PM, Greg Ewing <gre...@ca...> wrote: > John Finlay wrote: >> Greg, >> >> Why do you post to mailing lists that are unrelated to your project? I >> would appreciate it if in future you didn't post a message about your >> project ot the PyGTK mailing list. > > I posted the announcement to the pyobjc, pygtk and pywin32 > lists because PyGUI uses all of those libraries, and because > I don't know of any single mailing list where people interested > in Python GUIs in general can be found. > > However, if the consensus is that PyGUI announcements are > not welcome on those lists, I will be happy to cease posting > them there. > > What is the general feeling out there? Should I stop posting > PyGUI messages to these lists? Is there another GUI-related > list that would be more appropriate? > > -- > Greg > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: Aahz <aa...@py...> - 2009-11-15 21:54:15
|
On Mon, Nov 16, 2009, Greg Ewing wrote: > John Finlay wrote: >> >> Why do you post to mailing lists that are unrelated to your project? I >> would appreciate it if in future you didn't post a message about your >> project ot the PyGTK mailing list. > > I posted the announcement to the pyobjc, pygtk and pywin32 > lists because PyGUI uses all of those libraries, and because > I don't know of any single mailing list where people interested > in Python GUIs in general can be found. I'm on both pyobjc and pywin32 lists, and I think PyGUI announcements are appropriate. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan |
From: Greg E. <gre...@ca...> - 2009-11-15 21:17:47
|
John Finlay wrote: > Greg, > > Why do you post to mailing lists that are unrelated to your project? I > would appreciate it if in future you didn't post a message about your > project ot the PyGTK mailing list. I posted the announcement to the pyobjc, pygtk and pywin32 lists because PyGUI uses all of those libraries, and because I don't know of any single mailing list where people interested in Python GUIs in general can be found. However, if the consensus is that PyGUI announcements are not welcome on those lists, I will be happy to cease posting them there. What is the general feeling out there? Should I stop posting PyGUI messages to these lists? Is there another GUI-related list that would be more appropriate? -- Greg |
From: Jonas Z. <li...@jo...> - 2009-11-15 12:02:24
|
Hi, I'm quite new to Python and pyobjc; I've searched the pyobjc documentation and this list archive but couldn't find an answer to my problem: I'd like to wrap the SkimNotes framework. It extends several standard Cocoa classes such as PDFDocument and NSFileManager using informal protocols. The methods defined in the framework are actually implemented as well. In the examples I've found for using objc.informal_protocol it seems that these are expected to be implemented in the Python code? So if I want to use the framework with code like this: objc.loadBundle("SkimNotes", globals(), bundle_path=objc.pathForFramework(pathToSkimNotes)) SKNPDFDocument = objc.informal_protocol('SKNPDFDocument',[objc.selector(None, selector="SkimNotesAtURL",signature="[@]@:@",isRequired=0), objc.selector(None, selector="notes",signature="[@]",isRequired=0)]) how do I actually get an instance of PDFDocument that listens to the method SkimNotesAtURL defined and implemented in the framework? Sorry for being confus(ed/ing)... Jonas |