[Gambas-user] Possible bug with ColorPalette

Cedron Dawg cedron at exede.net
Thu Jul 2 20:25:44 CEST 2020


The two functions appear to be synonyms.  They both work the same for me.

I just tested with "Extract" in place, no difference in behavior.   There was not a question of the return value being the removed members, that worked.  It is that the original list remains unaltered.  For Extract, that makes sense, for Delete, it doesn't.


----- Original Message -----
From: "Hans Lehmann" <hans at gambas-buch.de>
To: "user" <user at lists.gambas-basic.org>
Sent: Thursday, July 2, 2020 11:53:46 AM
Subject: Re: [Gambas-user] Possible bug with ColorPalette

Hello. 

p.d. 

ColorsInteger[].Extract (gb) 

Function Delete ( Start As Integer [ , Length As Integer ] ) As Integer[] 
Function Extract ( Start As Integer [ , Length As Integer ] ) As Integer[] 

Removes one or more elements from the array, and returns them. 

If Length is -1, then all elements from the specified Start to the end of the array are removed. 


Public Sub ButtonDelete1_Click() 

Dim iArray As Integer[] = ColorPalette1.Colors 

iArray = ColorPalette1.Colors.Delete(0, 3) 
ColorPalette1.Colors = iArray 

End 

Works exactly as specified... . 

Regards 

Hans 


----[ http://gambaswiki.org/wiki/doc/netiquette ]---- 



More information about the User mailing list