since you didn't show declaration they couldn't know that your component name was refText and not refTextClick.
well they couldn't know that refTextClick was not an integer variable either , but no one assumed that. I did show the create() call of the dynamics and stated that the other variable was of the same type. There was no ambiguity.
What really caused the confusion here was the stupid error message. Instead of complaining that refTextClick.onclick simply did not exist , it gave me some distracting BS about parameter counts.
Error: Wrong number of parameters specified for call to "refTextClick"
I was not attempting to call refTextClick, It could have thought I was trying to call refTextClick.onclick in that context but that does not exist. That is what the error message should have thrown out. Or it could have said refTextClick had not property called onclick.
In either case I would have realised what my mistake was instead of trying to find what the "parameter" BS was supposed to mean.