I have an interface window with two grids, when you place an object in the grid and click on it the effect isn't the same as clicking on it in a statpanel.
This includes control not returning as expected through Click() but various other functions that alter the grids content only work by clicking the object from a statpanel rather than a grid. (e.g. src << output(null,"alchemy.output1") works from the statpanel but not from the grid).
![](https://i.imgur.com/OsQwRc0.png)
Numbered Steps to Reproduce Problem:
With the code snippet below clicking in the grid will return the position of the object in the grid (1,2,3 etc. in a list grid) where as clicking it from a stat panel will return the expected control.
Code Snippet (if applicable) to Reproduce Problem:
obj/Items/Resources
Spirit_Grass
icon_state="Spirit Grass"
Click(location,control,params)
..()
if(src in usr.contents)
usr << "Selected: [src]([control])"
if(usr.Alchemy)
if(!(src in usr.AlchemyIngredients))
usr.AlchemyIngredients+=src
usr.AlchemyGrid()
else
if((src in usr.AlchemyIngredients))
usr << output(null,"alchemy.grid2")
usr.AlchemyIngredients-=src
usr.AlchemyGrid()
Expected Results:
Clicking from the grid should function the same as clicking the object from the statpanel.
Actual Results:
output(null,"window.grid") doesn't clear the grid when clicking from the grid and Click(location,control,params) doesn't return [control] as a variable when clicking from the grid (it returns the position) but clicking from the statpanel works as expected.
Does the problem occur:
Every time? Or how often? Every Time
In other games? Y
In other user accounts? N/A
On other computers? Y
When does the problem NOT occur?
N/A
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?
Spevacus confirmed the problem doesn't occur in 513
Workarounds:
Using a statpanel rather than using a grid allows all of the functions to work as expected.</<>
Here's a copy of the code:
Here's a link to the test case (ignore the parts where it says "animate bug" or whatever, I just adopted an old test case from NSBR): https://www.dropbox.com/sh/b0o9xnquh7ibw2b/ AADNyMX_ZTcN-TgfppJ222eGa?dl=0
Compile and run, and click the "DoTheThing" verb. The grid control should now have an object in it, and the stat panel should appear with the ability to click the object.
In 513, when you click the grid's object, then the stat panel's object, this returns:
In 514, the same process returns:
Which is the same result if you were to output the "location" argument instead of "control"