[Gambas-user] Signal #11 (was Return Code 245 from SDL)

Benoit Minisini gambas at ...1...
Tue Nov 22 11:01:31 CET 2005


On Tuesday 22 November 2005 00:38, Dominique SIMONART wrote:
> Hi everybody,
>
> I think I found the origine of the message! Here is how to produce it:
>
> a GridView on a Form
>
> Form1_Open()
> 	grd1.Rows.Count = 1
> 	grd1.Columns.Count = 1
> 	grd1[0,0].Clear
> 	grd1[0,0].Picture.Load("myPath" &/ "myFile")	' --> signal #11
> END
>

The GridView[x, y].Clear() method does not work correctly, do not use it.

But the next line can't work anyway, as you can only use the Load method on an 
existing picture, and the picture of a void cell is a null object.

You must do:

DIM hPict AS NEW Picture

hPict.Load(...)
grd1[0, 0].Picture = hPict

Regards,

-- 
Benoit Minisini





More information about the User mailing list