1. #21
    Sencha User
    Join Date
    Mar 2011
    Location
    Germany
    Posts
    198
    Vote Rating
    1
    Nickname is on a distinguished road

      0  

    Default


    Since the release of "beta3" I'm waiting for a real beta release (sencha will call it 4.0 final or so) or even wait for 4.0 GA (sencha term: 4.1).
    Before beta3 it was only a communication problem how to use MVC. In beta3 it was completly rewritten (my opinion), the examples and docs are still buggy as hell and there are over 100(!) API changes 2 weeks before the planned final release. I see some potential to continue this renaming madness, as an example with the tab package (Ext.tab.TabBar maybe rename to Ext.tab.Bar). Call the releases pre-alpha and alpha and no one is worried about the development.

    westy asked some real good questions. Okay, some are really specific and I'm not sure if the frontend should manage such things (two repos etc).
    The simple examples we got from sencha, which remind me of the current iphone/smartphone app insanity even on desktops, hopefully have not the intent to show the "power" of the product.
    The example "Phonegap" is fine for SenchaTouch but on desktops this is maybe 1/30th of a complete "app".

    Perhaps I'm missing something because I do not play with beta3. I can and will wait for 4.0 final.

  2. #22
    Sencha User edykstra's Avatar
    Join Date
    Feb 2009
    Posts
    98
    Vote Rating
    2
    edykstra is on a distinguished road

      0  

    Default


    Hello Westy,

    Wow. Reading through these and other posts doesn't instil confidence in ExtJS. It is almost a year later since these posts were written, and I am running into similar issues with 4.0.7. Having said that, maybe many issues are resolved, but the docs are not updated and misleading?

    Anyway, for the life of me, I can't get the Component Query Selectors in the this.control() method to work properly. That is what led me to your post here:

    http://www.sencha.com/forum/showthre...l=1#post593682

    The static methods work great for communicating events from the view to the controller, but what is the best way to go the other direction?

    I have a window that contains a grid panel and a form panel in a border layout. For certain events in the form panel, I need to update the grid, and vice versa. Everything I have tried has failed.

    Thanks,

    Eric

  3. #23
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    941
    Vote Rating
    65
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default


    Hi Eric,

    Wow, nice bit of thread necromancy here

    I've actually changed my controllers to use the ComponentQuery method, and this.control following some discussion here. The queries are evaluated at the time the event is handled, so I guess I was having similar issues with cq and assumed the components did not exist yet...

    Using the suggested controller pattern you should be able to add event listeners for your form and update your grid.

    ComponentQuery can be a real pain to write, and I often resort to adding itemId properties to components so can use the '#itemIdentifier' syntax, but it does work.
    The major failing of this controller pattern is when it comes to using actions, but I've just found myself putting the code into the actions, and ignoring controllers for them.

    Hope this helps,
    Westy
    Last edited by westy; 14 Mar 2012 at 1:26 AM. Reason: corrected name :)
    Product Architect
    Altus Ltd.

  4. #24
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    941
    Vote Rating
    65
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default


    Oh, and to be clear, this thread was about 4.0.0 beta 3 rather than 4.1.0 beta 3, at least I think it was...
    Product Architect
    Altus Ltd.

  5. #25
    Sencha User edykstra's Avatar
    Join Date
    Feb 2009
    Posts
    98
    Vote Rating
    2
    edykstra is on a distinguished road

      0  

    Default


    Yep - I realized it was about the 4.0.0b3 version given the date stamps on the posts. Ironic thing is, there are many other posts with almost the exact same issues, for 4.1.0b3.

    Would you happen to have a code snippet/example of a method to control events that works?

  6. #26
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    941
    Vote Rating
    65
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default


    A snippet wouldn't heard I suppose; the names have been changed to protect the guilty...

    Here we have a grid, and most of the targets are buttons that are docked to the grid, or on forms that are launched from those buttons.

    Code:
        refs: [
            {
                ref: 'grid',
                selector: '#grdMeaningfulName'
            }
        ],
    
    
        /**
         * The init method for this controller.
         * @param {Object} application The application object initialising the controller.
         */
        init: function(application) {
            var me = this;
    
    
            me.control({
                '#grdMeaningfulName #btnViewHistory': {
                    click: me.viewHistory
                },
                '#pnlAddThingy #btnOk': {
                    click: me.addThingy
                },
                '#pnlEditThingy #btnOk': {
                    click: me.editThingy
                },
                '#pnlAddSubThingy #btnOk': {
                    click: me.addSubThingy
                },
                '#pnlAddBulkSubThingy #btnOk': {
                    click: me.addSubThingy
                },
                '#pnlEditOtherThingy #btnOk': {
                    click: me.editOtherThingy
                },
                '#wdwVerifyThingy #btnVerify': {
                    click: me.verifyThingy
                },
                '#pnlConfirmThingy #btnConfirm': {
                    click: me.confirmThingy
                }
            });
        },
    As you can see, I use itemId's on my grids, panels, windows and buttons to greatly simplify things but can certainly use types, labels etc. if needed...
    Product Architect
    Altus Ltd.

  7. #27
    Sencha User edykstra's Avatar
    Join Date
    Feb 2009
    Posts
    98
    Vote Rating
    2
    edykstra is on a distinguished road

      0  

    Default


    Hey - Thanks!

    Also - what version are you working with now? I've had poor luck with 4.0.7.

  8. #28
    Ext JS Premium Member westy's Avatar
    Join Date
    Feb 2009
    Location
    Bath, UK
    Posts
    941
    Vote Rating
    65
    westy is just really nice westy is just really nice westy is just really nice westy is just really nice

      0  

    Default


    Using 4.0.7, and have got it stable.

    Did take many overrides and tweaks though.
    4.1.0 does look better believe it or not (at least our framework fixes file is considerably smaller), but there are a couple of show stoppers that prevent us moving to it.
    Product Architect
    Altus Ltd.

Similar Threads

  1. GridPanel Woes...
    By Phunky in forum Ext.air for Adobe AIR
    Replies: 1
    Last Post: 8 May 2008, 1:58 AM
  2. autoScroll woes
    By junkzilla in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 5 May 2008, 12:21 PM
  3. template woes
    By FMIC_DEV in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 6 Feb 2008, 4:50 AM
  4. [2.0.1] Ext.urlEncode woes.
    By keithpitt in forum Ext 2.x: Bugs
    Replies: 1
    Last Post: 29 Jan 2008, 9:05 PM

Thread Participants: 8