Calling function from control designer
Hi,
I have a control designer which has all the usual applyChanges, refreshUI etc. How can I write a function that I can calls another function, not via an event handler. e.g.
refreshUI: function()
myfunction();
,
myfunction: function()
alert('hi world');
Thanks
higgsy
Hi higgsy,
You are on the proper path to achieving this. When you call the function from other function you should use this.myfunction(). Consider sample bellow:
refreshUI:
function
()
this
.myFunction();
,
myFunction:
function
()
alert(
"hello world"
);
Hi Radoslav,
Thanks for your response, one other thing though - how do you pass parameters to that function, i.e.:
refreshUI:
function
()
this
.myFunction(
'Hello world'
);
,
myFunction:
function
(inputString)
alert(inputString);
Hi higgsy,
There should not be a problem if you have this scenario
refreshUI:
function
()
this
.myfunction(
"test"
);
,
myfunction:
function
(param)
alert(param);
,