pombreda / pygowave-server

Automatically exported from code.google.com/p/pygowave-server
Apache License 2.0
0 stars 0 forks source link

Things dissapear in gadgets (states not being updated locally) #12

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add the sudoku (Austin's Test) gadget to a wave - from Google and works 
on other emulators - try adding a number, it's as if nothing happened - 
number doesn't stay, no status update for right/wrong guess
2. Add the SVG editor gadget to a wave - draw a line (or whatever), then 
click to start drawing another, and observe the first one dissapear
3. ?

What is the expected output? What do you see instead?
States to update/be saved.  numbers to appear in sudoku and generate 
right/wrong feedback.  SVG images to keep building as you draw more lines, 
etc. rather than clearing out.

What browser are you using? Which version?
Chrome 2.0.172.31 on XP

If the issue is related to your own PyGoWave Server installation, what
version of the product are you using? On what operating system?
-

Please provide any additional information below.
Thanks for fixing the can't add to wave problem so quickly!

Original issue reported on code.google.com by AdamCollet on 18 Jun 2009 at 3:49

GoogleCodeExporter commented 9 years ago
This seems to be a general issue. At a closer look at the Sudoku widget, the 
numbers 
disappear only if you enter a wrong one. Entering correct numbers will not make 
them 
disappear. However, the updates are not listed and the ranking is not updated 
too.

I did not know that any state change issued by gadgets should be echoed back to 
them 
again. Through what I read in the Federation Protocol specification, local 
changes 
should be applied immediately, so sending back state changes are redundant. 
This is 
however not the case for Gadgets. If you read through the tutorial, you will 
notice 
that clicking the button will not change the number in its state object but 
rather 
send a delta to do so. If I think about that, it makes perfect sense: The 
gadget 
should not touch its state object and modify it only via submitDelta() calls.

The state update is now echoed back locally to the gadget. This fixed most of 
the 
odd behavior of gadgets. The SVG Gadget does not work yet, though.

Original comment by patrick....@googlemail.com on 19 Jun 2009 at 9:49