PDA

View Full Version : Strange Browse button in file upload window



D795
6 Feb 2014, 12:39 PM
I'm implementing a basic file upload window using the Sencha doc example here (http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.File). I just need the default "Browse..." button to appear. However, my button always looks screwed up like this:

47844

Any idea what could have caused this? My code is as follows:


var form = Ext.create('Ext.form.Panel',
{
title: 'Upload file',
autoShow: true,
floating: true,
closable: true,
width: 400,
bodyPadding: 10,
frame: true,
items: [
{
xtype: 'filefield',
name: 'file',
fieldLabel: 'File',
labelWidth: 50,
anchor: '100%'
}
]
}
);


Thanks so much!

scottmartin
6 Feb 2014, 1:07 PM
What version of Ext4 are you using?

Paste your code into our fiddle ( inside the launch() ) .. seems fine in 4.2.1
https://fiddle.sencha.com/#home

D795
6 Feb 2014, 1:11 PM
Thanks! I'm using 4.2.1. I pasted the same code into another test project and it's working too! Ugh, maybe I messed up my library code somehow...

D795
6 Feb 2014, 4:57 PM
I solved this issue by deleting my build folder and executing sencha app build again. I noticed that I was using an older version of Sencha cmd for the previous build.

Can someone explain why changing the build affects my app's behaviour when I'm not even running the build version?

scottmartin
6 Feb 2014, 5:39 PM
Build updates the CSS and the that is used when running the app ( even in dev )

D795
6 Feb 2014, 5:53 PM
I see, thanks Scott!