Variable Viewer tool

Post bugs related to the IDE here
User avatar
spikey
Enthusiast
Enthusiast
Posts: 396
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Variable Viewer tool

Post 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.
Last edited by spikey on Sat Jun 12, 2021 6:01 pm, edited 1 time in total.
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Variable Viewer tool

Post 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
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
spikey
Enthusiast
Enthusiast
Posts: 396
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Variable Viewer tool

Post 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.
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Variable Viewer tool

Post by mk-soft »

All ok here.

Variables with structures is a tree inside the variable viewer. Double click on variable open the tree
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
skywalk
Addict
Addict
Posts: 3532
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Variable Viewer tool

Post 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.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
spikey
Enthusiast
Enthusiast
Posts: 396
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Variable Viewer tool

Post 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...
User avatar
mk-soft
Addict
Addict
Posts: 3110
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Variable Viewer tool

Post by mk-soft »

You are right, it's a bug !?
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace
User avatar
spikey
Enthusiast
Enthusiast
Posts: 396
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Variable Viewer tool

Post by spikey »

:lol: I have to say that I was questioning my own sanity for a while there...
Post Reply