ID:1766304
 
BYOND Version:507
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Firefox 35.0
Applies to:Webclient
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary: When you place an atom (be it an /obj in my case) in a grid, MouseEntered/Exited/Click() procs will not be called.
Either this or I have missed up the output.
But after two hours of brainstorming I got to the conclusion this has got to be a Webclient bug.

Numbered Steps to Reproduce Problem: Create an interface with a grid. Output one, two, three or whatever number of /obj's to the grid, having into account that this /obj has the following definitions:
See Code Snippet.

Now, open it in Dream Seeker and you will see how the procedures are called as expected, now go to the webclient and move your mouse around the atoms.
Unexpectedly there is no output, at least for me.

Code Snippet (if applicable) to Reproduce Problem:
/obj/this_obj
MouseEntered()
world<<"This is a check"
MouseExited()
world<<"This is another check"
Click()
world<<"And this didn't work either"

mob/proc/outputtoGrid(_times=4, _grid="grid1")
for(var/i in 1 to _times)
src<<output(new/obj/this_obj, "[_grid]:1,[_times]")


Expected Results:
The checks' text to be outputted.

Actual Results:
No output, apparently.

Does the problem occur:
Every time? Or how often? Webclient only.
In other games? Haven't tested.
In other user accounts? Any.
On other computers? Couldn't test this.

When does the problem NOT occur? When using Dream Seeker.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? I haven't had the chance to test it, but I suppose it will NOT work as I am using the latest build.
Curious. I know I've tested mouse procs in grids before, but I'll make sure to retest and see if anything is up.

[edit]
Doh! This example is doomed anyway; if it works at all in DS it's by accident.

You can't output an obj to a grid that you're not going to keep a reference to. The obj is being deleted again as soon as the output finishes, which is why it's not receiving mouse procs.

You need to store those objs in a list or something where they persist beyond the proc. I'm certain this will solve your issue.
I didn't use that snippet, I just worte that snippet right away while writting the report.
Anyways I will PM you the actual environment.
On the face of it your code looks like it should work. I should however point out a number of issues:

- CurrentGrid should be initialized at the beginning of CustomInput(), not at compile-time.
- Likewise, just set CurrentGrid to null when you don't need it anymore.
- You don't need a continue statement at the end of a loop.
- You don't need to output null to the grid cell before you output text or an object there; grid cells do not accumulate text like an output control does.

I'm wondering if the display problem comes from the atom having a name but no icon. That ought to work, but it's possible there's a logic error causing trouble there. As an experiment, try assigning an icon to the object.
The atom does have an icon:

obj/Copy
icon = 'checkbox.dmi'
icon_state = "unchecked"
...


In DreamSeeker everything works as expected:



Thought it cannot be appreciated in the picture, whenever you pass the mouse over the cell, the icon will glow.
In no way can it be an object with no icon as I clearly see the icon there :/
I can try assigning manually the icon each loop iteration but I do not see how would that make any difference.

As a side note, the icon appears in the web client, you just cannot interact with it. (Click, MouseEntered and MouseExited are what I am expecting to work, but I assume the rest of procedures won't work in this scenario either)

I could simply give a fuck and throw it away but this issue got on my nerves so to solve it is now my only target >:L