Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Render() and other fucntions
Render() seems to behave differently
The render function cannot return the variable. it has to echo it.
The other functions need to return and not echo. if they echo the result is not what u want. For eg If u use
this will not put the result in the Panel but rather on the top of the page
this will not work if Render doesn't echo, and uses return instead.
Is it just me?
class DisplayNugget extends Control
{
var $DisplayString;
function DisplayNugget(&$Context) {
$this->Name = 'DisplayNugget';
$this->DisplayString = $DisplayString;
}
function Render() {
echo $this->DisplayString;
}
function DisplayPanel () {
return $this->DisplayString;
}
}
The render function cannot return the variable. it has to echo it.
The other functions need to return and not echo. if they echo the result is not what u want. For eg If u use
$Panel->AddString($DisplayNugget->DisplayPanel());
this will not put the result in the Panel but rather on the top of the page
$Page->AddRenderControl($DisplayNugget, $Configuration[CONTROL_POSITION_PANEL])
this will not work if Render doesn't echo, and uses return instead.
Is it just me?
0
This discussion has been closed.
Comments
It works as it is now. but i thuink that is bad programming to be doing it the way above.