[Rubycocoa-devel 786] Re: Return value by reference

Zurück zum Archiv-Index

Tom Fuerstner i.scr****@gmail*****
Wed Feb 28 23:08:58 JST 2007


Hi Laurent,

I did exactely that within a well initialized Cocoa program but all I get is :

"Not enough arguments (expected 1, given 0)"

That made me curious !?

Tom

On 2/27/07, Laurent Sansonetti <lsans****@apple*****> wrote:
> Hi Tom,
>
> The easiest way to deal with functions/constants that return
> parameters by reference is to omit passing them, and RubyCocoa will
> return them packed in an array with the regular return value.
>
> For example:
>
> count = OSX::NSCountWindows()
>
> # Note that this function must be called within an initialized Cocoa
> program, otherwise it may return unexpected results.
>
> Laurent
>
> On Feb 27, 2007, at 6:39 PM, Tom Fuerstner wrote:
>
> > hello,
> >
> > can some please give an example how to implement an Appkit function
> > which returns a value by reference.
> >
> > e.g.: void NSCountWindows(int *count)
> >
> > How is this best translated into RubyCocoa?
> >
> > thanx.
> >
> >
> > Tom Fuerstner
> > _______________________________________________
> > Rubycocoa-devel mailing list
> > Rubyc****@lists*****
> > http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel
>
> _______________________________________________
> Rubycocoa-devel mailing list
> Rubyc****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel
>



More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index