WO2010057434A1 - 一种生成控件对象库的方法和装置 - Google Patents
一种生成控件对象库的方法和装置 Download PDFInfo
- Publication number
- WO2010057434A1 WO2010057434A1 PCT/CN2009/075033 CN2009075033W WO2010057434A1 WO 2010057434 A1 WO2010057434 A1 WO 2010057434A1 CN 2009075033 W CN2009075033 W CN 2009075033W WO 2010057434 A1 WO2010057434 A1 WO 2010057434A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- control
- file
- interface module
- module
- list
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Definitions
- the present invention relates to the field of computer Internet, and in particular, to a method and apparatus for generating a library of control objects.
- IM Ins tant Mes sag ing
- each interface module of IM is composed of a window and various controls attached to the window.
- Startup Panel This interface module consists of a window and an account input Edi t control, password input Edi t control, soft keyboard control, check box control, button But ton control and other controls.
- the IM skin file includes information on the controls on the IM window, which properties of these controls, and the values corresponding to these properties described in the XML (Extensible Markup Language) file.
- XML Extensible Markup Language
- the size, color, location, etc. of the login button on the launch panel are described in XML.
- an XML describes which child controls are in a window, as well as the size, name, text description, position, color, and child controls that are subordinate to these child controls.
- IM software Similar to MFC (Microsof t Founding Clas ses, Microsoft Foundation), which has buttons but ton, edit Edi t, etc., IM software also has a GUI (Graphic User Interface) control called ⁇ skin. Controls, that is, some of the controls used to build a graphical interface, are referred to below as controls (or controls).
- the controls in the middle are usually modified: 3 ⁇ 4 under the mouth: Wherein, the IM control that needs to be modified is identified, firstly, the control description file is opened; then, from the opened control description file, the IM control that needs to be identified is found; secondly, the found IM control that needs to be identified is added to the object. In the library file, the subsequent modification of the IM control can be implemented.
- the method provided by the prior art is cumbersome to operate, and the developer who needs to control the IM control can easily access various IM controls with a single access method.
- SUMMARY OF THE INVENTION In order to realize the automatic conversion of an IM control into an object library file, it is convenient for a developer who needs to control the IM control to use various IM controls.
- the embodiment of the present invention provides a method and apparatus for generating a control object library. The technical solution is as follows:
- an embodiment of the present invention provides a method for generating a control object library, where the method includes:
- A reading a skin file of the interface module, configuring a file according to the hierarchical relationship of the interface module, and generating a control object list of the interface module;
- step B determining whether the interface module has a control identifier file, if yes, importing the control identifier file of the interface module into the control object list, and performing step C; otherwise, generating a control identifier of the control of the interface module, and obtaining a control Identify the file, import the obtained control identification file into the generated control object list, and perform step C;
- step C Output the control object list imported from the control identification file obtained in step B to the object library file.
- an embodiment of the present invention provides an apparatus for generating a control object library, where the apparatus includes:
- a generating module configured to read a skin file of the interface module, and generate a control object list of the interface module according to the hierarchical relationship configuration file of the interface module;
- a first judging module configured to determine whether the interface module has a control identifier file, and a first processing module, configured to: when the result of the first judging module is yes, The control identifier file of the interface module is imported into the control object list;
- a second processing module configured to: when the result of the first determining module is negative, generate a control identifier of the control of the interface module, obtain a control identification file, and import the obtained control identification file into the generated control object list. ;
- an output module configured to output, to the object library file, a control object list that is obtained by the first processing module or the second processing module and that is imported into the control identifier file.
- the IM control is automatically converted into an object library file, which facilitates the use of various IM controls by the developer who needs to control the IM control, which reduces the operational complexity of the operation and reduces the time spent on the operation.
- FIG. 1 is a schematic flow chart of an embodiment of a method for generating a control object library according to the present invention
- FIG. 2 is a detailed flow chart of an embodiment of a method for generating a control object library according to the present invention
- FIG. 4 is a detailed structural diagram of an apparatus embodiment for generating a control object library according to the present invention.
- the example provides a method for generating a control object library.
- the method of the method shown in Figure 1 is as follows:
- Step S1 Read the skin file of the interface module, configure a file according to the hierarchical relationship of the interface module, and generate a control object list of the interface module.
- the skin file stores which interface modules the skin consists of and the hierarchical relationship between these interface modules. In this step, by reading the skin file, the hierarchical relationship between the list of interface modules constituting the skin and the module can be obtained.
- Step S2 determining whether the interface module has a control identifier file, if yes, importing the control identifier file of the interface module into the control object list, and performing step S3; otherwise, generating a control identifier of the control of the interface module, and obtaining the control identification file, The control identifier file is imported into the generated control object list, and step S3 is performed;
- the list of control objects is a list of all the controls that make up an interface module.
- the control identification file is a file that stores the handle of the control. For each control, the identifier of the control is used as the handle, and the identifier of the control is equivalent to the alias of the control.
- a corresponding control file can also be set, and the control has a list of the items contained in the control.
- Step S3 Output the control object list of the control identification file obtained in step S2 to the object library file.
- step S3 further includes: internationalizing the obtained control object list into which the control identification file is imported.
- the above-mentioned internationalization of the obtained control object list into which the control identification file is imported includes:
- step S1 the method further includes:
- step S1 Reading the object classification configuration file preset in the object library, classifying the control according to the read object classification configuration file, generating a control dictionary, a window list, and a container list; accordingly, step S1 includes:
- control name text description identifier
- control type name control identifier
- the corresponding text description is searched in the internationalization dictionary, and a list of control objects of the interface module is generated.
- step S2 the method further includes:
- the embodiment of the present invention provides a method for generating a control object library.
- the present embodiment is an example of a method provided by an embodiment of the present invention in the field of IM, a common object-oriented explanatory computer programming language Python.
- the method is as follows:
- the IM control is divided into three categories according to different attributes: a control object class, a window class, and a container class;
- control object class refers to the entity control that completes the visible function of the user who uses the IM control (usually the developer of the IM software). For example: Button Button, TabBut ton, Co ⁇ boBox, etc. all belong to the IM object of the control object class.
- the name of the class control they are The Python object names should be stored in the Python dictionary structure to form a control dictionary.
- window class refers to various window controls in the IM control, for example: Windows,
- IGFFloa t ingWnd PopupWindow, etc., store the name of this type of control in the Python list structure to form a list of windows.
- the container class refers to a list of controls arranged in the IM control for organizing the hierarchy; for example, Frame , TabCtr l , IGFToolbar , etc., the name of the control is stored in the Python list structure to form a container list.
- the classification rule according to which can be written in a specific file defines the file written into the classification rule as the object classification configuration file. .
- the configuration file mainly includes the following contents:
- Hierarchical relationship A window can often be described by multiple XML files. For example, a set center window, there are multiple TabBut ton, each TabBut ton has a number of child controls, the parent-child relationship of these controls is called the control level, and each child control is described by an XML file, these child controls and descriptions
- the mapping relationship of the XML files is called a file level.
- custom controls Some controls on the IM software interface are not defined in the skin file, you need to define the properties of these controls and specify the hierarchical relationship; for example: for dynamically generated controls, you need to define the properties of the control and specify its hierarchical relationship .
- Attribute mandatory setting The properties of some controls in the skin file are inconsistent with the attributes displayed by the final software. One or more attributes of the control can be reassigned by the attribute forcing technique; for example, the text on but ton is forcibly modified.
- a Python object that associates the Python object with the controls in the IM interface module skin file. Some methods are provided in the Python object to access certain properties of the skin control.
- a control object includes at least the following members: a child object, an object name, a text description ID, an internationalized string of the ID, a name (type), and an object ID.
- 104A Find a list of its sub-objects through the hierarchical relationship of objects and sub-objects in the configuration file corresponding to the window (each sub-object can also have sub-objects and other various members);
- the object name of the object is read by reading the skin file of the window, the string ID of the text description, the name (type), the object ID;
- a Python object corresponding to each skin control can be generated, and a list of control objects of the IM interface module can be generated.
- step 105 Determine whether the IM interface module has a control identification file, and if yes, execute step 107; otherwise, go to step 106.
- control identification file only refers to the use of the object library for convenience, each control has a unique identifier at the same level, (or a globally unique identifier in the object library);
- step 106 Generate a control identifier of each control of the IM interface module, and update to step 104 above. A list of control objects of the generated IM interface module; and outputting the generated control identification file, and then performing step 108.
- the Chinese simplified object is read from the internationalization dictionary as the identifier of the control; otherwise, if there is no file description attribute, the identifier is generated based on the control name.
- the first generated object library is modified by the object library management tool to be a short, easy-to-identify text, and then exported to generate an identification file associated with the window configuration file name, wherein the exported control identification file is called a control Identification file.
- control identification files are placed in the same directory as the window configuration file, and then the control identification file is imported into the object library when the object library is generated. Thus, it is guaranteed that the user will not be affected even when the international resource file is constantly modified.
- step 107 Import the control identifier file of the IM interface module in the control object list of the IM interface module generated in the above step 104, and then perform step 108.
- step 108 Determine whether the IM interface module has a control file, if yes, execute step 109; otherwise, go to step 110.
- step 109 Import the control file of the IM interface module into the control object list of the IM interface module, and then go to step 110.
- Step 110 Generate an internationalization dictionary according to step 103, and internationalize the control object list of the IM interface module.
- step 110 is to enable the method provided by the embodiment of the present invention to meet the requirements of internationalization and generalization.
- the control object list of the IM interface module that has been subjected to the internationalization process described above is output to the object library file.
- the method for generating a control object library implements the automatic conversion of the IM control into the object library file for the currently widely used IM software, which facilitates the use of various types of research and development personnel who need to control the IM control.
- the IM control reduces the operational complexity of the operation and reduces the time spent on the operation.
- the object library generated by the method has internationality and versatility, that is, the internationalization resource change is shielded by the identifier import and export technology. The impact of library usage.
- an embodiment of the present invention provides an apparatus for generating a control object library, where the apparatus includes:
- a generating module 301 configured to read a skin file of the interface module, generate a file according to a hierarchical relationship configuration file of the interface module, and generate a control object list of the interface module;
- the first determining module 302 is configured to determine whether the interface module has a control identifier file.
- the first processing module 303 is configured to: when the first determining module 302 determines that the result is yes, import the control identifier file of the interface module into the control object list;
- the second processing module 304 is configured to: when the result of the first determining module 302 is negative, generate a control identifier of the control of the interface module, obtain a control identifier file, and import the obtained control identifier file into the generated control object list;
- the output module 305 is configured to output the control object list obtained by the first processing module 303 or the second processing module 304 into the object library file.
- the output module 305 in the device for generating the control object library is further configured to internationalize the control object list obtained by the first processing module 303 or the second processing module 304 and importing the control identification file.
- FIG. 4 is a detailed schematic diagram of an apparatus for generating a control object library according to an embodiment of the present invention.
- the apparatus further includes: a forming module 306, configured to read an internationalized resource of the interface module, and generate the internationalized resource according to the read International dictionary;
- the output module 305 specifically includes:
- the processing unit 3051 is configured to obtain an internationalization dictionary according to the forming module 306, and perform an internationalization process on the control object list obtained by the first processing module 303 or the second processing module 304 and importing the control identifier file;
- the output unit 3052 is configured to output the control object list of the control identification file that is processed by the processing unit 3051 to the object library file.
- the apparatus for generating a control object library provided by the embodiment of the present invention further includes: a classification module, configured to read a preset object classification configuration file in the object library, and classify the control according to the read object classification configuration file, Generate a control dictionary, a list of windows, and an ⁇ 1 J table;
- the generating module 301 specifically includes:
- the obtaining unit is configured to read the skin file of the interface module, and according to the hierarchical relationship configuration file of the interface module, obtain the correspondence between the control in the interface module and the child control of the control; and obtain the control name, text description identifier of each control, a control type name and a control identifier; a generating unit, configured to search for a corresponding text description in the international dictionary formed by the forming module according to the text description identifier of each control obtained by the obtaining unit, and generate a control object list of the interface module.
- the device further includes:
- a second determining module configured to determine whether the interface module has a control file
- a fourth processing module configured to: when the determining result of the second determining module is yes, import the control file into the first processing module 303 or the second
- the control module 304 obtains a list of control objects after the control identification file is imported.
- the device for generating a control object library provided by the embodiment of the present invention automatically converts the IM control into an object library file for the currently widely used IM software, which facilitates the use of various types of research and development personnel who need to control the IM control.
- the IM control reduces the operational complexity of the use and reduces the time spent on the operation; further, the object library generated by the device is international and versatile.
- the technical solution provided by the embodiment of the present invention can be implemented by extracting the control information in the skin file according to the hierarchical relationship to generate a clear object library, and realizing the dynamic addition of the undefined control in the skin file and the control attribute through the convenient configuration file.
- receiving in the embodiment of the present invention may be understood as actively acquiring information from other modules or receiving information sent by other modules.
- receiving in the embodiment of the present invention may be understood as actively acquiring information from other modules or receiving information sent by other modules.
- a person skilled in the art can understand that the drawings are only a schematic diagram of a preferred embodiment, and the modules or processes in the drawings are not necessarily required to implement the embodiments of the present invention.
- modules in the apparatus in the embodiments may be distributed in the apparatus of the embodiment according to the embodiment, or may be correspondingly changed in one or more apparatuses different from the embodiment.
- the modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
- serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
- Some of the steps in the embodiment of the present invention may be implemented by using software, and the corresponding software program may be stored in a readable storage medium, such as an optical disk or a hard disk.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Document Processing Apparatus (AREA)
Description
Claims
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2008103056569A CN101436133B (zh) | 2008-11-20 | 2008-11-20 | 一种生成控件对象库的方法和装置 |
CN200810305656.9 | 2008-11-20 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2010057434A1 true WO2010057434A1 (zh) | 2010-05-27 |
Family
ID=40710582
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2009/075033 WO2010057434A1 (zh) | 2008-11-20 | 2009-11-19 | 一种生成控件对象库的方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN101436133B (zh) |
WO (1) | WO2010057434A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162735A (zh) * | 2020-10-28 | 2021-01-01 | 北京三快在线科技有限公司 | 控件标识生成方法、装置、计算机设备及存储介质 |
WO2023103917A1 (zh) * | 2021-12-09 | 2023-06-15 | 杭州逗酷软件科技有限公司 | 语音控制方法、装置、电子设备及存储介质 |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101436133B (zh) * | 2008-11-20 | 2012-11-21 | 腾讯科技(深圳)有限公司 | 一种生成控件对象库的方法和装置 |
CN102004633B (zh) * | 2009-09-03 | 2013-04-24 | 阿里巴巴集团控股有限公司 | 一种处理控件属性的方法及装置 |
CN102103491B (zh) * | 2009-12-18 | 2013-11-06 | Tcl集团股份有限公司 | 一种界面生成系统以及方法 |
CN101894018A (zh) * | 2010-05-31 | 2010-11-24 | 浪潮(北京)电子信息产业有限公司 | 一种维护控件状态信息的方法及装置 |
CN101887389A (zh) * | 2010-06-03 | 2010-11-17 | 南京班墨自动化技术有限公司 | 一种基于二元结构的脚本生成方法 |
CN103176802B (zh) * | 2013-03-29 | 2016-05-11 | 厦门亿联网络技术股份有限公司 | 通过控件池实现系统的用户界面ui与控件库分离的方法 |
CN104462137A (zh) * | 2013-09-22 | 2015-03-25 | 北大方正集团有限公司 | 互动对象的创建方法及装置 |
CN103823682B (zh) * | 2014-02-26 | 2017-08-08 | 广州视源电子科技股份有限公司 | 一种动态ui控件生成方法以及装置 |
CN105578284B (zh) * | 2015-12-24 | 2019-01-08 | 四川迪佳通电子有限公司 | 一种机顶盒接口管理方法及系统 |
CN108984237A (zh) * | 2017-05-31 | 2018-12-11 | 武汉斗鱼网络科技有限公司 | 一种控件呈现方法、存储介质、设备及系统 |
CN108563477B (zh) * | 2018-03-02 | 2022-04-26 | 北京奇艺世纪科技有限公司 | 一种页面事件响应方法和装置 |
CN110888573A (zh) * | 2019-11-08 | 2020-03-17 | 爱钱进(北京)信息科技有限公司 | 对控件进行标识的方法、装置以及存储介质 |
CN110990010B (zh) * | 2019-12-03 | 2023-08-25 | 锐捷网络股份有限公司 | 一种软件界面代码的生成方法及装置 |
CN111209000B (zh) * | 2020-01-08 | 2024-01-26 | 网易(杭州)网络有限公司 | 自定义控件的处理方法、装置、电子设备及存储介质 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1577263A (zh) * | 2003-06-26 | 2005-02-09 | 华为技术有限公司 | 支持多语言的用户界面实现方法及其装置 |
CN101192143A (zh) * | 2006-12-01 | 2008-06-04 | 上海亚伦科技有限公司 | 一种软件界面的构造方法 |
CN101436133A (zh) * | 2008-11-20 | 2009-05-20 | 腾讯科技(深圳)有限公司 | 一种生成控件对象库的方法和装置 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5761510A (en) * | 1995-11-07 | 1998-06-02 | Microsoft Corporation | Method for error identification in a program interface |
CN1304945C (zh) * | 2004-06-02 | 2007-03-14 | 中兴通讯股份有限公司 | 一种电信设备配置界面自动生成方法 |
-
2008
- 2008-11-20 CN CN2008103056569A patent/CN101436133B/zh active Active
-
2009
- 2009-11-19 WO PCT/CN2009/075033 patent/WO2010057434A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1577263A (zh) * | 2003-06-26 | 2005-02-09 | 华为技术有限公司 | 支持多语言的用户界面实现方法及其装置 |
CN101192143A (zh) * | 2006-12-01 | 2008-06-04 | 上海亚伦科技有限公司 | 一种软件界面的构造方法 |
CN101436133A (zh) * | 2008-11-20 | 2009-05-20 | 腾讯科技(深圳)有限公司 | 一种生成控件对象库的方法和装置 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112162735A (zh) * | 2020-10-28 | 2021-01-01 | 北京三快在线科技有限公司 | 控件标识生成方法、装置、计算机设备及存储介质 |
WO2023103917A1 (zh) * | 2021-12-09 | 2023-06-15 | 杭州逗酷软件科技有限公司 | 语音控制方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN101436133A (zh) | 2009-05-20 |
CN101436133B (zh) | 2012-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2010057434A1 (zh) | 一种生成控件对象库的方法和装置 | |
US10540383B2 (en) | Automatic ontology generation | |
US8972872B2 (en) | Building computing applications based upon metadata | |
CN101373431B (zh) | 增强型小组件合成平台 | |
US10606957B1 (en) | Method and system for translating natural language policy to logical access control policy | |
US20120131556A1 (en) | Xpath-based selection assistance of gui elements during manual test script authoring for xml-based applications | |
CN106104518A (zh) | 用于按照示例的数据提取的框架 | |
JP2007531157A (ja) | 基幹業務アプリケーション統合のためのアダプタフレームワーク | |
EP3296866B1 (en) | Method implemented by a computer that presents software-type applications based on design specifications | |
US20070168379A1 (en) | Method and apparatus for cataloging screen shots of a program | |
CN110825364B (zh) | 一种基于树形结构的应用模板配置方法 | |
US11256743B2 (en) | Intermixing literal text and formulas in workflow steps | |
CN110297636A (zh) | 一种基于页面配置文件的页面自动生成和参数管理方法、系统和装置 | |
CN108345691B (zh) | 数据源通用处理框架构建方法、数据源处理方法及装置 | |
CN117057318A (zh) | 领域模型生成方法、装置、设备以及存储介质 | |
US10275462B2 (en) | Automatic translation of string collections | |
CN112582073B (zh) | 医疗信息获取方法、装置、电子设备和介质 | |
US9082104B2 (en) | Method and apparatus for managing system specifications | |
JP2006244283A (ja) | データベース管理装置およびデータベース管理方法 | |
CN114153547B (zh) | 管理页面显示方法及装置 | |
WO2019144852A1 (zh) | 一种新型计算机编程语言 | |
CN112631585B (zh) | 基于xml的快速参数界面配置方法 | |
CN114391151A (zh) | 增强自然语言生成平台 | |
CN111104118A (zh) | 一种基于aiml的自然语言指令执行方法及系统 | |
Ratiu et al. | Towards a repository of common programming technologies knowledge |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 09827183 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 3430/CHENP/2011 Country of ref document: IN |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.10.11) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 09827183 Country of ref document: EP Kind code of ref document: A1 |