Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Jan 28, 2013, 06:30 PM   #1
macrumors newbie
Join Date: Jan 2013
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:
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
In python, I do:
And I have this global function:
def updater_willInstallUpdate_():
    # do stuff
This does not work. In PyObjc documentation, it says:
"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:
delegate = updater_willInstallUpdate_ 
but this did not work either.
Can someone help me out?

When I try to check for updates, I get:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

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 0x7fc7b85a1320

Thread 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
ruchi830 is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
OS X: Sparkle 2 hitting Mac Appstore! 10tonsltd Mac and PC Games 6 Mar 24, 2014 03:34 AM
Sparkle updater is no longer maintained blanham Mac Programming 1 Feb 4, 2014 11:44 AM
Sparkle Error DavidBlack Mac Programming 2 Mar 25, 2013 08:08 PM
Is PyObjC still not compatible with Xcode 4? Dookieman Mac Programming 1 Feb 5, 2013 11:29 PM

Forum Jump

All times are GMT -5. The time now is 07:00 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC