Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
kemasD
Posts: 37
Registered: ‎01-18-2011
My Device: Huron 8800

Getting Sencha Touch Working in PlayBook Simulator?

I ran into another issue, I'm convinced to switch to Sencha Touch as my framework to build BB WebWork app.

But hey... When I tried to run simple example in PlayBook simulator, the result was just all white screen. (I'm sure that i got no compile time error)

 

I've previously used the jQuery mobile and it was working fine..

 

Anybody have try these?

Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Getting Sencha Touch Working in PlayBook Simulator?

Hi kemasD,

 

Very glad to hear you are using Sencha Touch with WebWorks.  We want to ensure these two frameworks work well together.  We have a positive relationship with the folks over at Sencha, and welcome any feedback from developers such as yourself that can be used to make this better.

 

 

Can you post a copy of your example?  

 

 

I also created the following sample app (that simply loads the live content from the Sencha Touch demo site).

 

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.0">
  <name>SenchaTouch</name>
  <description>Shows live content from the Sencha Touch Examples website.  Application created using the BlackBerry WebWorks SDK.</description>
  <author rim:copyright="2011"  href="http://dev.sencha.com/deploy/touch/examples/">n/a</author>
  <license href="http://www.sencha.com/products/license.php"/>
  <access subdomains="true" uri="http://dev.sencha.com"/>
  <content src="http://dev.sencha.com/deploy/touch/examples/"/>
</widget>

 

I can confirm that some of this content is not rendering as expected using version 0.9.2 of the PlayBook simulator.  However I am observing better results on an internal build, and so expect some of these issues to be resolved when future versions of the simulator are published.

 

Are able to identify specific Sencha Touch content that does / does not work at this point in time?  If so would you please report any bugs to our Developer Issue Tracker tool?  We can then work with the appropriate development teams (either PlayBook or Sencha) to confirm if/when these issues will be resolved.

 

Sincerely,

Adam

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
kemasD
Posts: 37
Registered: ‎01-18-2011
My Device: Huron 8800

Re: Getting Sencha Touch Working in PlayBook Simulator?

This is my config.xml

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0.0">
  <name>Play Sencha</name>
  <description>Shows live content from the jQuery Mobile 1.0a2 Demo website.  Application created using the BlackBerry WebWorks SDK.</description>
  <author href="http://jquerymobile.com/demos/1.0a2/">Your Name Here</author>
  <license href="http://jquery.org/license"/>
  <feature id="blackberry.app" required="true" version="1.0.0.0"/>
  <feature id="blackberry.app.event" required="true" version="1.0.0.0"/>
  <access subdomains="true" uri="http://192.168.56.1/"/>
  <access subdomains="true" uri="http://www.sencha.com"/>
  <content src="http://192.168.56.1/PlaySencha"/>
</widget>

And this is my code

Ext.setup({
    onReady: function() {		
		
		var tabpanel = new Ext.TabPanel({
            tabBar: {
                dock: 'bottom',
                layout: {
                    type: 'hbox',
                    align: 'strecth',
                    pack: 'center'
                }
            },
            fullscreen: true,
            ui: 'dark',
            cardSwitchAnimation: {
                type: 'slide',
                cover: true
            },
            defaults: {
                scroll: 'vertical'
            },
            items: [{
                title: 'Home',
                html: 'content1',
                iconCls: 'home',
                cls: 'pnl-categ-home'
            }, {
                title: 'Recipes',
                html: 'content2',
                iconCls: 'favorites',
                cls: 'pnl-categ-fav'
            }, {
                title: 'Info',
                html: 'content3',
                iconCls: 'info',
                cls: 'pnl-categ-info'
            }
            ]
        });
		
		alert('REACH AFTER CREATION');
		
		tabpanel.on('add', function(scope, opt) {
			alert(window.addEventListener);
		});
	}
});

The 'REACH AFTER ....' alert can be shown, but the alert in eventListener isn't parsed, so I guess there's something in the initilalization section of sencha touch.

 

I'm also trying to force tablet detection by modifying the sencha touch core debug file

 

Ext.is = {
    init : function(navigator) {
        var platforms = this.platforms,
            ln = platforms.length,
            i, platform;

        navigator = navigator || window.navigator;

        for (i = 0; i < ln; i++) {
            platform = platforms[i];
            this[platform.identity] = platform.regex.test(navigator[platform.property]);
        }

        /**
         * @property Desktop True if the browser is running on a desktop machine
         * @type {Boolean}
         */
        this.Desktop = false;//this.Mac || this.Windows || (this.Linux && !this.Android);
        /**
         * @property Tablet True if the browser is running on a tablet (iPad)
         */
        this.Tablet = true; //this.iPad;
        /**
         * @property Phone True if the browser is running on a phone.
         * @type {Boolean}
         */
        this.Phone = !this.Desktop && !this.Tablet;
        /**
         * @property iOS True if the browser is running on iOS
         * @type {Boolean}
         */
        this.iOS = true;// this.iPhone || this.iPad || this.iPod;
        
        /**
         * @property Standalone Detects when application has been saved to homescreen.
         * @type {Boolean}
         */
        this.Standalone = !!window.navigator.standalone;
    },

It would be amazing if developers can get full advantage of Sencha Touch in PlayBook..

Please use plain text.
Developer
JCarty
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Getting Sencha Touch Working in PlayBook Simulator?

I agree with kemasD. I tried loading the dev samples via my config uri and all I get is a small box in the upper left corner. I'm using the latest simulator with the WebWorks SDK.

 

Same with jQuery mobile. I'll try some further testing but others have seen what I have as well.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Please use plain text.
BlackBerry Development Advisor (Retired)
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Getting Sencha Touch Working in PlayBook Simulator?

[ Edited ]

Wanted to provide a link to Sencha's developer forum which is well-staffed by their own developers.  Feel free to also ask questions there about Sencha Touch on PlayBook (having more eyes looking at this topic will help the effort).

 

It looks like a conversation about PlayBook compatibility has also started there:

http://www.sencha.com/forum/showthread.php?122091-Sencha-Touch-on-Blackberry-Playbook&highlight=Play...

 

A major issue discovered in the current version of the WebWorks SDK for PlayBook is now certain JavaScript events fire during the page loading life cycle.  I believe this is what is impacting the behavior of the Sencha Touch code when running in the current version of the simulator (0.9.2).

 

I expect many of the rendering issues to be resolved when this defect is repaired.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Contributor
kalan
Posts: 23
Registered: ‎12-27-2010
My Device: 8900, 9630

Re: Getting Sencha Touch Working in PlayBook Simulator?

Can someone tell me is there anything needed to be add rather than "sencha-touch.js" and "sencha-touch.css" to use it offline?

 

Thanks.

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: Getting Sencha Touch Working in PlayBook Simulator?

Those two files are all you need.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
New Developer
SAmoht
Posts: 4
Registered: ‎04-23-2012
My Device: PlayBook

Re: Getting Sencha Touch Working in PlayBook Simulator?

Hi !

 

I tried to build an app using sencha. But I don't know what I must include in the app. Because when I use Ripple, I need to add all the sencha SDK so when I package, my app is 80Mo for only 10 lines of HTML !!!!!

 

Thanks.

Please use plain text.
New Member
ndeshbull
Posts: 1
Registered: ‎10-12-2012
My Device: Playbook

Re: Getting Sencha Touch Working in PlayBook Simulator?

Hi?

I have been running Sencha Touch Webworks playbook application successfully. I tested on riple and also on VMware and everything is cool. However, I started getting a white screen after the splash screen and no erroron log and really frustrated. Any efforts to set up again futile and dont know what to do, this was almost over, I had even sent version 1 to appworld but now I cant debug. Funny enough is that in ripple, eerything runs fine as expected.

Any ideas?

Evans

Please use plain text.
Developer
laurentC
Posts: 266
Registered: ‎02-05-2010
My Device: Blackberry Z10

Re: Getting Sencha Touch Working in PlayBook Simulator?

Hi,

I have a similar issue with my last application for the PlayBook.
I'm using Sencha Touch 2.1, everything is ok in Ripple emulator, I package and sign my app with Ripple and load it on my PlayBook, it runs fine !

But BB app world team report an issue during the approval process : blank screen at startup.

My app works on my PlayBook. I had a similar issue, at startup half of the screen was blank..., but after a reboot, everything's fine !
Not sure I can tell the BB world approval team to reboot their PlayBook and I don't know how I can solve this issue.

Twitter : @LaurentKP
My apps
Please use plain text.