Results 1 to 3 of 3

Thread: DomHelper.createDom bug

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
      0  

    Default DomHelper.createDom bug

    Jack,

    I was trying to do:
    Code:
    		var dh = YAHOO.ext.DomHelper;
    		dh.useDom = true;
    		var x = dh.append('dlg', {tag:'div', style:'visibility:hidden'}, true);
    createDom chokes trying to call this.applyStyles b/c scope is wrong - 'this' in createDom is pointing to window, not DomHelper. I think you might have to create a private 'me' var that's set to 'this' and use 'me' in the private methods to call public methods.

    [/code]

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    I don't use me/that/self vars as they create circular references that IE's garbage collector doesn't aggressively collect. Instead I did:

    YAHOO.ext.DomHelper.applyStyles(el, o.style);

    I will probably be doing a check in later tonight if I can get the element.update code squared away.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
      0  

    Default

    aahh, I saw that someplace else where you explicitly used the classname within the class itself. Wasn't sure if it was an old artifact or intentional.

    Learn something new every day

Similar Threads

  1. DOMHelper in IE?
    By kjordan in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 29 Jan 2007, 7:40 AM
  2. DomHelper
    By INeedADip in forum Ext 1.x: Bugs
    Replies: 6
    Last Post: 2 Jan 2007, 6:08 AM
  3. DomHelper id
    By zquirm in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 29 Nov 2006, 3:14 PM
  4. DomHelper help Please
    By hunkybill in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 17 Nov 2006, 8:30 PM
  5. DomHelper
    By christocracy in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 19 Oct 2006, 11:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •