[Gambas-user] store a emtpy string in a collection key? how ?

Tobias Boege taboege at gmail.com
Wed Jun 13 21:36:14 CEST 2018


On Wed, 13 Jun 2018, PICCORO McKAY Lenz wrote:
> store a emtpy string in a collection key , how? due when i try to do, i get
> that this key are excluded from the collection!
> 

The empty string is equal to Null in Gambas and assigning Null to a
collection slot deletes it. You can get around this limitation, but you
have to create the logic yourself.

For example JSONCollection [1] from gb.web allows you to store a Null-ish
value, but instead of Null itself, you have to store the special token
JSON.Null (which is actually not Null, if you're still with me).

Regards,
Tobi

[1] http://gambaswiki.org/wiki/comp/gb.web/jsoncollection

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk


More information about the User mailing list