Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for transferring data between modules by utilizing event mechanism in flex

An event mechanism and inter-module technology, applied in the direction of inter-program communication, multi-program installation, etc., can solve the problems of increasing the coupling between modules, code clutter, unfavorable maintenance and modification, etc., to achieve easy maintenance, clear structure, and elimination of dependencies. sexual effect

Inactive Publication Date: 2009-12-09
LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF0 Cites 9 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Since the modules in flex are not loaded with the startup of the program, but are loaded dynamically during the running of the program, if module B has not been loaded, then module A will throw an exception when accessing the properties or methods of module B, only in the module Only when B has been loaded, module A can run normally, so that module A has a certain dependence on module B, thus increasing the coupling between modules
In addition, when transferring data from one module to multiple modules, it is necessary to repeatedly access the properties or methods of the external modules. If more data needs to be transferred, the code will look messy, which is not conducive to later maintenance and modification.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0015] Assuming that the existing module A, module B, and module B need the data in module A, the method of using the event mechanism to transfer data between modules is as follows:

[0016] 1) The custom event class DataEvent is used to save and transmit data. The type of data to be transmitted can be any type recognized by the system, and it supports custom data types. The event class inherits from the flash.events.Event class, and adds one or more member variables for storing the data to be transferred.

[0017] 2) Create an instance of DataEvent in module A, save the data to be transferred into the variable defined in step 1, and then distribute the DataEvent event with the main program as the object of event distribution.

[0018] 3) In module B, set the monitoring of the event instance created in step 2. After listening to the event distributed by the main program, module B calls the corresponding processing method to separate the data carried in the event. In this way...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for transferring data between modules of a flex application program, which comprises the steps of utilizing an event propagation mechanism of the flex to encapsulate the data into a customized event, and then transferring the event carrying the data from a source module to a target module and separating the data which is contained in the event from the target module for the target module to use, thereby achieving the purpose of transferring the data between the modules. The method has simple operation and easy maintenance, and eliminates the dependence between the modules. Because the event propagation mechanism of the flex is utilized by the method, the data transferring efficiency is high, and errors do not easily occur.

Description

technical field [0001] The invention relates to a method for transferring data between modules in flex development. The method is fast and reliable, can conveniently realize the interaction between modules, is easy to use, is convenient to maintain, and greatly reduces the coupling degree between modules, making each module more independent. Background technique [0002] At present, the method of transferring data between modules in flex is mainly realized by calling the method attribute between two modules, for example, accessing the attribute or method of module B in module A, so that the data of module A is transferred to module B middle. Since the modules in flex are not loaded with the startup of the program, but are loaded dynamically during the running of the program, if module B has not been loaded, then module A will throw an exception when accessing the properties or methods of module B, only in the module Only when B has been loaded, module A can run normally, s...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/54
Inventor 邸双朋魏健
Owner LANGCHAO ELECTRONIC INFORMATION IND CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products