The message is not very usefull, but there is a problem with your code.
The
following version does work:
class HelloWorld (Foundation.NSObject):
def sayIt(self):
self.text = "Hello world"
Note the 'self' argument for sayIt. You have to specify a self argument
for all method definitions.
Ronald
On Thursday, Oct 24, 2002, at 07:52 Europe/Amsterdam, Steven D. Arnold
wrote:
> When trying to do a simple program, I discovered the following error,
> which
> I entered line for line in the python interpreter.
>
>>>> import sys
>>>> import os.path
>>>> sys.path.insert(0, os.p>>> >>> >>> ath.join(sys.path[0], "pyobjc"))
>>>> import objc
>>>> import Foundation
>>>> import AppKit
>>>> class HelloWorld(Foundation.NSObject):
> ... def sayIt():
> ... self.text = "Hello World"
> ...
> No IMP for signature @@
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> objc.error: No forwarder for signature @@
>
> I tracked this down to the quoted text being the problem. If the
> sayIt()
> function doesn't include quoted text (either single- or
> double-quotes), the
> program doesn't raise an exception like this.
>
> I am using the CVS version of the software, downloaded a few days ago.
> --
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: Influence the future
> of Java(TM) technology. Join the Java Community
> Process(SM) (JCP(SM)) program now.
> http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/
> javavote
> _______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
|