japazilian / multitype

Automatically exported from code.google.com/p/multitype
0 stars 0 forks source link

With 2 clients, first char typed is being sent multiple times #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start new server
2. Connect 2 clients
3. 1 client types "a"

What is the expected output? What do you see instead?

Expected output: 1 FEU sent from the client who typed, and shows up on the 
other client. 

Instead: BackendClient debug output shows a's being sent multiple times after 
that one keystroke (output attached)

Don't know if this belongs to ryan, I just know he's at his comp right now :)

Original issue reported on code.google.com by rharagut...@gmail.com on 29 Mar 2011 at 2:33

GoogleCodeExporter commented 9 years ago
Yeah I have no idea....

Keystroke gets picked up in document listener in EditorMangaer.java, sent to 
FEUSender.java, sent to BackendClient.

That's really it on our end.

Original comment by rvmille...@gmail.com on 29 Mar 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Never attached output =/

Original comment by rharagut...@gmail.com on 29 Mar 2011 at 2:49

Attachments:

GoogleCodeExporter commented 9 years ago
Try it again, I made a boolean variable volatile in EditorManager that *might* 
help...

Original comment by rvmille...@gmail.com on 29 Mar 2011 at 3:07

GoogleCodeExporter commented 9 years ago
Tried it twice, same problem

Original comment by rharagut...@gmail.com on 29 Mar 2011 at 3:15

GoogleCodeExporter commented 9 years ago
I fixed the problem. The issue was that for some reason the boolean flag for 
turning off the listener didn't work. I made it so that it turns off the 
listener before making the edit then turns it back on. 
For the time being it works, but if you can find a faster implementation, feel 
free. 

I committed the code, so you might have to redownload the project if you've 
made a lot of edits. 

Original comment by rharagut...@gmail.com on 29 Mar 2011 at 3:55