Re: [Pyobjc-dev] Default to returning (void)?
Brought to you by:
ronaldoussoren
From: Marc-Antoine P. <map...@ac...> - 2004-02-16 15:18:22
|
Le 04-02-16, =E0 00:00, b.bum a =E9crit : > Barring automated intelligence, being able to do something like the=20 > following would be preferable to the crypting exposed signatures we=20 > have today. > > def setContent_(self, someContent): > print "Setting content...." > self._content =3D someContent > setContent_ =3D selector(setContent_, type=3D'setter') > objc.makeSetter(setContent_) # this would be even better > > def takeAction_(self, sender): > pass > takeAction_ =3D selector(takeAction_, type=3D'action') ... Le 04-02-16, =E0 00:11, Bob Ippolito a =E9crit : > Why not objc.getter / objc.setter / objc.action? This is really why=20= > Python needs a way to decorate functions that isn't so f*!@#!ing ugly. I am just a clueless lurker, but +1 to having those transformations=20 sooner rather than later, with as nice a name as you all can devise. If=20= we also get syntax sugar at some point, as per Michael Hudson's post,=20 all the better, but I feel that we (PyObjC users) need a way to say=20 those things that does not depend on ObjC selector syntax. Aside: I just had a look at the Cocoa Bindings documentation, and was=20 very impressed. I do hope we will be able to exploit this from PyObjC=20 as seamlessly as possible, and if my (still very, very limited)=20 understanding of PyObjC serves me right, following the K-V standards is=20= still a stumbling block, and this would definitely help. Please correct=20= me if I got it all wrong, and it is totally unrelated after all! Marc-Antoine |