
Hi,
How do you type cast the returned value of a method so that you can avoid creating a temporary variable. Here's an example:
panel.getComponent(i).(OnOffButton)setState('0');
I know that the component returned by panel.getComponent(i) will be of type OnOffButton. I want to avoid:
OnOffButton btn = (OnOffButton) panel.getComponent(i); btn.setState('0');
Is there a way around this?
Thanks,
Justin

Hi,
You may try following code:
((OnOffButton) panel.getComponent(i); btn.setState('0')).setState('0');
Thanks

Hi,
That doesn't work. (Also, i'm trying to avoid creating the btn variable in the first place).
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.