Qooxdoo: Reuse desktop classes in mobile application

时间秒杀一切 提交于 2019-12-11 08:39:31

问题


I have a full-grown qooxdoo desktop application and a freshly created mobile application. I want to reuse existing classes from my desktop app in my mobile app. I modified the configuration file so that the compiler knows about the paths.

Just adding a desktop widget to a mobile page is not possible because they seem to be completely incompatible:

var title = new myapp.ui.basic.Label("Test");
page1.getContent().add(title);

produces:

Uncaught TypeError: Object #<HTMLDivElement> has no method 'add' 

Is there another way to use desktop classes in a mobile app?


回答1:


You can use a Class defined for desktop in mobile apps as well but this excludes widgets. qooxdoo has a separate UI Toolkit optimized for mobile which should be used. The widgets for desktop are different and not compatible. Still, you can reuse all your IO and logic classes without a problem.




回答2:


If you are looking for inspiration have a look at the Feedreader application that provides 3 different frontends (desktop, mobile, web) but shares all of the logic.



来源:https://stackoverflow.com/questions/17428805/qooxdoo-reuse-desktop-classes-in-mobile-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!