1

我正在做关于用户控制的“Hello World”教程,但没有成功。

在第一次尝试中,我做了用户控制,如教程页面http://wiki.genexus.com/commwiki/servlet/hwiki?Hello+World+User+Control中所示

但它不起作用,所以我在教程的最后下载了可供下载的完成的用户控件。

使用下载用户控件,我创建了这个 Web 面板 在此处输入图像描述

与这个事件

在此处输入图像描述

但我有一个空的结果 在此处输入图像描述

这里缺少什么?这里有什么调试技巧吗?

我正在使用 GeneXus 最新版本,GeneXus X Evolution 3(试用版)。

编辑: 用户控制代码:

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.):
}
4

1 回答 1

2

在我在 cmd 行中运行命令后:

"C:\Program Files <x86>\Artech\GeneXus\GeneXusXEv3Trial\Genexus.exe" /install 

它现在正在工作!我不清楚教程中的这一步。

编辑:

我在 wiki 中找到了这个,它更好地解释了如何安装用户控件,并解决了我遇到的问题:

手动安装

  1. 从 GeneXus Marketplace 下载控件。
  2. 解压缩文件
  3. 复制 GeneXus 安装中 UserControls 目录下的目录。
  4. 使用 /install 参数执行 GeneXus。例如:GX_Installation_Path\GeneXus.exe /install
  5. 检查工具箱是否在“用户控件”部分下添加了新选项。
  6. 享受!
于 2014-08-13T10:06:33.127 回答