28 Apr 2011 7:35 PM #1
[CLOSED]Ext.util.History and unable to hook-up change event
I have a object (created in the onReady) that, in it's constructor, hooks up the change event for the History singleton object.
This is how I do it:
Ext.util.History.addListener('change', this.HandleHistoryChange(), this);
In FireBug this is the error I get in ext-all-debug.js:
me.events is undefined [Break On This Error] me.events[ename] = me.events[ename] || true;
29 Apr 2011 7:23 AM #2
Try this one
Ext.util.History.on('change', this.HandleHistoryChange, this);
30 Apr 2011 7:58 AM #3
I found in the examples this:
Call in onReady: Ext.History.init();
Also in my web page I needed:
<form id="history-form" class="x-hide-display"> <input type="hidden" id="x-history-field" /> <iframe id="x-history-frame"></iframe> </form>
The same goes with using the .add method on History. If you don't do the magic setup, anything you do with this Singleton object is problematic? Am I right on that or wrong on that? Also, in the documentation this should be there telling you this!
1 May 2011 11:06 PM #4
- Join Date
- Apr 2007
- Sydney, Australia
- Vote Rating
I've added extra docs that:
a) Say that init() must be called before calling any History operation
b) Specify that the iframe/hidden field are required and have added some suggested markup.
I don't think it makes sense to add exceptions for every method in this specific case, especially since the docs are now much more clear on the matter.Evan Trimboli
Twitter - @evantrimboli
Don't be afraid of the source code!
2 May 2011 9:39 AM #5
Thanks for the update! The docs should, at least, get people far enough! Thanks
By paulcrowder in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 9 Mar 2011, 1:51 PM
By cnelissen in forum Ext 3.x: BugsReplies: 8Last Post: 29 Jul 2010, 8:55 AM
By S1-Gezi in forum Community DiscussionReplies: 5Last Post: 18 Sep 2008, 8:10 AM