app crash on click treeList
Brought to you by:
md9327
Version 1.2.5
' Modulo : CProjectPanel.class
' In funtion
PUBLIC SUB TreeList_MouseUp()
DIM key AS String[] = Split(ME.TreeList.Current.key, "&")
SELECT CASE key[0]
CASE "WGArea", "WPDomain", "WPProcedure", "WGRelation", "WPSequence",
"WPTable", "WPTablespace", "WPText", "WPTrigger", "WPView"
'ME.SelectByName(ME.TreeList.Current.Text)
'ME.SelectByName(key[1], Val(key[2])) 'this line causes crash in app
'Fix by ctineo with this
ME.SelectByName(ME.TreeList.Current.key)
CApp.MenuEditUpdate()
END SELECT
END
Logged In: YES
user_id=41812
Originator: NO
What operating system are you using?
Version of the distribution?
Version Gambas?
This information I would be very useful.
I thank you for the suggested changes, but had already been rectified thanks to another report, if the error occurs, it is very likely that the case is caused by other events. The decoding key is necessary because it contains the information needed to identify the object in treelist; switching the whole key, the function failed to find a way. In the light signals that I do not think that this is the last change, are you sure you have checked out the exact content of the function?
I await your responses.
Bye
Logged In: NO
Add by ctineo
In version 1.2.5
'20080420 - Bug by Luis Gonzalo Constantini Von Rickel
fix with
TRY ME.SelectByName(key[1], Val(key[2]))
but the arguments for SelectByName(string, optional integer)
the val of key[1] contain integer
Logged In: YES
user_id=41812
Originator: NO
This should not happen.
The key of the treelist is a string, which is exploded in its elements, so the result is a number of smaller strings.
If the value of the second element is a number, it means that there is some problem with the interpreter of Gambas.
From my testing I can not reproduce the error, and variance reporting always strings improperly.
What operating system do you use? For case is the latest version of Ubuntu?
Logged In: YES
user_id=41812
Originator: NO
The errors on the selection of the elements in treelist, is caused by problems with reading files SQL, or by errors of reading information from the database, which create abnormal items and then not properly encoded within pgDesigner, so the anomalies are not Directly related to treelist.
I found some of these bugs and, unless they leave other strange problems, should have already solved, so the next release will contain these corrections.
I thank you for reporting and for the aid.