PDA

View Full Version : Sencha 0.99, a lot of problems!



lteti77
4 Nov 2010, 3:40 AM
i have this error after upgrading to 0.99 version (in 0.98 it was ok).
afted debugging i discovered that it happens when i try to add a panel to a docked toolbar.

here is a snippet of code


var sl=Ext.getCmp('sponsorSponsorLinks');
sl.removeAll();
if(item.sBannerPng!=null){
sl.add({html:'some html',xtype:'panel',});//<---- ERROR HAPPENS HERE!
} else {
sl.add({html:'',xtype:'panel'});
}


and this is where i define the panel i want to update... i commented the code that's not needed.



this.sponsorLinks = new Ext.Panel({
monitorOrientation:true,
layout: 'vbox',
id: 'sponsorLinks',
cardSwitchAnimation: 'slide',
items: [{
xtype:'button',
id:'btnBannerHtml',
width:160,
text: 'HTML',
ui:'confirm',
handler: function() {/*
var val = Ext.getCmp('settingsForm').getValues();
database.Main.loadSponsorRCP(val.idArea);*/
}
},

{
xtype:'button',
id:'btnLink1',
width:160,
text: 'Link1',
ui:'confirm',
handler: function() {/*
var val = Ext.getCmp('settingsForm').getValues();
database.Main.loadSponsorLink1(val.idArea); */
}
},{
xtype:'button',
id:'btnLink2',
width:160,
text: 'Link2',
ui:'confirm',
handler: function() {/*
var val = Ext.getCmp('settingsForm').getValues();
database.Main.loadSponsorLink2(val.idArea);*/
}
},
],
dockedItems: [{//sponsor banner
xtype: 'toolbar',
id:'sponsorSponsorLinks',
//ui:'green',
dock: 'top',
style: {background:'white'},
layout:{pack: 'center'}
},{
xtype: 'toolbar',
dock: 'top',
id:'sponsorLinksToolbar',
items: [{
id: 'backToComingPage',
ui: 'back',
text: 'indietro',
handler: function() {/*
Ext.getCmp('contentPanel').setActiveItem(parseInt(aComingPage), {type: 'slide', direction: 'right'}); */
}
}]
},
]
});


why does this happens after upgrade to 0.99 version?
thanks in advance.

lteti77
4 Nov 2010, 6:33 AM
just for completeness...
i have actually solved the problem by using the 'update' method on an existing panel instead of removing and adding a new panel each time...

i mean now i do:



sl.getComponent(0).update({html:'some html'});


instead of:



sl.removeAll();
if(item.sBannerPng!=null){
sl.add({html:'some html',xtype:'panel',});//<---- ERROR HAPPENS HERE!
} else {
sl.add({html:'',xtype:'panel'});
}


where the toolbar is:



[{//sponsor banner
xtype: 'toolbar',
id:'sponsorSponsorLinks',
//ui:'green',
dock: 'top',
style: {background:'white'},
layout:{pack: 'center'},
items:[{html:'',xtype:'panel'}]
}

dbottillo
4 Nov 2010, 7:32 AM
Hi,

i switch from 0.98 to 0.99
with 0.98 it's all ok
but with 0.99 my application is blank!! it not display anything...!

after some test
the problem is that i add the items of my tabPanel (the fullscreen component) inside his beforender event, like:


Ext.setup({
tabletStartupScreen: 'tablet_startup.png',
phoneStartupScreen: 'phone_startup.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {

var offerte = new Ext.Panel({
html: 'hello'
});

var panel = new Ext.TabPanel({
fullscreen: true,
id: 'panel',
ui: 'dark',
layout: 'card',
cardSwitchAnimation: { type: 'fade'},
tabBar: { dock: 'bottom', layout: { pack: 'center'} },
items: [offerte],
listeners: {
beforerender: function(){
this.add(offerte);
}
}
}).show();
}
});

this code not work now!
how can i change to restore this situation?

Daniele

lteti77
4 Nov 2010, 7:54 AM
hi. i'm having similar problems...
see here:
http://www.sencha.com/forum/showthread.php?114669-Maximum-call-stack-size-exceeded
actually i resolved them by not using add method.
btw, i don't know if this workaround could be useful for you...

dbottillo
4 Nov 2010, 7:59 AM
for me it's not useful

because my application is created in two different ways (one for phone and one for ipad)
so in the beginning if it's iphone i have to add some panels, if it's ipad add some other panels (and some panels are in common)

changelog of 0.99 didn't say anything about

it's very frustrating that entire my application is off :/
i don't want to rewrite from scratch...!

lteti77
4 Nov 2010, 8:05 AM
in fact, i also had to refactor a lot of code in order to make it work with 0.99.
fortunately for me i have only one layout so i only needed to change it once.

in the release notes there is no mention to this problem... :-(

mherger
4 Nov 2010, 8:07 AM
Maybe it's just my HTC Desire, but even the Kitchen sink is pretty much broken :-(. Can't navigate it.

gcallaghan
4 Nov 2010, 8:45 AM
Wow this upgrade is amazingly painful and doesn't adhere to the release notes.

setCard throws an error for me not a warning, as promised by the release notes.
What about mentioning in the release notes that the js and css file names were changed?
Also, what about the fact that list tpl has been deprecated and updating the docs to reflect that?

These are just the issues I've discovered in the first 5 minutes of attempting to upgrade. I worry what more I will find.

Api changes are painful enough, but inconsistently applying fallbacks, and not documenting all changes make developing with a platform a very unpleasant experience. Its never nice to get a nasty surprise, like when the documentation says one thing and the code does another.

TommyMaintz
4 Nov 2010, 8:56 AM
Hey guys,

We are very sorry for any inconvenience this release might cause you. We have made many changes to the API and tried to throw errors or provide warnings to notify you of these changes. You can help us smooth out all these changes by giving us feedback on inconsistencies. For example, because of this thread we will make the following changes for RC1.

- Document the new List's itemTpl
- setCard will throw a warning instead of an error
- Fix Kitchen sink on HTC Desire
- Fixing the call size exceeded error

Please have some patience with us while we resolve these issues. We will put out a new release very soon.

Best,
Tommy

dbottillo
4 Nov 2010, 9:11 AM
@TommyMaintz: thank you very much! now i will continue to use 0.98, because with 0.99 i can't do anything, i hope to get RC1 very soon
@lteti77: how did you get 'Maximum call stack size exceeded'? because in chrome, with my code, simply it not display anything, i don't have this error!

mherger
4 Nov 2010, 9:13 AM
Thanks for the update. Please note that HTC Desire is just one example of devices having trouble with the latest code. A buddy of mine is seeing the same issues with eg. Samsung Galaxy too.

Michael

TommyMaintz
4 Nov 2010, 9:16 AM
We have tested on both the Android devices you guys mentioned, and haven't experienced any of the issues you are describing. Could it be related to aggressive caching on Android? Could you try to clear the cache, refresh the kitchensink, and let us know if the messed up behavior still exists?

lteti77
4 Nov 2010, 9:19 AM
@dbottillo: i have this error using safari...

Jamie Avins
4 Nov 2010, 9:27 AM
Also, are you using your own server to test or http://dev.sencha.com/deploy/touch ?

mherger
4 Nov 2010, 9:27 AM
Tommy - I've always been able to lock up the Kitchen Sink with just a few swipes in the list on my HTC Desire. There's been a bug report against this which was closed, as the issue was considered fixed in RC1.

Even worse (for me) is a total lockup of an app I'm developing using PhoneGap 0.9.2 & Sencha Touch. It's been fine up to 0.98 (besides the occasional lockup caused by the scroller in lists). But right now it wouldn't react to any touch event any more. Neither buttons nor swipes or list taps. Nothing. But the app seems to be running in the background just fine: I can use the hardbuttons to trigger some actions, and I see background processing in the console.

Please note that I always test with the Kitchen Sink first when encountering issues, as it's an example readily available to you. I'm always using your server.

Michael

Jamie Avins
4 Nov 2010, 9:41 AM
What software is your HTC Desire running? We are not having many issues with our HTC Desire test phone here.

Android 2.2
Kernel 2.6.32.15-gd96f2c0
Build number 2.13.707.1
Browser 3.1

gcallaghan
4 Nov 2010, 9:58 AM
@TommyMaintz Thanks! Appreciate the quick responses!

suzzer99
4 Nov 2010, 9:58 AM
I am now seeing this error: Uncaught DataView requires tpl, store and itemSelector configurations to be defined.

But I don't see anything in the API docs about this problem. Can someone please let me know what I should define for 'store'? I tried the following from your one example that seems to use a DataView (nestedLoading.js)

store: new Ext.data.Store({
model: 'User',
autoLoad: false
})

But then I get the following error:

Uncaught TypeError: Cannot read property 'proxy' of undefined
Ext.data.AbstractStore.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:5926
Ext.data.Store.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:6403
Dtv.Mobile.Component.Home.Ext.extend.initComponent:7001/resources/js/mobile/home/home.js:51
Ext.lib.Component.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:17772
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
Ext.setup.onReady:7001/resources/js/mobile/index.js:91
(anonymous function):7001/resources/js/mobile/ext-touch-debug.js:13070
(anonymous function)

xnakxx
4 Nov 2010, 10:04 AM
RangeError: Maximum call stack size exceeded.

before i go digging around i thought i'd ask if anybody has found the root of this problem?
i only get it when i am adding panels to a carousel it seems.

aconran
4 Nov 2010, 10:21 AM
I am now seeing this error: Uncaught DataView requires tpl, store and itemSelector configurations to be defined.

But I don't see anything in the API docs about this problem. Can someone please let me know what I should define for 'store'? I tried the following from your one example that seems to use a DataView (nestedLoading.js)


Can we see your DataView definition? Have you defined the required tpl, store and itemSelector?




store: new Ext.data.Store({
model: 'User',
autoLoad: false
})

But then I get the following error:

Uncaught TypeError: Cannot read property 'proxy' of undefined
Ext.data.AbstractStore.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:5926
Ext.data.Store.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:6403
Dtv.Mobile.Component.Home.Ext.extend.initComponent:7001/resources/js/mobile/home/home.js:51
Ext.lib.Component.Ext.extend.constructor:7001/resources/js/mobile/ext-touch-debug.js:17772
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
subclass:7001/resources/js/mobile/ext-touch-debug.js:138
Ext.setup.onReady:7001/resources/js/mobile/index.js:91
(anonymous function):7001/resources/js/mobile/ext-touch-debug.js:13070
(anonymous function)


Do you have a 'User' as a registered Model?

aconran
4 Nov 2010, 10:29 AM
RangeError: Maximum call stack size exceeded.

before i go digging around i thought i'd ask if anybody has found the root of this problem?
i only get it when i am adding panels to a carousel it seems.



This is happening in certain situations because the 'add' event is bubbling up the hierarchy, some portion of code is subscribing to add, then adding something then it refires and hits an infinite loop. Try putting the following line in after loading sencha-touch-debug.js


Ext.lib.Container.prototype.bubbleEvents = [];

xnakxx
4 Nov 2010, 11:12 AM
index.html..


<script type="text/javascript" src="framework/sencha-touch-debug.js"></script>
<script type="text/javascript"> Ext.lib.Container.prototype.bubbleEvents = []; </script>
that seemed to do it.
thanks aconran. saved me a lot of trouble.
can I expect any side effects from doing this?

suzzer99
4 Nov 2010, 11:41 AM
Can we see your DataView definition? Have you defined the required tpl, store and itemSelector?

Do you have a 'User' as a registered Model?

Thanks for the quick reply Aaron. We don't currently have store defined. We are using DataView for the listeners but not the dynamic updating. Is there sone other component that would be better to use here?

To be clear, this code was working fine in .98 w/o the store defined.

After some research, you are correct the second error is because we have no registered model. We're hoping to avoid creating something like this since we really aren't using the store at the moment anyway.

Please advise.

xnakxx
4 Nov 2010, 11:57 AM
ok I,ve updated my code to work with .99 successfully except for two problems

1) calling setActiveItem(0) on a carousel results in "TypeError: Result of expression 'newCard.el' [undefined] is not an object."
2)after adding items to a tabPanel and calling doComponentLayout() after each add() my additions arent showed until a screen resize or a orientation change.

aconran
4 Nov 2010, 12:11 PM
We don't currently have store defined. We are using DataView for the listeners but not the dynamic updating. Is there sone other component that would be better to use here?


The purpose of a DataView is to show your own custom template that is bound to a store. The itemSelector just provides the glue between the markup and the records to provide events etc.

Are you looking for an Ext.Panel?

mherger
4 Nov 2010, 12:46 PM
What software is your HTC Desire running? We are not having many issues with our HTC Desire test phone here.

Android 2.2
Kernel 2.6.32.15-gd96f2c0
Build number 2.13.707.1
Browser 3.1

pretty similar:
Android: 2.2
Kernel: 2.6.32.15-g6a358a9
Build: 2.10.405.2
WebKit: 3.1

While it's easy with this to lock up lists in the Kitchen Sink, the very big issue I'm seeing is a new incompatibility with PhoneGap. I took the NestedList sample code from the documentation, put it in an empty html file. Running fine in Safari, but compiled with PhoneGap I can't touch it (or, I can touch it, but it doesn't do anything).

I'll post to the PhoneGap forums too. This might be a killer for quite a few of us...

Michael

suzzer99
4 Nov 2010, 1:40 PM
The purpose of a DataView is to show your own custom template that is bound to a store. The itemSelector just provides the glue between the markup and the records to provide events etc.

Are you looking for an Ext.Panel?

Ok well it looks like we can convert over the Panels, for the way we're doing it. We just have to convert the <li> tags we were using as an itemSelector, to anchor tags with a rel=.

However we aren't able to even log in to our app with .99 due to this issue from the release notes:
"Ext.form.FormPanel: getValues does not correctly return radio button values"

If by any chance you could post a patch or something for that so that we can use our app with .99, that would be really really helpful. Thanks.

aconran
4 Nov 2010, 3:20 PM
Ok well it looks like we can convert over the Panels, for the way we're doing it. We just have to convert the <li> tags we were using as an itemSelector, to anchor tags with a rel=.


Okay, either of these approaches could be correct. If its truly a list of items then you may be better off putting the data into a Store and using a DataView and/or List. Feel free to email me if you need some more context around the problem..



However we aren't able to even log in to our app with .99 due to this issue from the release notes:
"Ext.form.FormPanel: getValues does not correctly return radio button values"


We're looking into this issue. Essentially checked attributes are not transferred to the appropriate input tags as the user updates the visual UI cues. Therefore getGroupValue does not return what you see as checked.

Aside from this issue is your entire app running on 0.99 or did you abort the upgrade process?

aconran
4 Nov 2010, 3:22 PM
1) calling setActiveItem(0) on a carousel results in "TypeError: Result of expression 'newCard.el' [undefined] is not an object."

Can this be seen in a simple example?



2)after adding items to a tabPanel and calling doComponentLayout() after each add() my additions arent showed until a screen resize or a orientation change.
We have adjusted the lazy rendering to be less aggressive and i believe this issue may already be addressed in the next build. Can you create a simple example for us to test against?

suzzer99
4 Nov 2010, 3:39 PM
Hey guys,

We are very sorry for any inconvenience this release might cause you. We have made many changes to the API and tried to throw errors or provide warnings to notify you of these changes. You can help us smooth out all these changes by giving us feedback on inconsistencies. For example, because of this thread we will make the following changes for RC1.

- Document the new List's itemTpl
- setCard will throw a warning instead of an error
- Fix Kitchen sink on HTC Desire
- Fixing the call size exceeded error

Please have some patience with us while we resolve these issues. We will put out a new release very soon.

Best,
Tommy

Please fix this issue as well (from the release notes):
Ext.form.FormPanel: getValues does not correctly return radio button values

Thanks!

suzzer99
4 Nov 2010, 3:45 PM
Okay, either of these approaches could be correct. If its truly a list of items then you may be better off putting the data into a Store and using a DataView and/or List. Feel free to email me if you need some more context around the problem..

I think for now converting to a Panel and restyling a little is the quickest way to fix our problem.


We're looking into this issue. Essentially checked attributes are not transferred to the appropriate input tags as the user updates the visual UI cues. Therefore getGroupValue does not return what you see as checked.

Aside from this issue is your entire app running on 0.99 or did you abort the upgrade process?Our app can't really run if we can't log in.

Basically the problem is that our app has had some show-stoppers with every Sencha build (we are releasing our 1.0 version in about a month), which is making our internal User Acceptance Testing a challenge.

I'm going to try to hack the radio button issue for now. But if there's any way you could possibly just send some kind of patch and tell me where to insert it that would be extremely helpful.

Thanks.

suzzer99
4 Nov 2010, 4:35 PM
Ok FYI I think I have hacked the radio button problem for now.



getGroupValue: function() {
var parent = this.el.up('form') || Ext.getBody(),
radios = parent.select('input[name=' + this.fieldEl.dom.name + ']', true),
checkedRadio;

radios.each(function(radio) {
if (radio.dom.checked) {
checkedRadio = radio;
return false;
}
});

return checkedRadio && checkedRadio.dom ? checkedRadio.dom.value: null;
},
For some reason checkedRadio in the function above, is being tied to the value of radio in the 'each' loop. So even when (radio.dom.checked) is evaluating to false checkedRadio is still being updated to the current value of radio in the loop, which is incorrect. I really have no idea why this is happening, possibly something with passing radio as a function argument to radios.each. Possibly it wouldn't if you used (for radio in radios) { ... } notation. (Had to make that plug for old-school JavaScript :) )

Anyway I changed the code to just capture the value of the checked radio button, which is all we're returning anyway. And it seems to work fine:



getGroupValue: function() {
var parent = this.el.up('form') || Ext.getBody(),
radios = parent.select('input[name=' + this.fieldEl.dom.name + ']', true),
checkedRadioValue = null;

radios.each(function(radio) {
if (radio.dom.checked) {
checkedRadioValue = radio.dom.value;
return false;
}
});

return checkedRadioValue;
},

nygren777
4 Nov 2010, 11:05 PM
http://dev.sencha.com/deploy/touch/examples/kitchensink/ is not working well on HTC Desire and Sony Ericssons. When will this be fixed?

dbottillo
5 Nov 2010, 3:09 AM
thanks aconran for code that fix add function problem

but i have a ton of error, event after fix the previous problem...
on iphone my tabPanel fullscreen use half of the display (with chrome on desktop it's all ok)
with android i see a blank page!

after this, all the List doesn't work, like previous post i see a lot of error
all the css are change, and my custom css now doesn't work

it's soooo frustrating...i have like 5000 line of code...and now i have to found what it's not working anymore...it's possible?
i'm thinking to use 0.98 and not pass to 0.99...i can't rewrite all my application

dloomer
6 Nov 2010, 6:48 AM
Per the error message:


Uncaught DataView requires tpl, store and itemSelector configurations to be defined

In fact, itemSelector does not appear to be required in a List, and even in Kitchen Sink that attribute is never given a value.

Not only that, but if I add:


itemSelector: 'div.contact'

to the definition of one of the lists in Kitchen Sink, not only can items in the list no longer be selected, but the Disclosure button no longer works. This behavior persists even if I explicitly set singleSelect to true (see my recent related bug report on singleSelect/allowDeselect). But everything works fine in Kitchen Sink without itemSelector being set.

So what gives? I would have filed a bug report but since Sencha developers are saying in this thread that itemSelector is indeed required, I feel like I must be missing something despite evidence to the contrary in Kitchen Sink.

mherger
6 Nov 2010, 10:36 PM
http://dev.sencha.com/deploy/touch/examples/kitchensink/ is not working well on HTC Desire and Sony Ericssons. When will this be fixed?

What issues do you see on the Desire?

dloomer
8 Nov 2010, 12:58 PM
Per the error message:



In fact, itemSelector does not appear to be required in a List, and even in Kitchen Sink that attribute is never given a value.

Not only that, but if I add:


itemSelector: 'div.contact'

to the definition of one of the lists in Kitchen Sink, not only can items in the list no longer be selected, but the Disclosure button no longer works. This behavior persists even if I explicitly set singleSelect to true (see my recent related bug report on singleSelect/allowDeselect). But everything works fine in Kitchen Sink without itemSelector being set.

So what gives? I would have filed a bug report but since Sencha developers are saying in this thread that itemSelector is indeed required, I feel like I must be missing something despite evidence to the contrary in Kitchen Sink.

Bumping this since a couple of days have gone by without response from the development team. Again, I'd open a bug, but I'd like the above question cleared up so I know whether it's appropriate or not.