Hello,
I need to pass an argument to the event function for the onChangeSelection event of a Stock component.
I read the documentation and I found this:
onChangeSelection
This callback method is called when the player select/unselect an item of the stock.
You can connect this to one of your method like this:
dojo.connect( this.myStockControl, 'onChangeSelection', this, 'onMyMethodToCall' );
(...)
onMyMethodToCall: function( control_name )
{
// This method is called when myStockControl selected items changed
var items = this.myStockControl.getSelectedItems();
// (do something)
},
I think that control_name is an argument for the function onMyMethodToCall, but I'm not able to understand which type of variabile it is and how to use it. I tried to insert the argument in my code, but an error occurred.
Could someone help me?
Bye
Emanuele
I need to pass an argument to the event function for the onChangeSelection event of a Stock component.
I read the documentation and I found this:
onChangeSelection
This callback method is called when the player select/unselect an item of the stock.
You can connect this to one of your method like this:
dojo.connect( this.myStockControl, 'onChangeSelection', this, 'onMyMethodToCall' );
(...)
onMyMethodToCall: function( control_name )
{
// This method is called when myStockControl selected items changed
var items = this.myStockControl.getSelectedItems();
// (do something)
},
I think that control_name is an argument for the function onMyMethodToCall, but I'm not able to understand which type of variabile it is and how to use it. I tried to insert the argument in my code, but an error occurred.
Could someone help me?
Bye
Emanuele