Dictionary_Find GPF
issueid=391 27-03-2013 16:31
Super Moderator
Number of reported issues by Petr Schreiber: 162
Dictionary_Find GPF
Dictionary_Find GPFs in ThinBASIC


it seems the Dictionary is a bit broken in ThinBASIC, the following example GPFs for me on Dictionary_Find:
Uses "Dictionary"

DWord dict = Dictionary_Create(64, TRUE)
Dictionary_Add(dict, "Item", "Something")
MsgBox 0, Dictionary_Find(dict, "Item")
The issue also affects the dictionary class, where I get GPF on dict.Find again:
Uses "Dictionary"

Dim dict As cDictionary 
dict = New cDictionary(64, TRUE)
dict.Add("Item", "Something")
MsgBox 0, dict.Find("Item")

Issue Details
Issue Number 391
Project thinBasic
Category Unknown
Status Fixed
Priority 2
Affected Version 1.9.2
Fixed Version 1.9.6
Milestone (none)
Users able to reproduce bug 1
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

28-04-2013 16:39
Super Moderator
The problem still exists in, this example GPFs for me in find method:
Uses "Console"
Uses "Dictionary"

DWord pDictionary = Dictionary_Create(1024, TRUE)   
PrintL "Dictionary created:", pDictionary

Dictionary_Add(pDictionary, "TileGrass.bmp", "513")
PrintL "Key added"

Dictionary_Find(pDictionary, "TileGrass.bmp")
PrintL "Key found, press any key to quit..."

+ Reply