-
21 Feb 2008 6:38 AM #21
-
21 Feb 2008 8:05 AM #22
Yes, thank you for debugging. Grab the new code from the first post.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
21 Feb 2008 9:59 AM #23
Another change, in onReadSuccess:
Bugfix
orig:
patch:Code:if(!(data instanceof Array) && true === this.logFailure) { this.log(this.dataErrorText, data, response); return; }
and in queueChange:Code:if (data == null || !(data instanceof Array)) { if (true === this.logFailure) { this.log(this.dataErrorText, data, response); } return; }
orig:
my version:Code:var changed = undefined === this.state[name] || this.state[name] !== value;
Code:var changed = undefined === this.queue[name] || this.queue[name] !== value;
What do you think about?
-
21 Feb 2008 10:34 AM #24
The test you propose is redundant as if data === null (btw, always use three = when testing for null) data is not instance of array.
No, you have to test if state changed, not queue. Queue is very fragile thing, it's cleared always on successful server save. Purpose of this test is not to save state item that hasn't changed.and in queueChange:
orig:
my version:Code:var changed = undefined === this.state[name] || this.state[name] !== value;
What do you think about?Code:var changed = undefined === this.queue[name] || this.queue[name] !== value;
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
22 Feb 2008 1:25 AM #25
I have some problems, sometimes I lose any values.
scenario:
[desktop example]
- drag and drop windows
- save to server with HttpProvider saveSubmit
- page refresh
- windows are in correct position
- I don't change anything
- save to server with HttpProvider saveSubmit
- page refresh
- error: I lose the windows position information
It perhaps misses the passage from state to queue.
The queue is empty and override the state value.
What do you think?
-
22 Feb 2008 2:24 AM #26
Do you explicitly call submitState()? If yes you shouldn't.
I'm using the same code as is in the first post and I never lost any state of anything whatsoever. Doesn't it get lost serverside?Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
22 Feb 2008 2:42 AM #27
-
22 Feb 2008 10:45 AM #28
Well, if you found the problem: "state lost serverside", and the above mentioned call does work, in that case I do not see any problem. Just set timeout high enough and call submitState on exit...
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
26 Feb 2008 12:23 AM #29
Thank you Jozef,
I have another problem:
when the event 'onunload' fires I call this:
Ext.state.Manager.getProvider().submitState();
It's work fine, but with IExplorer I have this error (example):
The instruction at "0x0000000000000" referenced memory at "0x0000000000000". The memory could not be "read".Last edited by iwtrading; 26 Feb 2008 at 12:30 AM. Reason: fix
-
26 Feb 2008 12:37 AM #30
Unfortunately, I have no idea. First, I do not use Micro$oft products and second, I've never used HttpProvider in this setup. BTW, onbeforeunload event is one of the most painful spots if you want a cross-browser application. I was replying to one thread recently where one user wanted to implement it and failed. You can try to search forums for onbeforeunload keyword.
Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video



Reply With Quote