[Gambas-user] Using a Struct

2015-07-16 Thread Rolf-Werner Eilert
Never used a Struct, and now playing around with it I find the help texts cannot help me. This is what I tried: Public Struct Hund Wau As String End Struct Public Sub Button3_Click() Dim Wauwau As New Hund Wauwau.Wau = "Bone" Everything ok, but it's ONE Wauwau only. From the descriptio

[Gambas-user] Conversion of datacheckbox control value from text to integer

2015-07-16 Thread Martin McGlensey
Good Morning, I have a MySQL database containing data moved from Access. There are four checkbox fields containing text data (TRUE or FALSE). In my Gambas app these fields are contained in a datasource that supplies data to four datacheckbox controls. The app throws an error "Wanted integer but

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Tobias Boege
On Thu, 16 Jul 2015, Rolf-Werner Eilert wrote: > Never used a Struct, and now playing around with it I find the help > texts cannot help me. This is what I tried: > > Public Struct Hund >Wau As String > End Struct > > Public Sub Button3_Click() > Dim Wauwau As New Hund > > Wauwau.Wau =

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Rolf-Werner Eilert
Am 16.07.2015 16:05, schrieb Tobias Boege: > On Thu, 16 Jul 2015, Rolf-Werner Eilert wrote: >> Never used a Struct, and now playing around with it I find the help >> texts cannot help me. This is what I tried: >> >> Public Struct Hund >> Wau As String >> End Struct >> >> Public Sub Button3_Cli

Re: [Gambas-user] Conversion of datacheckbox control value from text to integer

2015-07-16 Thread Randall Morgan
Yes, -1 for True and 0 for false. I would bet that the conversion from access changed boolean fields to string fields. I would add a column for boolean values and then insert the values based on the contents of the string field. Then drop the string fields and rename the boolean columns. Then I th

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Randall Morgan
Rolf, I think the structure description in the documentation may have mislead you. Structures are not real arrays and cannot be used like an array in most cases. But they are implemented as arrays. Structures are a data type. They organize your data into a manageable container. Your code only imp

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Rolf-Werner Eilert
Randall, Thank you for making that clear. Is it possible to make something like an array out of a whole structure? What would this code look like? Am 16.07.2015 17:02, schrieb Randall Morgan: > Rolf, > > I think the structure description in the documentation may have mislead > you. Structures a

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Tobias Boege
On Thu, 16 Jul 2015, Rolf-Werner Eilert wrote: > Randall, > > Thank you for making that clear. Is it possible to make something like > an array out of a whole structure? What would this code look like? > Yes, you can use a Struct just as you use classes. I believe I sent you a link yesterday wh

Re: [Gambas-user] Using a Struct

2015-07-16 Thread Randall Morgan
Thanks Tobias, I am still a bit slow and fuzzy but doing better. I will slowly start doing more and I am working (very slowly) on a couple articles for the magazine. At the moment my energy is very limited On Thu, Jul 16, 2015 at 9:56 AM, Tobias Boege wrote: > On Thu, 16 Jul 2015, Rolf-Wern