[Gambas-devel] component

Ken Schrock schrockk at ...26...
Mon Jun 9 21:31:37 CEST 2003


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

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?



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,ColumnView,"
        "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?

-- 
Using Lindows 






More information about the Devel mailing list