[Gambas-user] Signal #11 (was Return Code 245 from SDL)
Dominique SIMONART
simonart.dominique at ...11...
Tue Nov 22 22:59:11 CET 2005
Le Mardi 22 Novembre 2005 11:01, Benoit Minisini a écrit :
> 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,
Thanks Benoit,
In fact, it is the way you say I use in my real project (89 pictures loaded at
the start time and then I initialise my GridViews with them. As soon as I
suppress the Clear method, everything works fine.
Is there another way to erase my picture? Actually, I just put another picture
in it to simulate the absence of picture!! It is like you repaint the
blackboard each time instead of wash it!
regards
Dominique
More information about the User
mailing list