Method and device for handling events

An event and event processing technology, applied in the computer field, can solve problems such as abnormalities

Inactive Publication Date: 2011-08-10
SHENZHEN KINGDEE MIDDLEWARE
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] When the event handler of some event does not get all the context information needed to proc

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

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for handling events
  • Method and device for handling events
  • Method and device for handling events

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] Such as figure 1 As shown, the embodiment of the present invention provides a method for processing events, including:

[0047] Step 101: when an event occurs, obtain an event handler for processing the event;

[0048] Step 102: Obtain all context information required to process the event from the main process;

[0049] Step 103: Use the acquired context information to process the event through the event handler.

[0050] In the embodiment of the present invention, by obtaining the event handler for processing the event, and obtaining all the context information required for processing the event, and then processing the event by using the context information through the event handler, thus avoiding abnormal phenomena happened.

Embodiment 2

[0052] Such as figure 2 As shown, the embodiment of the present invention provides a method for processing events, including:

[0053] Step 201: when an event occurs, obtain the event source and related parameters of the event;

[0054] Wherein, when the main process is running the program, an event occurs at the event source due to an operation, and the event source is a component where the event occurs. For example, a programmer clicks a radio button and triggers a click event for the radio button. Additionally, one event or multiple events can occur from an event source.

[0055] Among them, when an event occurs in the event source, set relevant parameters for the event; the relevant parameters set by the event source at least include identification, creation time, processing time and processing timing, etc.; the identification of the event is used to uniquely identify the event. Event, the creation time of the event is the time when the event occurs, and the processing...

Embodiment 3

[0077] Such as image 3 As shown, the embodiment of the present invention provides a method for processing events, including:

[0078] Step 301: when an event occurs, obtain the event source and related parameters of the event;

[0079] Wherein, when the main process is running the program, an event occurs at the event source due to an operation. When an event occurs in the event source, set relevant parameters for the event; the relevant parameters set by the event source for the event at least include identification, creation time, processing time, and processing timing.

[0080] Step 302: According to the event source of the event, the event handler is obtained from the corresponding relationship between the event source and the event handler;

[0081] Wherein, the programmer writes one or more event handlers for each event source in advance, and at the same time, the programmer establishes a corresponding relationship between the event source and the written event handle...

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 discloses a method and device for handling events, belonging to the field of computers. The method comprises the following steps: acquiring the event handling program for handing an event when an event takes place; acquiring all the context information needed for handling the event from the host process; and handling the event through the event handling program according to the context information. The device comprises a first acquiring module, a second acquiring module and a processing module. The method and the device in the invention can be used for avoiding occurrence of abnormal phenomena in handling events.

Description

technical field [0001] The invention relates to the field of computers, in particular to a method and device for processing events. Background technique [0002] The event processing mechanism is that when a certain component generates an event, it can be processed by other components that are interested in the event. [0003] At present, the method for processing an event is as follows: when an event occurs, obtain an event handler corresponding to the event, and immediately use the event handler to process the event. Among them, the event handler needs to use the context information to process the event. [0004] In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art: [0005] When the event handler of some event does not get all the context information needed to process the event, if the event is processed immediately at this time, an abnormal phenomenon will occur. Contents of the inventio...

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): G06F11/00
Inventor 石伟
Owner SHENZHEN KINGDEE MIDDLEWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products