mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 01:50:25 +00:00
Visual tweaks to dialogs. Show received array data in Watch List box.
This commit is contained in:
parent
e311e2ee35
commit
34950c80ea
|
@ -7653,8 +7653,10 @@ SUB showvWatchPanel (this AS vWatchPanelType, currentScope$, totalVisibleVariabl
|
||||||
IF usedVariableList(tempIndex&).subfunc = currentScope$ OR usedVariableList(tempIndex&).subfunc = "" THEN
|
IF usedVariableList(tempIndex&).subfunc = currentScope$ OR usedVariableList(tempIndex&).subfunc = "" THEN
|
||||||
IF usedVariableList(tempIndex&).isarray THEN
|
IF usedVariableList(tempIndex&).isarray THEN
|
||||||
seqIndex& = INSTR(usedVariableList(tempIndex&).indexes, MKL$(tempArrayIndex&))
|
seqIndex& = INSTR(usedVariableList(tempIndex&).indexes, MKL$(tempArrayIndex&))
|
||||||
storageSlot& = CVL(MID$(usedVariableList(tempIndex&).storage, seqIndex&, 4))
|
IF seqIndex& <= LEN(usedVariableList(tempIndex&).mostRecentValue) - 3 THEN
|
||||||
tempValue$ = vWatchArrayReceivedData$(storageSlot&)
|
storageSlot& = CVL(MID$(usedVariableList(tempIndex&).mostRecentValue, seqIndex&, 4))
|
||||||
|
tempValue$ = vWatchArrayReceivedData$(storageSlot&)
|
||||||
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
tempValue$ = usedVariableList(tempIndex&).mostRecentValue
|
tempValue$ = usedVariableList(tempIndex&).mostRecentValue
|
||||||
END IF
|
END IF
|
||||||
|
@ -7766,7 +7768,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
IF dialogHeight < 9 THEN dialogHeight = 9
|
IF dialogHeight < 9 THEN dialogHeight = 9
|
||||||
|
|
||||||
dialogWidth = 6 + maxModuleNameLen + maxVarLen + maxTypeLen
|
dialogWidth = 6 + maxModuleNameLen + maxVarLen + maxTypeLen
|
||||||
IF IdeDebugMode > 0 THEN dialogWidth = dialogWidth + 200 'make room for "= values"
|
IF IdeDebugMode > 0 THEN dialogWidth = dialogWidth + 100 'make room for "= values"
|
||||||
IF dialogWidth < 60 THEN dialogWidth = 60
|
IF dialogWidth < 60 THEN dialogWidth = 60
|
||||||
IF dialogWidth > idewx - 8 THEN dialogWidth = idewx - 8
|
IF dialogWidth > idewx - 8 THEN dialogWidth = idewx - 8
|
||||||
|
|
||||||
|
@ -7954,6 +7956,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
longestVarName = 0
|
longestVarName = 0
|
||||||
nextvWatchArraySlot = 0
|
nextvWatchArraySlot = 0
|
||||||
FOR y = 1 TO totalVariablesCreated
|
FOR y = 1 TO totalVariablesCreated
|
||||||
|
usedVariableList(y).mostRecentValue = ""
|
||||||
IF usedVariableList(y).watch THEN
|
IF usedVariableList(y).watch THEN
|
||||||
thisLen = LEN(usedVariableList(y).name)
|
thisLen = LEN(usedVariableList(y).name)
|
||||||
IF usedVariableList(y).isarray THEN
|
IF usedVariableList(y).isarray THEN
|
||||||
|
@ -7973,7 +7976,7 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
WHILE nextvWatchArraySlot > UBOUND(vWatchArrayReceivedData$)
|
WHILE nextvWatchArraySlot > UBOUND(vWatchArrayReceivedData$)
|
||||||
REDIM _PRESERVE vWatchArrayReceivedData$(1 TO UBOUND(vWatchArrayReceivedData$) + 999)
|
REDIM _PRESERVE vWatchArrayReceivedData$(1 TO UBOUND(vWatchArrayReceivedData$) + 999)
|
||||||
WEND
|
WEND
|
||||||
usedVariableList(y).storage = usedVariableList(y).storage + MKL$(nextvWatchArraySlot)
|
usedVariableList(y).mostRecentValue = usedVariableList(y).mostRecentValue + MKL$(nextvWatchArraySlot)
|
||||||
vWatchArrayReceivedData$(nextvWatchArraySlot) = ""
|
vWatchArrayReceivedData$(nextvWatchArraySlot) = ""
|
||||||
temp$ = MID$(temp$, 5)
|
temp$ = MID$(temp$, 5)
|
||||||
LOOP
|
LOOP
|
||||||
|
@ -7982,6 +7985,12 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
NEXT
|
NEXT
|
||||||
|
IF mousedown THEN
|
||||||
|
DO
|
||||||
|
GetInput
|
||||||
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
@ -8022,6 +8031,9 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
temp$ = parseRange$(v$)
|
temp$ = parseRange$(v$)
|
||||||
usedVariableList(varDlgList(y).index).indexes = temp$
|
usedVariableList(varDlgList(y).index).indexes = temp$
|
||||||
temp$ = formatRange$(temp$)
|
temp$ = formatRange$(temp$)
|
||||||
|
IF usedVariableList(varDlgList(y).index).watchRange <> temp$ THEN
|
||||||
|
usedVariableList(x).mostRecentValue = ""
|
||||||
|
END IF
|
||||||
usedVariableList(varDlgList(y).index).watchRange = temp$
|
usedVariableList(varDlgList(y).index).watchRange = temp$
|
||||||
ELSE
|
ELSE
|
||||||
usedVariableList(varDlgList(y).index).indexes = ""
|
usedVariableList(varDlgList(y).index).indexes = ""
|
||||||
|
@ -8232,12 +8244,24 @@ FUNCTION idevariablewatchbox$(currentScope$, filter$, selectVar, returnAction)
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
l$ = l$ + text$ + l3$
|
l$ = l$ + text$ + l3$
|
||||||
IF totalVisibleVariables = 1 THEN doubleClickThreshold = LEN(l$) - 1
|
IF totalVisibleVariables = 1 THEN doubleClickThreshold = LEN(l$) - 3
|
||||||
|
|
||||||
IF IdeDebugMode > 0 THEN
|
IF IdeDebugMode > 0 THEN
|
||||||
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
|
IF usedVariableList(x).subfunc = currentScope$ OR usedVariableList(x).subfunc = "" THEN
|
||||||
IF usedVariableList(x).watch THEN
|
IF usedVariableList(x).watch THEN
|
||||||
l$ = l$ + " = " + CHR$(16) + CHR$(variableNameColor) + StrReplace$(usedVariableList(x).mostRecentValue, CHR$(0), " ")
|
IF usedVariableList(x).isarray THEN
|
||||||
|
temp$ = usedVariableList(x).mostRecentValue
|
||||||
|
IF LEN(temp$) THEN l$ = l$ + " = " + CHR$(16) + CHR$(variableNameColor) + "{"
|
||||||
|
DO WHILE LEN(temp$)
|
||||||
|
storageSlot& = CVL(LEFT$(temp$, 4))
|
||||||
|
temp$ = MID$(temp$, 5)
|
||||||
|
l$ = l$ + StrReplace$(vWatchArrayReceivedData$(storageSlot&), CHR$(0), " ")
|
||||||
|
IF LEN(temp$) THEN l$ = l$ + ","
|
||||||
|
LOOP
|
||||||
|
IF LEN(usedVariableList(x).mostRecentValue) THEN l$ = l$ + "}"
|
||||||
|
ELSE
|
||||||
|
l$ = l$ + " = " + CHR$(16) + CHR$(variableNameColor) + StrReplace$(usedVariableList(x).mostRecentValue, CHR$(0), " ")
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
l$ = l$ + " <out of scope>"
|
l$ = l$ + " <out of scope>"
|
||||||
|
@ -8760,10 +8784,12 @@ FUNCTION idecallstackbox
|
||||||
idecentercurrentline
|
idecentercurrentline
|
||||||
ideselect = 0
|
ideselect = 0
|
||||||
|
|
||||||
DO
|
IF mousedown THEN
|
||||||
GetInput
|
DO
|
||||||
_LIMIT 100
|
GetInput
|
||||||
LOOP UNTIL mRELEASE
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
@ -10366,12 +10392,24 @@ FUNCTION ideinputbox$(title$, caption$, initialvalue$, validinput$, boxwidth, ma
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF K$ = CHR$(27) OR (focus = 3 AND info <> 0) THEN
|
IF K$ = CHR$(27) OR (focus = 3 AND info <> 0) THEN
|
||||||
|
IF mousedown THEN
|
||||||
|
DO
|
||||||
|
GetInput
|
||||||
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF K$ = CHR$(13) OR (focus = 2 AND info <> 0) THEN
|
IF K$ = CHR$(13) OR (focus = 2 AND info <> 0) THEN
|
||||||
ideinputbox$ = idetxt(o(1).txt)
|
ideinputbox$ = idetxt(o(1).txt)
|
||||||
ok = -1
|
ok = -1
|
||||||
|
IF mousedown THEN
|
||||||
|
DO
|
||||||
|
GetInput
|
||||||
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
'end of custom controls
|
'end of custom controls
|
||||||
|
@ -12040,6 +12078,12 @@ FUNCTION idesubs$
|
||||||
IF K$ = CHR$(27) OR (focus = 5 AND info <> 0) THEN
|
IF K$ = CHR$(27) OR (focus = 5 AND info <> 0) THEN
|
||||||
idesubs$ = "C"
|
idesubs$ = "C"
|
||||||
GOSUB SaveSortSettings
|
GOSUB SaveSortSettings
|
||||||
|
IF mousedown THEN
|
||||||
|
DO
|
||||||
|
GetInput
|
||||||
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
@ -12057,6 +12101,12 @@ FUNCTION idesubs$
|
||||||
idesx = 1
|
idesx = 1
|
||||||
|
|
||||||
GOSUB SaveSortSettings
|
GOSUB SaveSortSettings
|
||||||
|
IF mousedown THEN
|
||||||
|
DO
|
||||||
|
GetInput
|
||||||
|
_LIMIT 100
|
||||||
|
LOOP UNTIL mRELEASE
|
||||||
|
END IF
|
||||||
EXIT FUNCTION
|
EXIT FUNCTION
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ TYPE usedVarList
|
||||||
AS LONG id, linenumber, includeLevel, includedLine, scope, localIndex
|
AS LONG id, linenumber, includeLevel, includedLine, scope, localIndex
|
||||||
AS _BYTE used, watch, isarray
|
AS _BYTE used, watch, isarray
|
||||||
AS STRING name, cname, varType, includedFile, subfunc, mostRecentValue
|
AS STRING name, cname, varType, includedFile, subfunc, mostRecentValue
|
||||||
AS STRING watchRange, indexes, elements, storage 'for Arrays and UDTs
|
AS STRING watchRange, indexes, elements 'for Arrays and UDTs
|
||||||
AS _OFFSET baseAddress
|
AS _OFFSET baseAddress
|
||||||
END TYPE
|
END TYPE
|
||||||
|
|
||||||
|
@ -25955,7 +25955,6 @@ SUB manageVariableList (__name$, __cname$, localIndex AS LONG, action AS _BYTE)
|
||||||
usedVariableList(i).used = 0
|
usedVariableList(i).used = 0
|
||||||
usedVariableList(i).watch = 0
|
usedVariableList(i).watch = 0
|
||||||
usedVariableList(i).mostRecentValue = ""
|
usedVariableList(i).mostRecentValue = ""
|
||||||
usedVariableList(i).storage = ""
|
|
||||||
usedVariableList(i).linenumber = linenumber
|
usedVariableList(i).linenumber = linenumber
|
||||||
usedVariableList(i).includeLevel = inclevel
|
usedVariableList(i).includeLevel = inclevel
|
||||||
IF inclevel > 0 THEN
|
IF inclevel > 0 THEN
|
||||||
|
|
Loading…
Reference in a new issue