[Gambas-devel] How to pass objects and access their properties

Benoît Minisini gambas at ...1...
Fri Feb 3 20:17:10 CET 2012

Le 02/02/2012 22:48, Randall Morgan a écrit :
> Hi Benoit,
> I have a skeleton Complex class now but I am having difficulty locating
> any sample code that shows how to pass an object in to a method and
> access it's properties.
> The reason I want to do this is that complex numbers have a real and
> imaginary component. libgsl defines these as a structure containing two
> doubles. So my class
> contains two properties real, and imag. Rather than having the user
> write something like:
> Q.Add(V.real, V.imag)
> I would prefer the user be able to simply pass in the complex object and
> let the underlying code access the properties of the object.
> So can you point me to some sample code where I can see how this might
> be done?
> Thanks,
> Randall

If you want some answers, I need that you commit your new source files! 
(svn add + svn commit)


Benoît Minisini

More information about the Devel mailing list