ruliang / reallysimplehistory

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

why reset value of hash 'four' in the example? is it a bug? #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
just simply try rshTestPage.html in RSH0.6

What is the expected output? What do you see instead?
I'm expecting a behaviour like the normal browser history, if I go back in
the history I want the old value of "four" parameter and not the
overwritten value.

example:

var rawMaterial = [
    ["four", "this string disappear!!!!"],
    ["four", true],
    ["four", 2],
    ["four", "gigione"],
    ["four","why value of 'four' has now been reset????"],
];

What version of the product are you using? On what operating system?
0.6

Please provide any additional information below.

Original issue reported on code.google.com by diego.un...@gmail.com on 7 Nov 2007 at 2:41

GoogleCodeExporter commented 9 years ago
This isn't a bug. RSH's history stack relies on simple key/value pairs. Create 
a new
history point with the same key as an existing history point, and RSH will 
overwrite
the old value with the new value. If you want fine-grained serialization of your
application, you should generate unique hash keys and then use JSON in the hash
values to store as much data as you need to return to your serialized appliation
state. This seems to be a point of confusion for lots of users, so the release
notes/code examples for the upcoming release candidate will spell this out.

Original comment by bdpathfi...@gmail.com on 7 Nov 2007 at 9:30