Re: [Pyobjc-dev] Variadic ObjC methods
Brought to you by:
ronaldoussoren
|
From: Barry W. <bar...@gm...> - 2008-01-30 19:57:28
|
On Jan 30, 2008 11:45 AM, Ronald Oussoren <ron...@ma...> wrote:
>
> On 29 Jan, 2008, at 20:17, Michael McCracken wrote:
>
> > I was trying to init an NSGradient with the system PyObjC 2.0 in 10.5,
> > like this:
> >
> > aGradient =
> > NSGradient.alloc().initWithColorsAndLocations_(NSColor.blackColor(),
> > 0.0, NSColor.whiteColor(), 1.0, None)
> >
> > just a straight translation from ObjC. It didn't work:
> >
> > File "/Users/mmccrack/Products/Debug/Incoming.app/Contents/
> > Resources/INAnimActionView.py",
> > line 199, in drawRect_
> > aGradient.initWithColorsAndLocations_(NSColor.blackColor(), 0.0,
> > NSColor.whiteColor(), 1.0, None)
> > TypeError: Variadic functions/methods are not supported
>
> That's annoying, this is supposed to work. I'll have to look more
> closely to see what's going on, but my first guess is broken metadata.
>
Broken metadata for the initWithColorsAndLocations: seems likely to me
too. This does work:
In [2]: NSArray.arrayWithObjects_('abc',2,None)
Out[2]:
(
abc,
2
)
barry
|