1. #1
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default floatParent changed?

    floatParent changed?


    Something changed wrt floatParent's?

    I have a static method in my menu class that I use to determine its ultimate floatParent, which I can then use component query to get the owning grid, say.

    Code:
            /**
             * Retrieves the ultimate float parent for the specified menu.
             * In most cases this will be the button that was used to launch the menu.
             * @param {Object} menu The menu whose float parent to determine.
             * @return {Object} The float parent control for the menu, or undefined if not found.
             */
            getFloatParent: function(menu) {
                var floatParent = undefined;
    
                if (menu) {
                    // Go up until we do not have a parentMenu, in case we are on a menus sub-menu.
                    var parentMenu = menu;
                    while (parentMenu.parentMenu) {
                        parentMenu = parentMenu.parentMenu;
                    }
    
                    floatParent = parentMenu.floatParent;
                }
    
                return floatParent;
            }
    I'm seeing floatParent always being undefined, despite floating being true.


    Edit: I can probably work around using ownerButton, but that won't work for context menus off grids and trees for instance.
    Product Architect
    Altus Ltd.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,724
    Vote Rating
    752
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    May need to post a bug.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Oh right, what is this forum for then if not bugs?
    Product Architect
    Altus Ltd.

  4. #4
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    I've also seen floatParent undefined in LoadMask.afterRender.

    It's not always though, otherwise nothing would be masking... hmm...


    Edit: Correction, floatParent is not undefined in afterRender, it's an Ext.Layer that has no getContentTarget method.

    Getting it when launching a particular form; will try and figure out what's up.

    After getting the error the list dropdown for a combobox on the form renders very oddly; also once the error has occurred no other context menus will work on my tree until I reload the page. Gives endless owner.isDescendantOf is not a function errors in Firebug.

    Ah, when that occurs the owner is an Ext.Layer as well, which has no isDescendentOf method.
    Product Architect
    Altus Ltd.

  5. #5
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    Looking at this a bit more, Ext.Layer inherits from Element, but getContentTarget is a method in Component, and overridden in Panel and FieldSet it seems.

    This says to me that there are some core issues with the 4.1 codebase that no amount of my tinkering and investigation is going to solve or workaround. That would also explain why I keep hitting floatParent is undefined, or floatParent.method is not a function issues in many different places.

    Therefore I'm going to have to knock it on the head for now, and continue with 4.0.7 until there's another 4.1 version to look at, which I hope will be more complete and ready for evaluation.
    I simply can't upgrade to this version and pass the system onto our testers, it's not even close in my opinion.

    Cheers,
    Westy
    Product Architect
    Altus Ltd.

  6. #6
    Sencha User
    Join Date
    Nov 2011
    Posts
    5
    Vote Rating
    0
    lukesen is on a distinguished road

      0  

    Default


    There seems to be a dedicated thread for posting bugs: http://www.sencha.com/forum/forumdis...hp?80-Ext-Bugs

  7. #7
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    796
    Vote Rating
    37
    westy is a jewel in the rough westy is a jewel in the rough westy is a jewel in the rough

      0  

    Default


    From here:
    Quote Originally Posted by mitchellsimoens View Post
    There is only bug/performance changes now, no new features or API changes.
    Really?!

    Still no responses to my posts in this beta forum concerning this floatParent issue that made me give up on 4.1, and on the clientId use in models that caused a lot of issues.

    I'm still reluctant to spend the time upgrading to 4.1 to be honest, the lack of communication is disturbing.
    Product Architect
    Altus Ltd.

  8. #8
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    OK, looking at the code in post 1...

    Going "upwards" can be quite difficult depending on the relationship. What does "up" mean?

    For Menus, parentMenu is the correct pointer until you get to the top Menu.

    Then where?

    Well, if it's popped up from a Button, there's no ownerCt, no parentMenu, it's ownerButton.

    Sounds inconsistent, but the relationships are different. ownertCt is for real Container parents, floatParent is for floaters. parentMenu for Menus, and ownerButton for the top Menu (if initiated from a button)

    If it's a context menu, there is no upward link. How could there be? Your code created a Menu and showed it, and that's it. If you need there to be some upwards relationship, you must provide it. You could poke in an ownerCt.

    Then simply use the up() method which traverses the class's known upward links.

    The up() method uses the getBubbleTarget implementation to find an upward link (bubbling events go upwards, and need that upward link)

    Menu's implementation looks at all 3 possibilities.

    AbstractComponent's just looks at ownerCt.

    So maybe add a pseudo:

    Code:
    // Matches the topmost Component going up the up() axis.
    // Pseudos usually test an array of children. If we are testing on up(), there'll only be one.
    Ext.ComponentQuery.pseudos.top = function(items) {
        if (!items[0].getBubbleTarget()) {
            return true;
        }
    }
    Then

    Code:
    topMost = myMenu.up(':top');
    Off the cuff code, no testing, YMMV etc... But you're smart enough to fix it all up!

  9. #9
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    I think Ext.util.Floater needs a getBubbleTartget implementation which returns this.floatParent so that up() will work on Windows...

  10. #10
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    findParentBy obviously also needs to use getBubbleTarget to go upwards in the correct way for whatever object is using it...

    A few issues here. I'll create a ticket to encompass all these issues.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar