[Gambas-devel] component
Benoit Minisini
gambas at ...20...
Mon Jun 9 19:23:21 CEST 2003
Le Lundi 9 Juin 2003 21:31, Ken Schrock a écrit :
> I have a few small problems (I am using 0.57)
>
> I copied the example component, hacked it up
> And changed all the files to C2Example.x, 2example.x etc
> And then added 2Example to configure.in and makefile.in
> And changed the class name to 2Example
> Did the component file, help, etc
>
> It compiled and installed ok
> But the statement
>
> DIM hExample as 2Example
>
> Caused a gambas core dump (92k) during syntax check
Score ! You found a bug in the compiler.
>
> Simply changing only the class name in Desc
> To anExample made it work just fine
>
> DIM hExample as anExample
>
> Even though everything else is still 2Example
> Syntax checker or class loader hates leading numbers. A feature?
A symbol cannot begin by a number. So far a class name !
>
>
>
> Then, from what it says in the comments
> (yes, I read them before hacking them to death : -)
>
> /* The GB_INFO_CONTROL information is a list of the graphics
> controls included
> in the component. This information is used by the development
> environment
> to fill the toolbox.
> */
> case GB_INFO_CONTROL:
>
> /* This is the list returned by the QT component ! */
>
> *result = (void *)
>
> "Label,Image,TextLabel,ProgressBar,Button,CheckBox,RadioButton,ToggleButton
>,"
>
> "TextBox,ComboBox,TextArea,ListBox,ListView,TreeView,IconView,GridView,Colu
>mnView," "Frame,Panel,TabStrip,ScrollView,DrawingArea,Timer";
>
> I figured that "Timer" here makes the IDE load
> /opt/gambas/lib/control/timer.png to toolbox
> So I made a sys.png in that directory (actually in the src dir, as this
> overwrites the other)
> And then made *result = (void *)"Sys"; Rebuilt and tried it. No go.
> What's needed?
First, at the moment, the IDE can manage controls only if they are QT based,
like for the gb.qt.ext or gb.qt.editor component.
Did you check your component in the component tab of the project properties
dialog ?
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list