BugšŸ›: Issue with ā€œvariable nestingā€

AkashiDom

Active member
I don't know what you call this: ā€œ{lv=Array[{lv=Interger}]}ā€, but I call that ā€œvariable nestingā€.

I found a bug when nesting variable:​

Screenshot_20240129_144147.jpg
Configure: ^

Screenshot_20240129_144152.jpg
Dialog: ^
The title work because I found a fix to it. DON'T MIND THE TITLE

So as you can see, the dialog show is bugged HOWEVER,

The variable is defined​

Screenshot_20240129_144211.jpgScreenshot_20240129_144217.jpg
Everything is defined



So I tried something and I found that

I found a solution​

Screenshot_20240129_144253.jpg
Check the Display Dialog input, I forgot to screenshot it

Screenshot_20240129_144325.jpg


Not only that, I also tried this and it worked:​

Screenshot_20240129_144352.jpg

Screenshot_20240129_144356.jpg


So the problem is the nesting(maybe)
 
  • Like
Reactions: Vix

Dm114

Well-known member
I don't know what you call this: ā€œ{lv=Array[{lv=Interger}]}ā€, but I call that ā€œvariable nestingā€.

I found a bug when nesting variable:​

View attachment 8402
Configure: ^

View attachment 8403
Dialog: ^
The title work because I found a fix to it. DON'T MIND THE TITLE

So as you can see, the dialog show is bugged HOWEVER,

The variable is defined​

View attachment 8404View attachment 8405
Everything is defined



So I tried something and I found that

I found a solution​

View attachment 8406
Check the Display Dialog input, I forgot to screenshot it

View attachment 8407


Not only that, I also tried this and it worked:​

View attachment 8408

View attachment 8409


So the problem is the nesting(maybe)
What you are calling "variable nesting" is and works as Arrays or Dictionaries.

In both cases every item can be of any type. Even another (nested) Array or Dictionary. Mixing these types (multi level Arrays or Dictionaries) are sometimes a bit complex to deal with but works well anyway. Mainly since last improvements in recent MD versions.
 

AkashiDom

Active member
What you are calling "variable nesting" is and works as Arrays or Dictionaries.

In both cases every item can be of any type. Even another (nested) Array or Dictionary. Mixing these types (multi level Arrays or Dictionaries) are sometimes a bit complex to deal with but works well anyway. Mainly since last improvements in recent MD versions.
Well in the image, I'm (nesting) an Interger inside array of a dictionary.
Code:
{lv=TEMP[DIARY RENDER][entries][{lv=TEMP[PAGE]}][entry]}

I'm nesting Interger of PAGE inside DIARY RENDER[entries] and for some reason, it didn't work
 

Dm114

Well-known member
Well in the image, I'm (nesting) an Interger inside array of a dictionary.
Code:
{lv=TEMP[DIARY RENDER][entries][{lv=TEMP[PAGE]}][entry]}

I'm nesting Interger of PAGE inside DIARY RENDER[entries] and for some reason, it didn't work
What is not working exactly?

Your nesting is a bit complex and looks like this:
Main dictionary called "TEMP" containing (among all)
+- a dictionary called "DIARY TENDER" containing
+-- a dictionary called "entries" containing
+--- a dictionary called "0" containg 3 entries called "data", "entry" and "unix" (string+string+integer variables)

Is it correct?
 

AkashiDom

Active member
What is not working exactly?

Your nesting is a bit complex and looks like this:
Main dictionary called "TEMP" containing (among all)
+- a dictionary called "DIARY TENDER" containing
+-- a dictionary called "entries" containing
+--- a dictionary called "0" containg 3 entries called "data", "entry" and "unix" (string+string+integer variables)

Is it correct?
Sorry, I was playing game

Almost
The second one is actually an array.

However the others are correct
 

Dm114

Well-known member
Sorry, I was playing game

Almost
The second one is actually an array.

However the others are correct
Ok. As there is no screenshot about "entries", the "0" key could be an array as well as a dictionary. But it doesn't change anything: both work the same.

2 questions:
- are you sure you need such a complex nesting?
- what is exactly the problem you are facing now?
 

AkashiDom

Active member
Ok. As there is no screenshot about "entries", the "0" key could be an array as well as a dictionary. But it doesn't change anything: both work the same.

2 questions:
- are you sure you need such a complex nesting?
- what is exactly the problem you are facing now?
The problem is, when I get value of TEMP Ā» DIARY RENDER Ā» entries Ā» (TEMP Ā» PAGE) Ā» entry, it shows the magic text instead of the value.
 

Dm114

Well-known member
The problem is, when I get value of TEMP Ā» DIARY RENDER Ā» entries Ā» (TEMP Ā» PAGE) Ā» entry, it shows the magic text instead of the value.
I guess MD is a bit "lost" lost with such nesting and is not able to refer to itself in addressing an item.

As "TEMP[PAGE]" is a plain integer variable, I would suggest to set an integer variable with "TEMP[PAGE]" value and then integrate this variable name in your expression instead of "TEMP [PAGE]"
 
Top