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

Randall Morgan rmorgan62 at ...176...
Mon Feb 6 12:38:29 CET 2012


Hi Benoit,

Thanks for the pointers. I have changed my files to include your
suggestions. I changed the naming of my classes after spending a lot of
time looking at the PDF component. I guess that's not the best example but
does seem to deal with several of the issues I face in the gsl project.

I do have another question. It turns out that not all of the gsl library is
contained in the libgsl.so. For many functions there are other supporting
libraries. I need to link to libgslcblas.so so how do I add this to the
project? Is this something that need to be put into the Makefile.am in the
source directory?

Thanks,

Randall



2012/2/3 Benoît Minisini <gambas at ...1...>

> 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)
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
>



-- 
If you ask me if it can be done. The answer is YES, it can always be done.
The correct questions however are... What will it cost, and how long will
it take?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/devel/attachments/20120206/45d9100c/attachment.html>


More information about the Devel mailing list