I'm doing the "Hello World" tutorial about User Control but without success.
In the first attempt I did the User Control like is shown in the tutorial page http://wiki.genexus.com/commwiki/servlet/hwiki?Hello+World+User+Control
But it didn't work, so I download the finished user control available for download in the end of the tutorial.
With the download user control, I have created this web panel
with this event
But I have an empty result
What is missing here? Any tips for debugging here?
I'm using the GeneXus latest version, GeneXus X Evolution 3 (trial).
Edit: The user control code:
function HelloWorld($)
{
this.Width;
this.Height;
this.FontFace;
this.FontColor;
this.FontSize;
this.show = function()
{
///UserCodeRegionStart:[show] (do not remove this comment.)
var buffer= '<a id="hworld1" href="#" style="color:rgb(' + this.FontColor.R + ',' + this.FontColor.G + ',' + this.FontColor.B + ')' + '; font-family:' + this.FontFace+ ';font-size:' + this.FontSize + 'pt;">Hello World!!!</a>';
this.setHtml(buffer);
document.getElementById("hworld1").onclick = this.HelloWorldClicked;
///UserCodeRegionEnd: (do not remove this comment.)
}
///UserCodeRegionStart:[User Functions] (do not remove this comment.)
///UserCodeRegionEnd: (do not remove this comment.):
}
After I run in cmd line the command:
"C:\Program Files <x86>\Artech\GeneXus\GeneXusXEv3Trial\Genexus.exe" /install
It is now working! It was not clear for me, this step in the tutorial.
Edit:
I have found this in the wiki, that explains better how to install an User Control, and solves the problem I had:
Manual installation
- Download the control from GeneXus Marketplace.
- Unzip files
- Copy the directory under the UserControls directory in the GeneXus installation.
- Execute GeneXus with the /install parameter. For example: GX_Installation_Path\GeneXus.exe /install
- Check that the toolbox has added the new option under the User Controls section.
- Enjoy!