Event Driven Graphics
- Last UpdatedJan 02, 2024
- 2 minute read
Unlike the old style of graphical picking used by Design, which suspended the running of a macro until a graphical element had been picked. EDG is a state in which the graphical view gadget is put into, which defines criteria about how and what can be picked and how the picked item is interpreted. When an item is picked, an action is carried out, that means, a macro, function or method is executed, similar to the callback on other gadgets types. What does not happen, as with the old macro suspended mechanism, is that all other forms and gadgets within the application, are still active.
What this means to the AppWare developer is that when writing a utility that uses the EDG system, the action carried out when a pick happens, can only be completed once all the pick information has been ascertained. Therefore, where an action requires two or more picks or the picked information was incorrect, the action routine must either cache the information until it has all the required pick information or it must instigate another event that setups the system for the subsequent picks.
The AppWare developer should now consider the graphic view gadget as any other gadget, that means, on left-mouse-button up, the callback of the gadget will be actions.
What EDG allows from the user point of view, is that they can have the graphics view in a EDG state, but they can still interact with any other form before they have completed the actual pick task. Whereas, pre-EDG they would have to complete all the picks for a utility, before anything else could be done.