ID:139123
 
client
Click(A)
usr<<A
if(istype(A,/obj/quest_opener))
usr<<"CLICKED!"
var/obj/quest_opener/q = A
if(q.parent_stub)
var/player/p = usr
if(p.client)
p.openQuestInfo(q.parent_stub)
..()
player
proc
questRefresh()
if(stubs.len)
src<<output("Open","quest_grid:1,1")
src<<output("Name","quest_grid:2,1")
src<<output("Description","quest_grid:3,1")
var/q_stub/q
var/obj/quest_opener/q_o
for(var/i=1 to stubs.len)
q = stubs[i]
q_o = new(q)
src<<output(q_o,"quest_grid:1,[i+1]")
src<<output(q.name,"quest_grid:2,[i+1]")
src<<output(q.desc,"quest_grid:3,[i+1]")


Well, this is fairly simple. I make an /obj, quest_opener, which I display in a grid with some basic information about a quest. Clicking this /obj in the grid should(in this case) display "CLICKED!" to the person who clicked it. However, this is not the case. The last time I used a grid this way, things worked out fine. Has something changed, or have I forgotten to do something?

The object is being garbage collected shortly after you output it (because you aren't keeping any references to it). You need to store it somewhere if you want the user to be able to Click() it.

I thought this was documented better, but I guess not. I'll add a note.
In response to DarkCampainger
Aha, thank you.