PDA

View Full Version : 1.1: Toggle field setValue() causes an exception



vgribok
20 Apr 2011, 7:19 AM
Using ST 1.1.

Trying to replace a checkbox on a floating form panel with a toggle. Replacing checkbox's check() and uncheck(), which worked perfectly, with toggle's setValue(1) and setValue(0), causes an exception shown below. The form panel with the toggle has not been displayed when the setValue() was called.

Call stack:

Uncaught TypeError: Cannot read property 'offsetBoundary' of undefined
Ext.form.Slider.Ext.extend.getPixelValue sencha-touch-debug.js:27341
Ext.form.Slider.Ext.extend.setValue sencha-touch-debug.js:27286
Ext.form.Toggle.Ext.extend.setValue sencha-touch-debug.js:27517
Views.DalTestView.Ext.extend.TableChanged DalTestView.js:267

Regards,
Vlad.

maertsch
11 May 2011, 2:09 AM
If got a Toggle field:
new Ext.form.Toggle({
name:'sts',
id:'sts',
required:false,
label:'STS'
}),

and get the following error:
Uncaught TypeError: Cannot read property 'offsetBoundary' of undefined
Ext.form.Slider.Ext.extend.getPixelValuesencha-touch-debug.js:27341
Ext.form.Slider.Ext.extend.setValuesencha-touch-debug.js:27286
Ext.form.Toggle.Ext.extend.setValuesencha-touch-debug.js:27517
Ext.form.FormPanel.Ext.extend.setValuessencha-touch-debug.js:26666
Ext.form.FormPanel.Ext.extend.loadRecordsencha-touch-debug.js:26605
Ext.form.FormPanel.Ext.extend.loadModelsencha-touch-debug.js:26616
webApp.views.ReservationDetail.Ext.extend.initReservationReservationDetail.js:150
Ext.apply.items.reservationList.Ext.List.listeners.itemtapReservations.js:36
firesencha-touch-debug.js:979
Ext.util.Observable.Ext.extend.fireEventsencha-touch-debug.js:595
Ext.DataView.override.onTapsencha-touch-debug.js:23082
anonymous:5
(anonymous function)sencha-touch-debug.js:4428
Ext.gesture.Gesture.Ext.extend.firesencha-touch-debug.js:18588
Ext.gesture.Tap.Ext.extend.onTouchEndsencha-touch-debug.js:18781
Ext.gesture.Manager.Ext.AbstractManager.onTouchEndsencha-touch-debug.js:18282
(anonymous function)sencha-touch-debug.js:3421

it doesn't even render.
Tested on Chrome 11Beta ST 1.1.0

regards

dontbugme
11 Aug 2011, 2:38 PM
*bump*

Having the same problem.
Is there any workaround?

maertsch
11 Aug 2011, 11:03 PM
haven't found one. i switched to a checkbox...

I've found an unofficial deploy of ST, say 1.2.0 beta, there it works good.
I guess that a final release of that version should be official in some days/weeks. Otherwise you could get a SVN-Access and download the latest.

regards

mobileme
6 Sep 2011, 9:39 PM
The same to me with ToggleField on ST 1.1 (:|
While try to binding data to form, I got this odd error on toggle field: Cannot read property 'offsetBoundary' of undefined

saranya sukumar
24 Dec 2012, 5:16 AM
Hi ,
I experienced the same error too in my application. I just gave like this and it solved my problem.


var aa=Ext.getCmp('togglefield id');
aa.value=1;

Thanks,
Saranya