[Gambas-user] Another basics

Randall Morgan rmorgan62 at ...626...
Sat Jan 7 06:24:04 CET 2012


Hi,

I've been writing a book on Gambas though work took me away from the
project for a bit. I've decided to get back to it. I am no writer but I too
saw the need for a better text on Gambas. There is a wiki but it has
limited information. I've been writing this using Lyx but will post it on
the web. Perhaps those who use it can give me feed back. I am dyslexic and
so you can expect to find a LOT of spelling errors in my docs. So any help
in correcting them and any technical direction would be nice.

I'll post back here one I have it up.

Randall



On Fri, Jan 6, 2012 at 7:55 AM, M. Cs. <mohareve at ...626...> wrote:

> Hello Fabien,
> and I also think it would be nice to hear about how to keep the code
> clean. I have to rewrite the things in order to have a program without
> unfreed allocations.
> What I intend to do is to use more private variables on modules and
> well defined functions to access to them across the modules if needed.
>
> 2012/1/6, Fabien Bodard <gambas.fr at ...626...>:
> > well :)
> >
> > i'm not a true professionnal of computing so words i use are not good.
> > (and my english is really bad)
> >
> > In a class you have 3 time
> >
> > _Init
> > Called only one time at the first use of the class
> >
> > _New
> >  Called at each NEW instantiation
> >
> > _Free
> >  Called when a classe is freed (when the ref to this class instance
> > not stored anywhere)
> >
> >
> >
> >
> > You can access a public var from anywhere but this var is linked to an
> > instance
> >
> > If you use static public the var is accessible from the class name
> > like with a module and not depend of an instance. (it allow for
> > example to share a value between each instance of a class
> >
> > Private var is accessible ony from the sub of the current class
> >
> > static private can be used only from a static sub.
> >
> >
> >
> > I use public var for property that just store a value and can be
> > accessed in read write mode
> >
> > i use property  for value that need controle or that generate an event
> >
> >
> > for example
> > dim $iX as private
> > property X as integer
> >
> > Private X_Read() as Integer
> > return  $iX
> > end
> >
> > Private X_Write(Value as integer)
> >   $iX = min(Value,100)  'max 100
> >   RefreshDraw()   'redraw the object when the x is changed
> > end
> >
> >
> > You can use Property Read for a read only value
> >
> >
> > this is some basis.....
> >
> > --
> > Fabien Bodard
> >
> >
> ------------------------------------------------------------------------------
> > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> > infrastructure or vast IT resources to deliver seamless, secure access to
> > virtual desktops. With this all-in-one solution, easily deploy virtual
> > desktops for less than the cost of PCs and save 60% on VDI infrastructure
> > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
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?



More information about the User mailing list