[Gambas-user] Help about writing component

Sahastume Christian christian.sahastume at ...11...
Sat Mar 27 15:13:51 CET 2004


Hello,

I nead some help about component writing.

I have just begun the writing of a new component allowing the access to the 
CD-Audio via the SDL library.
The methods and interface properties are as follows:

Cdrom.Open (STRING device) 
Cdrom.Close()
Cdrom.Eject()
Cdrom.PlayAllTracks()
Cdrom.Pause()
Cdrom.Resume()
Cdrom.Stop()
Cdrom.Status() --> return "No disc, Playing, Paused, Stopped, Error)
Cdrom.Devices.Count()  --> number of cdrom drives on your system
Cdrom.Tracks.Count()  --> number of tracks present on the CD
Cdrom.Track.Play(INTEGER track, Optional INTEGER duration)
Cdrom.Track.PlayFirst()  --> play first track
Cdrom.Track.PlayLastrack() --> play last track
Cdrom.Track.Previous()  --> play previous track
CdromTrack.Next()    -->play next track
Cdrom.Track.Rewind(Optional INTEGER Step) --> (1 step = 1 seconde)
Cdrom.Track.Forward(Optiona INTEGER Step)
Cdrom.Track.CurrentPos  --> position of the current track

I made a success of compilation of the component and i see all methods and 
properties in Gambas. But my component don't work....

I'have tried this code:

PUBLIC MyCD as Cdrom

PUBLIC SUB Main()
DIM i as INTEGER
	i = MyCD.Devices.Count()
	PRINT i
END

A messagebox said me: "Program return value: 1"
The console say: "ERROR: #24: No starting Method"

I'm not an informatician (and even less programmer), then excuse if my 
questions are stupids and my code so bad....
I join to my mesage the component for analysis and a little assistance....  
thank you in advance 

Regards.

Christian.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdrom.tar.bz2
Type: application/x-tbz
Size: 3241 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20040327/276b8c3c/attachment.bin>


More information about the User mailing list