Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6134751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:23:41+00:00 2026-05-23T17:23:41+00:00

I’m trying to create a webapp with sencha. I’ve already tweaked a lot of

  • 0

I’m trying to create a webapp with sencha. I’ve already tweaked a lot of examples and the framework is startiong to make sense to me. There are two major things I keep bumping into though.

1.
Consider the following code:

var application;

var left = new Ext.Panel({
    fullscreen: false,
    style: "background-color:#039CF9;color:white;",
    dock: 'left',   
    html: 'left',
    width:320
});

var right = new Ext.Panel({
    fullscreen: false,
    style: "background-color:#ffffff;color:black;",
    dock: 'right',    
    html: 'right',
});

application = new Ext.Application({
    name: 'xaddict',
    launch: function() {
        this.viewport = new Ext.Panel({
            fullscreen: true,
            id    : 'mainPanel',
            layout: {type:'hbox',align:'stretch',pack:"center"},
            dockedItems :[right]
        });
    }
});

application.viewport.addDocked(left);

Somehow, if you add ‘left’ and ‘right’ to application via the attribute ‘dockedItems’ it does as it’s supposed to, but if I try to add it later on, the console says there is no ‘addDocked’ function in application.viewport. I would really like to create the application in a myapp.js and have the body code of my page add panels to this setup. Due to CMS limits, I cannot insert this new code into the existing code.

2.
Secondly. The Sencha Touch references and docs are not clear on what syntax to use when building an app. Some say Ext.Setup, others to set up an Application and there are some which tell you to extend a component and use that as a starting point. Which one is the ‘normal’ one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:23:42+00:00Added an answer on May 23, 2026 at 5:23 pm

    The reason you are getting that error is because of the order your statements are executed in. The Application’s launch() method is executed after the framework and application is all loaded and ready to go (similar to onReady event). This means that the addDocked called is happening before the launch method is called and so application.viewport isn’t defined yet.

    If you add a console.log into the launch method and one just before the addDocked call you will see the order happening.

    You should move the application.viewport.addDocked(left); line inside your launch() method:

    application = new Ext.Application({
        name: 'xaddict',
        launch: function() {
            this.viewport = new Ext.Panel({
                fullscreen: true,
                id    : 'mainPanel',
                layout: {type:'hbox',align:'stretch',pack:"center"},
                dockedItems :[right]
            });
            application.viewport.addDocked(left);
        }
    });
    

    In response to your other questions…

    The current best practice is to go down the Ext.Application route and structure your application according to the MVC (Model-View-Controller) architecture. There aren’t huge numbers of resources available that go into detail about how to apply this but the Twitter and Kiva example apps do use it and are a good starting point.

    I would 100% recommend extending components and keep them in their own files and building your app up using these building blocks (these will essentially become the V in your MVC). It makes maintenance much easier and just keeps things structured and organised.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.