|
|
#1 |
|
Pyobjc Sparkle setDelegate_
I am using Sparkle for my app's update launcher. I need to setDelegate for Sparkle's willInstallUpdate.
The correct method is: Code:
// Sent immediately before installing the specified update. - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update; Code:
SUUpdater.sharedUpdater().setDelegate_(updater_willInstallUpdate_) Code:
def updater_willInstallUpdate_():
NSLog("UPDATER WILL INSTALL UPDATE")
# do stuff
return
"Another gotcha is that obj.setDelegate_() often does not retain the delegate, so a reference should be maintained elsewhere." I'm not sure how to apply this to my code. I also tried: Code:
delegate = updater_willInstallUpdate_ SUUpdater.sharedUpdater().setDelegate_(delegate) Can someone help me out? When I try to check for updates, I get: Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: 0x000000000000000d, 0x0000000000000000 VM Regions Near 0: --> __TEXT 000000010902c000-0000000109031000 [ 20K] r-x/rwx SM=COW /Applications/MezeoFile.app/Contents/MacOS/MezeoFile Application Specific Information: objc_msgSend() selector name: respondsToSelector: objc[47765]: garbage collection is OFF Performing @selector(updates from sender NSMenuItem 0x7fc7b85a1320Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x00007fff9749afdf objc_msgSend_fixup + 95 1 org.andymatuschak.Sparkle 0x000000010b144d1b 0x10b142000 + 11547 2 org.andymatuschak.Sparkle 0x000000010b144531 0x10b142000 + 9521 3 _objc.so 0x00000001096ca73c ffi_call_unix64 + 76 4 _objc.so 0x00000001096cb44a ffi_call + 714 5 _objc.so 0x00000001096db6d0 PyObjCFFI_Caller + 2272 6 _objc.so 0x00000001096fc9de 0x1096c9000 + 211422 7 org.python.python 0x0000000109391c31 PyObject_Call + 97 8 org.python.python 0x000000010942a305 PyEval_EvalFrameEx + 18725 Last edited by SandboxGeneral; Jan 28, 2013 at 07:20 PM. Reason: Added code tags |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:39 PM.




from sender NSMenuItem 0x7fc7b85a1320

Linear Mode
