Hello,

I used a vector of sprites, the private Sprite_Type is the cursor type of the 
vector.
After I created 2 sprites SP1 and SP2 of Sprite_Type and I deleted SP1 with no 
error then I deleted SP2 with the error:
raised CONSTRAINT_ERROR : 
Gnoga.Gui.Element.Canvas.Context_2D.Sprite.Sprite_Lists.Element: Position 
cursor is out of range
I can't get SP2 element before deleting it.

Is it cursor tampering when deleting SP1?
If yes, I don't understand actually why.
Any clue?
Thus what should I take for Sprite_Type?

Thanks, Pascal.
http://blady.pagesperso-orange.fr


> Le 1 déc. 2016 à 21:24, Jeffrey R. Carter <jrcar...@acm.org> a écrit :
> 
> On 12/01/2016 12:46 PM, Pascal wrote:
>> Ok for Update_Interval.
>> Concerning access type, Sprite_Type is a limited record because of 
>> Context_2D_Type and Image_Data_Type are limited.
>> Thus Sprite_Type can't be part of Vector.
>> Maybe I could have used an array of Sprite_Type?
> 
> OK, then you have a valid reason, which it might be useful to document so you
> don't get similar comments from others who, like me, don't look closely enough
> at the declaration to realize it's limited. You can't use Indefinite_Vectors 
> either.
> 
> You could use an array, but then you'd have an upper limit on the number of
> sprites, either hard-coded or a generic parameter. If you want to keep it
> unbounded, you'd need to replicate the needed functionality from Vectors. That
> can probably be done for a specific limited type; generalizing it to
> Limited_Vectors is probably not possible.
> 
> -- 
> Jeff Carter
> "If you think you got a nasty taunting this time,
> you ain't heard nothing yet!"
> Monty Python and the Holy Grail
> 23
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to