Thank you! I got it. I can;t send numbers to the python method.
I have to send NSObjects.
Got it.
Thanks
Regards
Saptarshi
On Oct 18, 2008, at 9:09 PM, s s wrote:
Try using:
def setdefaulttimeout_(cls,timeout):
Since your method would be setdefaulttimeout: in objc, it's
necessary to
Hello,
My apologies, please forget the point numbered (2). My embarrassing bad.
regards
Saptarshi
2)Also if I'm calling PyObjc NSObject subclasses from Objective C -
i dont need to add underscores, i think the underscores are
only required if called Objective C methods (to get around the ":"
Hello,
1) I tried your suggestion
@classmethod
def setdefaulttimeout_(cls,timeout):
NSLog("Timeout")
and called
Class pySocket = NSClassFromString(@"pySocket");
[pySocket setdefaulttimeout:10];
And now I get a " Program received signal: “EXC_BAD_ACCESS”. and gdb
starts (Any inf
Try using:
def setdefaulttimeout_(cls,timeout):
Since your method would be setdefaulttimeout: in objc, it's necessary
to replace the ':' with an underscore in your Python code.
S
aka Steve Steiner
On Oct 18, 2008, at 6:15 PM, Saptarshi Guha wrote:
Hello,
I have a mainly cocoa app
Hello,
I have a mainly cocoa app which uses some Python modules. I need to
call a classmethod of a NSObject subclass written in
python from Cocoa
=Structure=
After loading the Python interpreter, i call this method
-(void)initialize
{
Class pySocket = NSClassFromString(@"pySocket");