Skip to content

Unresolved variable in experiment prevent populating dropdown menu #786

@tnguyenh

Description

@tnguyenh

Describe the bug
I use a variable to store a list of options to populate a dropdown menu. It points towards another variable. The menu appears to be empty.

To Reproduce
Use the following code:

model STARFARM  

global{
	
	list<string> key_indicators <- ["Harvest","Profit","Crop area","Water consumption","Fertilizer consumption","Current year","Current season"];	
	list<string> chart_list <- key_indicators;
	string current_chart <- first(chart_list);

	init{
		write key_indicators;
	}
	
}
	
	
experiment test type:gui  {		
	parameter "Chart" var: current_chart init: "Total crop biomass per practice"  among: chart_list;	
}

The variable chart_list points towards key_indicators, but the dropdown menu is empty:

Image

Expected behavior
When providing directly a value to chart_list like this:

	list<string> chart_list <- ["Harvest","Profit","Crop area","Water consumption","Fertilizer consumption","Current year","Current season"];

it works:

Image
  • OS: Win10
  • GAMA version: 2.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    About GAMLThis issue concerns the GAML language😱 BugThe issue reveals a bug in GAMA

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions