[Gambas-user] Re; Adding new components

Benoit Minisini gambas at ...1...
Tue Sep 25 17:43:14 CEST 2007


On mardi 25 septembre 2007, Gareth Bult wrote:
> Ok,
>
> Clear yes, working no.
>
> It "seems" that I can only use pre-programmed constants and now
> user-defined constants .. ?
>
> This works;
>
> PUBLIC CONST _Properties AS String =
> "*,Host,Type{Select.None;Select.Single;Select.Multiple}=None,User,Password,
>Database"

Normally, Select.None;Select.Single;Select.Multiple should not work. But maybe 
I made more than I thought.

>
> This does not;
>
> PUBLIC CONST _Properties AS String =
> "*,Host,Type{DataTypes.None;MYSQL;ODBC}=None,User,Password,Database"
>
> With DataTypes.class as;
>
> PUBLIC CONST MYSQL AS String = "mysql"
> PUBLIC CONST ODBC AS String = "odbc"
>
> What am I doing wrong ?

Hmm... Where is the DataTypes.None constant?

And you should tell me the error you get each time, because this way I can 
make the IDE more robust against errors in component definition.

Note: I prefer having constants written with the first letter of each word in 
upper case, and the other in lower case. There are some exceptions like in 
the OpenGL component, but this is because the interface of the component 
comes from OpenGL, and was not designed for Gambas.

Regards,

-- 
Benoit Minisini




More information about the User mailing list