1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    68
    Answers
    3
    Vote Rating
    1
    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
    Gainesville, FL
    Posts
    37,087
    Answers
    3503
    Vote Rating
    855
    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


    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
    ________________
    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.

Thread Participants: 1