1. #11
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    133
    Vote Rating
    6
    benjamineberle is on a distinguished road

      0  

    Default


    Right, that's what I thought it should be like. Still not working, even in a fresh test scenario. Here the steps to follow through:

    1. So I generate a new app using sencha app generate...
    2. I add the following items to the sample view:
    Code:
                    {
                        xtype: 'filebutton',
                        text: 'File Button'
                    },
                    {
                        xtype: 'filefield',
                        fieldLabel: 'Photo',
                        labelWidth: 50,
                        buttonText: 'Select Photo...'
                    }
    3. Then I add these classes to Application.js
    Code:
        requires: [
            'Ext.form.field.File',
            'Ext.form.field.FileButton'
        ],
    4. Refresh or build
    5. That's the result, because "x-form-file-input" is missing.
    Screen Shot 2013-11-06 at 10.16.16 AM.png

    Adding the class manually corrects the problem and I get this:
    Screen Shot 2013-11-06 at 10.26.20 AM.png

  2. #12
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,033
    Vote Rating
    213
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Worked ok for me using those steps.

    Screen Shot 2013-11-06 at 3.39.54 PM.png

    Screen Shot 2013-11-06 at 3.40.03 PM.png

    Are you using Cmd 4.0.0.203 or higher?

    Maybe re-download 4.2.1? Even reinstall Cmd?
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  3. #13
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    133
    Vote Rating
    6
    benjamineberle is on a distinguished road

      0  

    Default


    As it turns out it's necessary to load the class Ext.form.field.File and not Ext.form.field.FileButton, even though the css class is used on the FileButton, not the FileField.Seems strange when FileField is not used.

    Also Cmd is very buggy and flaky when using the web server with multiple projects on the same machine at the same time. Generating a new app sets some global namespace variables that cannot be reversed by refresh, build or restart the machine.
    I had to recreate the entire project to reset that namespace back to the main project. The error is e.g.
    "The following classes are not declared even if their files have been loaded: "testproject.Application". Please check the source code of their corresponding files for possible typos: "app/Application".
    But there is no reference in the project itself to "testproject".

Thread Participants: 1