Page 1 of 1

Variable Viewer tool

Posted: Fri Jun 11, 2021 8:09 pm
by spikey
Consider the following module:

Code: Select all

DeclareModule TestM
  Enumeration MyEnum
    #EnumA1
    #EnumA2
    #EnumA3
    #EnumA4
  EndEnumeration
  
  Structure MyStructure1
    Member1.I
    Member2.I
  EndStructure
  
EndDeclareModule

Module TestM
  Enumeration MyEnum
    #EnumB1
    #EnumB2
    #EnumB3
    #EnumB4
  EndEnumeration
  
  Structure MyStructure2
    Member1.I
    Member2.I
  EndStructure
  
EndModule
There are a couple of issues here:
The editor Variable Viewer tool can't see MyStructure2 or the 'B' series enums at all. I'm inclined to think both these items should be visible when the module's file is the active one and the private scope is valid and invisible when an out of scope file is displayed. (Contrast this with the behaviour of autocomplete).

This enum isn't actually logical because the continuation causes it to cross the public/private divide. This should probably be a warning if not a syntax error?

(5.73, 64-bit on Windows 7)
Edit: Bolded editor for distinction.

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 8:27 am
by mk-soft
I don't see any variables created, only type declarations. Enumerations are not variables!

With Variables ...

Code: Select all

DeclareModule TestM
  Enumeration MyEnum
    #EnumA1
    #EnumA2
    #EnumA3
    #EnumA4
  EndEnumeration
  
  Structure MyStructure1
    Member1.I
    Member2.I
  EndStructure
  
  Global MyVar1.MyStructure1
  
EndDeclareModule

Module TestM
  Enumeration MyEnum
    #EnumB1
    #EnumB2
    #EnumB3
    #EnumB4
  EndEnumeration
  
  Structure MyStructure2
    Member1.I
    Member2.I
  EndStructure
  
  Global MyVar2.MyStructure2
  
EndModule

CallDebugger

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 11:10 am
by spikey
The Variable Viewer tool doesn't just show variables. I thought it would be self evident that a bug affecting Structures and Enumerations would require the changing of the object type combo box. Apparently not.

But now that you mention it - the variable output is incomplete in your example too - MyVar2 is missing from the output. Again contrast this with the Autocomplete behaviour.

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 11:51 am
by mk-soft
All ok here.

Variables with structures is a tree inside the variable viewer. Double click on variable open the tree

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 1:26 pm
by skywalk
The variable viewer has been limited to useless since the beginning.
It should allow multiple instance and float to support simultaneous viewing of any variable types.

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 5:59 pm
by spikey
spikey wrote: Fri Jun 11, 2021 8:09 pm The editor Variable Viewer tool
NOT the debugger Variable Viewer tool. There's a distinction...

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 7:06 pm
by mk-soft
You are right, it's a bug !?

Re: Variable Viewer tool

Posted: Sat Jun 12, 2021 8:03 pm
by spikey
:lol: I have to say that I was questioning my own sanity for a while there...