-
1 Mar 2013 3:53 AM #1
Duplicated function
Duplicated function
- Create a panel
- Add 2 buttons
- Add a 'click' listener to both buttons and set its 'fn' attribute to 'onSearch'
- SA generates code :
Maybe SA should check if component does not already have a function with same name before creating it. Then it would be possible to factorize code and do not need to create Controller or create a function redirection.Code:Ext.define('MyApp.view.MyPanel', { extend: 'Ext.panel.Panel', ... initComponent: function() { ... }, onSearch: function(button, e, options) { }, onSearch: function(button, e, options) { } });
It would be nice if it was possible to have a combo listing all available functions of 'me'
EDIT : please note that SA detects if I want to add a Basic Function named 'onSearch' : 'This handler name 'fn' is already in use or reserved. Please enter a unique name'
-
1 Mar 2013 10:55 PM #2
Thanks for the bug report. This still happens in the current development branch.
Aaron Conran
@aconran
Sencha Architect Development Team
You found a bug! We've classified it as
DSGNR-3428
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote