"ActiveX" is passed to gp:Calculate-and-Draw-Tiles as the ObjectCreationStyle argument. But what about the other times gp:Calculate-and-Draw-Tiles is invoked?
In the reactor callback, a hard-coded stringIf you remember back to Lesson 4, it was pointed out that whenever you change a stubbed-out function, you need to ask the following questions:
gp:Calculate-and-Draw-Tiles. VLISP has a feature that helps you do this.
The same questions need to be asked any time you make a significant change to a working function as you build, refine, and update your applications. In this case, you need to find any other functions in your project that invokeTo find all calls to gp:Calculate-and-Draw-Tiles in your project
Because you preselected the function name, it is already listed as the string to search for.
When you select this option, the Find dialog box expands at the bottom, and you can select the project to be searched.
VLISP displays the results in the Find output window:
VLISP activates a text editor window and takes you right to that line of code in gpmain.lsp. The code currently appears as follows:
(setq tilelist (gp:Calculate-and-Draw-Tiles gp_PathData))
(setq tilelist (gp:Calculate-and-Draw-Tiles gp_PathData nil))
nil? Take another look at the pseudo-code:
WhyIf ObjectCreationStyle is nil, assign it from the BoundaryData.
nil as a parameter to gp:Calculate-and-Draw-Tiles causes that function to check the user's choice of how to draw the tiles (as determined by the dialog box selection and stored in gp_PathData). Subsequent calls from the command-ended reactor callback, however, will override this behavior by forcing the use of ActiveX.
PassingCongratulations! You now have the basic reactor functionality in place. If you prefer, copy the gpmain.lsp and gpdraw.lsp files from the Tutorial\VisualLISP\Lesson7 into your working directory and examine the completed, debugged code.
gp:Command-endedfunction:
There is still a lot of work to be done, and it is all triggered from this fragment of code in the(setq NewReactorData
(gp:RedefinePolyBorder CurrentPoints reactorData)
) ;_ end of setq