(See the best response by DarkCampainger.)


var/obj/o = new
o.icon = icon
o.icon_state = icon_state
src << output(o, "showwindow") //showwindow is a grid

var/obj/o = new
o.loc = loc
o.icon = 'icon.dmi'

Problem description:
I want the showwindow grid to show the object without any interference. Why is it that making a new object separate from the last, and placing it on the map makes the first image outputted to the grid change to the one placed on the map?
I'm not totally sure what you're asking here.

These are facts:
  • The object (o) in SHOW_WINDOW() will never be the same as the object (o) in Make_Object().
  • Objects outputted to grids will be sent to the grid's current-cell unless you specify what index (if using is-list) or column,row (if not using is-list).
Icon Issue.rar

I have made a demo, or you can try it out yourself. Just open up the grid with SHOW_WINDOW, then create the object.
Best response
From the skin reference:
Very important: If you send an atom to a grid like you would with a statpanel, keep that object in a list or make sure it actually exists somewhere in the world. Do not use a temporary object that will be deleted when the proc ends, or it can disappear/change in the grid when a new object is created. Statpanels don't have this problem because of the way they update, but it's a good idea even there not to use temporary atoms.

So, you need to store the object somewhere, otherwise it's going to be garbage collected. As it is, when you created the second object, it took the previous object's reference number, sent that update to the client, and the grid started showing it instead.
Oh, I forgot about this. It only comes to my mind when I actually want to interact with the grid panel, so I guess I didn't think of it being the problem.