[Gambas-user] gb3: converting structures to classes
nando
nando_f at ...951...
Mon Feb 6 15:36:29 CET 2012
I am doing the same thing.
Using class in place of structures.
Then arrays or collections of the classes.
Works great!
---------- Original Message -----------
From: Kevin Fishburne <kevinfishburne at ...1887...>
To: gambas-user at lists.sourceforge.net
Sent: Sun, 05 Feb 2012 02:39:43 -0500
Subject: [Gambas-user] gb3: converting structures to classes
> I tried to find the previous email suggesting this and couldn't, neither
> is there an equivalent wiki article describing class creation as there
> is with structure creation, so I'm asking here.
>
> I need to know how to convert structure declarations to class
> declarations, and if there are any obvious syntactical differences in
> declaration, assignment as properties to other classes, or assigning
> actual data. I'm using structures like this:
>
> Public Struct Client_Animation
> Animating As Boolean
> OrientationDefault As Single
> OrientationBegin As Single
> OrientationEnd As Single
> OrientationCurrent As Single
> OrientationVelocity As Single
> PositionDefaultX As Single
> PositionDefaultY As Single
> PositionBeginX As Single
> PositionBeginY As Single
> PositionEndX As Single
> PositionEndY As Single
> PositionCurrentX As Single
> PositionCurrentY As Single
> PositionVelocityX As Single
> PositionVelocityY As Single
> End Struct
>
> Public Struct Client_Gear
> Orientation As Single
> Scale As Single
> SizeCap As Short
> SizeStem As Short
> Skin As Short
> Type As Short
> Animation As Struct Client_Animation
> End Struct
>
> The logic behind the change is wanting these (numerous) structure
> declarations to be contained within their own module for organizational
> purposes and to be accessible between modules. It was suggested in
> previous emails that this was possible using classes instead of
> structures. Thanks everyone.
>
> --
> Kevin Fishburne
> Eight Virtues
> www: http://sales.eightvirtues.com
> e-mail: sales at ...1887...
> phone: (770) 853-6271
>
> ------------------------------------------------------------------------------
> 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-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------
More information about the User
mailing list