是否可以在 Stanalone App 上使用 Qooxdoo Native App?

Is it possible to use Qooxdoo Native App on Stanalone App?

我的代码是在 StandAlone 应用程序上创建的。 我想使用从本机应用程序生成的一些 class。 但我不知道下一步该怎么做。

假设我有这样的独立 class:

myWin = new qx.ui.window.Window();

我有这个 class:

qx.Class.define("myapp.MyNative",
{
   extend : application.Native,
   members:{    
       ...........
  }
});

如何在 myWin 实例上使用这个 class? 或者它可能是:

mywin.add(new myapp.MyNative());

请推荐我。

嗯,你想在 qooxdoo 应用程序中使用 qooxdoo 应用程序......这看起来很奇怪,我认为它行不通。如果您想使用原生 javascript、css、html 代码,您可以直接这样做:

var myWidget = new qx.ui.core.Widget();

myWidget.addListenerOnce('appear',function(e){

   var el = myWidget.getContentElement().getDomElement();
   /// do stuff to the element

},this);

获得对 qooxdoo 小部件内 dom 元素的本机访问。

请注意,您只能在呈现小部件后获取 dom 元素,因此您必须为此使用 appear 事件处理程序。