thron7 wrote:
> 
> Philipp,
> 
> I cannot repro the problem in 0.7.3. Please provide a few more lines of 
> your class declaration, and more importantly your Makefile settings.
> 
> Thomas
> 
> 

Hello Thomas,

Here is the complete ource code of the upload class:


#BOF################################################################
/**
 * File Upload Widget
 * 
 * @author Frederic Fournaise
(http://frederic.fournaise.free.fr/qooxdoo-file-upload-widget.php)
 * @version 20070528
 * @copyright   Frederic Fournaise
 * @license  GNU Lesser General Public License, see
http://www.opensource.org/licenses/lgpl-license.php 
 *
 **/
qx.Class.define("myspace.ext.upload",{
  extend : qx.ui.layout.HorizontalBoxLayout,

  construct : function(vUploadCGI){
        this.base(arguments);
    this.upload = new qx.ui.groupbox.GroupBox(this.tr("Charger un
fichier"));
    this.upload.set({ height : 40, width  : 250 });
        
        var vUniqueId = (new Date).valueOf();
        var vFrameName = "frame_" + vUniqueId;
        this.uploadFrm = "upload_" + vUniqueId;
        this.inputfile=null;
        
        //form
        this.input=new qx.ui.embed.HtmlEmbed();
        this.input.setHtml('<form enctype="multipart/form-data"
target="'+vFrameName+'" action="'+vUploadCGI+'" method="post"
id="'+this.uploadFrm+'" name="'+this.uploadFrm+'"></form>');
        this.add(this.input);
        
        this.addEventListener("appear", this._createInput,this);
                
        // iframe
    if (qx.core.Client.getInstance().isMshtml()) {
      this._iframeNode = document.createElement('<iframe name="' +
vFrameName + '"></iframe>');
    } else {
      this._iframeNode = document.createElement("iframe");
    }
    this._iframeNode.src = "javascript:void(0)";
    this._iframeNode.id = this._iframeNode.name = vFrameName;
    this._iframeNode.style.display = "none";
    document.body.appendChild(this._iframeNode);
        var o = this;
    this._iframeNode.onload = function(e) {
      return o._onload(e);
    };
    this._iframeNode.onreadystatechange = function(e) {
      return o._onreadystatechange(e);
    };
  },
  
  events: {
    "sending" : "qx.event.type.Event"
  },
  
  properties :{
    isSent : {init:false, check: "Boolean"}
  },
  
  members :{
        
        _createInput : function(e){
                if (this.inputfile==null){
                        this.inputfile = document.createElement("input");
                    this.inputfile.type = "file";
                    this.inputfile.name = "upload";
                        var _this = this;
                        this.inputfile.onchange = function(e) {
                        return _this._onchange(e);
                    };
                        
document.getElementById(this.uploadFrm).appendChild(this.inputfile);
                }
        },
        
        _onchange : function(e){
                d=document.forms[this.uploadFrm];
                d.submit();
                this._isSent = true;
                this.dispatchEvent(new qx.event.type.Event("sending"), true);
                d.reset();
        },
        
        _onreadystatechange : function(){
            if (this._iframeNode.readyState == "complete" && this.getIsSent()){
                //this.dispatchEvent(new qx.event.type.Event("completed"), 
true);
            }
        },

        _onload : function(){
            if (this.getIsSent()){
                //this.dispatchEvent(new qx.event.type.Event("completed"), 
true);
            }
        }
  }
});
#EOF################################################################

I don`t have any problems with other classes and I use about 20 of my own
classes.
Here is my makefile configuration:

####MAKEFILE##########################
APPLICATION_FILES = index.html

APPLICATION_THEME= qx.theme.Ext

QOOXDOO_VERSION = 0.7.3

APPLICATION_COMPLETE_SOURCE = false
APPLICATION_COMPLETE_BUILD = false
APPLICATION_OPTIMIZE_VARIABLES = false
APPLICATION_OPTIMIZE_STRINGS = false
APPLICATION_OPTIMIZE_BASE_CALL = true

APPLICATION_ADDITIONAL_SOURCE_OPTIONS = --use-variant qx.debug:on
--use-setting qx.disposerDebugLevel:1

#APPLICATION_BUILD_LOG_LEVEL = off

APPLICATION_LOCALES = de
#APPLICATION_LOCALES = ar de de_AT de_DE en en_US en_GB es es_ES fr fr_FR it
ru sv tr zh
APPLICATION_PAGE_TO_TOPLEVEL = .../..
APPLICATION_SCRIPT_FOLDERNAME = include/qooxdoo/js
APPLICATION_RESOURCE_FOLDERNAME = include/qooxdoo/resource

APPLICATION_HTML_TO_ROOT_URI = .

APPLICATION_PROFILE_SOURCE = true
APPLICATION_PROFILE_BUILD = true

APPLICATION_TRANSLATION_FOLDERNAME = translation
#######################################################

I cut my path declarations but I think they are not important over here
because all other classes are build fine.

I just disabled all additional build options at the moment, but I use them
in my deployed application.

Best Regards

Philipp




-- 
View this message in context: 
http://www.nabble.com/Problem-with-extension-qx.ext.upload-in-buildversion-tp19688060p19691572.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to