The best way to understand what wxegen.exe
generates is to look how a re-call function is used first.
Page Calling _Pick location_ introduces the transition from the calling EditPersonForm
(Arnold Schwarzenegger) to the called PickLocation
form. As a programmer, you express the transition in the event handler for the Pick location menu item:
Person
's (Arnold's) Location
property receives the picked Location
PickLocation
form is called – that's where the rubber meets the roadThe Method
is a static method all classes for re-call functions have. The code for such these methods is peculiar for the class, but its concrete manifestation is very boring and pure boilerplate. wxegen.exe
generates the code for Call
– or two Call
methods, actually. These methods support re-throwing exceptions across postbacks and the page functions' call stack. You can have a look at PickLocation
's Call
-s methods here: PickLocation's Call methods.
wxegen.exe
wxegen.exe
not also generates the Call
method, but also properties for accessing page-local variables – including the return value and parameters. This data is stored in an untyped Dictionary
, but wxegen.exe
takes care of appropriate casts. Remember from the Pick location's re-call header page that we have specified
Location
– a Location
object is passed back to the caller, after allitems
of type Location[]
– this array of locations is required for storing the pick-list ("3" in the illustration above) between post-backsThis is what wxegen.exe
makes from this:
public Location ReturnValue { set { this.Variables["ReturnValue"] = value; } } public Location[] items { get { return ((Location[])(this.Variables["items"])); } set { this.Variables["items"] = value; } } |