ivan-novakov / extjs-upload-widget

File upload widget for ExtJS v4
81 stars 42 forks source link

"Ext.util.Observable#addEvents" is deprecated. #26

Open cblack opened 10 years ago

cblack commented 10 years ago

Using Ext 5.0.1, you will get the error: "Ext.util.Observable#addEvents" is deprecated.

See this ticket (http://www.sencha.com/forum/showthread.php?198969-Observable-deprecate-addEvents)

"You don't need the addEvents call. The event will get added the first time it's fired, or the first time a listener is added. Whichever comes first."

I just commented out the addEvent calls to make it work.

You can follow their suggested method of documenting the events like so:

/**
 * @event submit
 * @preventable doSubmit
 * Fires upon successful (Ajax-based) form submission
 * @param {Ext.form.Panel} this This FormPanel
 * @param {Object} result The result object as returned by the server
 * @param {Ext.EventObject} e The event object
 */
ivan-novakov commented 10 years ago

You are right. That piece of code is there since the addEvents was beeing used :). And I haven't tested the widget with Ext JS 5 yet, I doesn't expect it to work without some modifications.

tvaughan73 commented 9 years ago

What do I need to do in order to get this to work with Ext JS 5?

stitcherooni commented 9 years ago

I'd be very interested in seeing this project modified to work with Ext JS 5.

Grey2k commented 9 years ago

im working on it. soon it will be availible ...

about Ext.util.Observable#addEvents" is deprecated. ... just remove it - in ExtJS 5 - Events added automatically

Misiu commented 9 years ago

@Grey2k, @ivan-novakov any chances there will be ExtJS5 version in near future?

tvaughan73 commented 9 years ago

so, all i should have to do is remove addEvents from all files?

Grey2k commented 9 years ago

yep )

Grey2k commented 9 years ago

Gyus - its almost done ) Today i start tested it in production and soon make the resease.

its will work only on ExtJS > 5.0.2 cause this bug

selModel : Ext.create('Ext.selection.CheckboxModel', {
                checkOnly: true, // not working 
});

http://www.sencha.com/forum/showthread.php?290630