GEOS SDK TechDocs
|
|
3.5 Display Formats
|
4 Supplemental Usage
GVLI_applyMsg, GVLI_destination, HINT_VALUE_NAVIGATE_TO_NEXT_FIELD_ON_RETURN_PRESS, HINT_VALUE_CUSTOM_RETURN_PRESS, MSG_GEN_VALUE_GET_APPLY_MSG, MSG_GEN_VALUE_SET_APPLY_MSG, MSG_GEN_VALUE_GET_DESTINATION, MSG_GEN_VALUE_SET_DESTINATION
GVLI_
applyMsg
sets the message for the GenValue to send out whenever it has been modified and needs to apply its changes. Whenever a GenValue receives
MSG_GEN_APPLY,
i
t will check whether its GVSF_MODIFIED flag has been set; if it has, it will send out its apply message. If a GenValue is operating in immediate mode, these actions will happen immediately, resulting in an immediate action.
GVLI_
destination
specifies the destination object (or process) to send the GVLI_
applyMsg
to. (This may also be a
TravelOption
, such as TO_APP_TARGET.)
Code Display 8-8 Sending an Apply Message
@object GenValueClass MyValue = {
GI_visMoniker = "My Value";
GVLI_value = MakeWWFixed(1.0);
GVLI_applyMsg = MSG_MY_VALUE_DOUBLE_VALUE;
GVLI_destination = process;
}
/* Retrieve the current value. This value will be a fixed point dword. */
@method MyValueProcessClass, MSG_MY_VALUE_DOUBLE_VALUE {
WWFixedAsDWord curValue;
curValue = @call MyValue::MSG_GEN_VALUE_GET_VALUE();
curValue = curValue*2;
@call MyValue::MSG_GEN_VALUE_SET_VALUE(curValue, 0);
}
A GenValue's changes are typically applied when the user hits the Return key and the GenValue has the focus. You can change this behavior, though, with the following hints:
HINT_VALUE_CUSTOM_RETURN_PRESS
allows a textually-oriented GenValue to send the specified message to the destination object when the Return key is pressed.
HINT_VALUE_NAVIGATE_TO_NEXT_FIELD_ON_RETURN_PRESS
instructs the GenValue to navigate (via the UI) to the next textually-activated object (as the tab key works in many situations).
To change a GenValue's apply message or destination, send it
MSG_GEN_VALUE_SET_APPLY_MSG
or
MSG_GEN_VALUE_SET_DESTINATION
, respectively. Use
MSG_GEN_VALUE_GET_APPLY_MSG
or
MSG_GEN_VALUE_GET_DESTINATION
to return the current apply message or destination.
The apply message should be defined on the prototype
GEN_VALUE_APPLY_MSG
, whose values are shown below.
void GEN_VALUE_APPLY_MSG(
WWFixedAsDWord value,
word stateFlags);
This prototype defines the message sent out when the GenValue is "applied." The output of the GenValue should handle a message with these parameters.
Source: GenValue, when "applied."
Destination: The GenValue's output (
GVLI_destination
) object.
Parameters:
value
The current value of the GenValue.
stateFlags
GenValueStateFlags
stored in
GVLI_stateFlags
.Return: Nothing.
Interception: The destination object should handle the apply message with this format.
Message MSG_GEN_VALUE_GET_APPLY_MSG();
This message returns the GenValue's GVLI_
applyMsg
.
Source: Unrestricted.
Destination: Any GenValue object.
Parameters: None.
Return: The apply message of the GenValue.
Interception: Generally not intercepted.
void MSG_GEN_VALUE_SET_APPLY_MSG(
Message message);
This message sets the apply message (in GVLI_
applyMsg
) for a GenValue.
Source: Unrestricted.
Destination: Any GenValue object.
Parameters: message The apply message to set for the GenValue.
Return: Nothing.
Interception: Generally not intercepted.
optr MSG_GEN_VALUE_GET_DESTINATION();
This message returns the current destination object (or process) that the GenValue sends its apply messages to.
Source: Unrestricted.
Destination: Any GenValue object.
Parameters: None.
Return: The destination optr (GVLI_
destination
) of the GenValue.
Interception: Generally not intercepted.
void MSG_GEN_VALUE_SET_DESTINATION(
optr dest);
This message sets the
GVLI_destination
field of the range to the passed optr. The object can be a pointer to a specific object in the system (i.e. the GenProcess object) or can be a pointer to a generic location in the system (i.e. a
TravelOption
).
Source: Unrestricted.
Destination: Any GenValue object.
Parameters: dest The optr of the new destination object.
Return: Nothing.
Interception: Generally not intercepted.
GEOS SDK TechDocs
|
|
3.5 Display Formats
|
4 Supplemental Usage