Jun 30, 2017, 5:13 PM
[CLOSED] Discrepancies in JavaScript function signatures
There seems to be some discrepancies on the function signatures that are shown (arguments list) between your:
Below are some examples that I have come across during our upgrade project (1.2 to 4.2.2)
(I am following your samples source code since it seems to more accurately reflect the argument names for these functions)
DataView -> ItemClick
Your Listeners/Arguments Utility shows function signature as:
https://examples4.ext.net/#/DataView/Advanced/Grouping/
https://examples4.ext.net/#/DataView/Advanced/Report/
TreePanel -> ItemContextMenu
Your Listeners/Arguments Utility shows function signature as:
https://examples4.ext.net/#/TreePane...d/Remote_Mode/
There a lot more than just these two examples.
NOTE: When in a script debugger breakpoint I can see in the call-stack what seems to be a generic '*fire'" function that shows the same arguments as the Listeners Utility - but the Source Code samples that I find seem to sometimes transpose the names of the arguments to more correctly align with the actual parameter content.
Problem is that the source code samples do not encompass all of the different function listeners for most of the components - so if I cannot find it in the source code samples (correctly aligned), I have to follow the Utility's given signature. But, to reiterate, I am finding in some instances how the argument name does not always truly corresponds with the actual contents of the argument.
Any advise on this would be appreciated.
Rafaelcjr now posting under Advance Loan Tech.
Listeners Arguments Utility https://examples4.ext.net/#/Events/Listeners/Arguments/
AND Your 4.2.2 Examples Source code https://examples4.ext.net/
Below are some examples that I have come across during our upgrade project (1.2 to 4.2.2)
(I am following your samples source code since it seems to more accurately reflect the argument names for these functions)
DataView -> ItemClick
Your Listeners/Arguments Utility shows function signature as:
DataView -> ItemClick = function ( item, record, node, index, e )
Your Samples Code shows a more accurate arguments list:https://examples4.ext.net/#/DataView/Advanced/Grouping/
https://examples4.ext.net/#/DataView/Advanced/Report/
<script>
var itemClick = function (view, record, item, index, e) { }
<ext:DataView
<Listeners>
<ItemClick Fn="itemClick" />
<Refresh Handler="this.el.select('.item-wrap', true).addClsOnOver('x-view-over');" Delay="100" />
</Listeners>
TreePanel -> ItemContextMenu
Your Listeners/Arguments Utility shows function signature as:
TreePanel -> ItemContextMenu = function ( item, record, node, index, e )
Your Samples Code shows a more accurate arguments list:https://examples4.ext.net/#/TreePane...d/Remote_Mode/
<script>
<script>
var showMenu = function (view, node, item, index, e) {
<ext:TreePanel>
<Listeners>
<ItemContextMenu Fn="showMenu" StopEvent="true" />
<RemoteActionRefusal Handler="Ext.Msg.alert('Action refusal', e.message);" />
</Listeners>
There a lot more than just these two examples.
NOTE: When in a script debugger breakpoint I can see in the call-stack what seems to be a generic '*fire'" function that shows the same arguments as the Listeners Utility - but the Source Code samples that I find seem to sometimes transpose the names of the arguments to more correctly align with the actual parameter content.
Problem is that the source code samples do not encompass all of the different function listeners for most of the components - so if I cannot find it in the source code samples (correctly aligned), I have to follow the Utility's given signature. But, to reiterate, I am finding in some instances how the argument name does not always truly corresponds with the actual contents of the argument.
Any advise on this would be appreciated.
Rafaelcjr now posting under Advance Loan Tech.
Last edited by fabricio.murta; Jul 17, 2017 at 4:52 PM.