[Pythonmac-SIG] Some question about pyobjc and creating nib based application...

whamoo whamoo at rknet.it
Tue Jan 4 19:20:18 CET 2005


Hello,

There's somethings i cannot understand about creating nib based 
application,
Ok I start interface builder, build gui, create outlet, create action, 
saving, create python file starting by the nib, and having a thing like 
this:

----------------------------------------------

import objc
from Foundation import *
from AppKit import *
from PyObjCTools import NibClassBuilder, AppHelper


NibClassBuilder.extractClasses("MainMenu")


# class defined in gino.nib
class finestra(NibClassBuilder.AutoBaseClass):
     # the actual base class is NSObject
     # The following outlets are added to the class:
     # button
     # label

     def change_(self, sender):
         self.label.setStringValue_("Prova")



if __name__ == "__main__":
     AppHelper.runEventLoop()

----------------------------------------------

Ok, finestra is the base class and all works, but why is the base 
class? if i create more class??
I've tried xcode template, but if I modify the AppDelegate nib and add 
the function in python file, it give me this error:

Could not connect the action change_: to target of class provaDocument

And i don't know why =P

I need to know what is the base class, i can chose? There's somethings 
that I probably miss, someone can help?

Thanks a lot.

Whamoo www.rknet.it
Powered by:
- MacOsX
- Gnu / Linux Debian Sarge
- Amiga Os 3.9
- Milk



More information about the Pythonmac-SIG mailing list