1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    68
    Vote Rating
    1
    Answers
    3
    slngr is on a distinguished road

      0  

    Default Unanswered: Overlay example for ST2? Don't get mine working!

    Unanswered: Overlay example for ST2? Don't get mine working!


    Hello,

    I try to build an overlay like e.g. in the kiva example app. For testing I copied the detail.js from kiva app, which contains the Ext.Sheet definition to build up an overlay. But I dont really get it working. There's is a deprecated warning, or the whole screen is getting black and my NavigationView history is crashing up.

    Deprecate warning:
    Code:
    [DEPRECATE][App.view.PicalikeOverlay#show] Showing a component that currently doesn't have any container, please use Ext.Viewport.add() to add this component to the viewport
    Lines where I want to show the Sheet:
    Code:
    // Event for tapped product on detail view            'picalike_dataview': {
                    picalikeImgTapped: function(target) {
                        console.log(target.id);
    
    
                        if (!this.getPicalikeOverlay()) {
                            this.getPicalikeOverlayView.create();
                        }
    
    
                        // Cache the overlay view
                        var overlayView = this.getPicalikeOverlay();
                        //this.getViewport2().add(overlayView);
    
    
                        overlayView.show();
    
    
                    }
    If I add the red line of code the deprecate warning is gone, but the whole screen went black - no slide in like in Kiva example (http://dev.sencha.com/deploy/touch/examples/kiva/) on list item tap

    Any ideas? I got the same issues if I build up a simpler modal Panel. Don't really know where to add the overlay in my views in MVC structure.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,084
    Vote Rating
    453
    Answers
    3153
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    For a floating component, you shouldn't add it to the viewport. This deprecate message is not valid for floating components.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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