sm_gp_inquire(string field_name, int which)
Jam5 gp_inquire mnemonic |
Hex Value |
gp_inquire FLAGS return value |
Return Hex Value |
Equivalent Jam7 Property Setting |
GP_FLAGS |
0x4000 |
GP_SINGLE |
0x01 |
num_selections = PV_1 |
GP_AUTOTAB |
0x08 |
autotab = PV_YES |
||
GP_ZERO_OR_ONE **Note that for this value, both this value and GP_SINGLE will be set. |
0x10 |
num_selections = PV_0_OR_1 |
||
0x00 |
num_selections = PV_ANY autotab = PV_NO |
|||
GP_NOCCS |
0x4001 |
Return value is sum of max_occurrences of every widget in group. No runtime property exists for this. It must be summed by hand by finding the max_occurrences for each widget. |
result = sm_gp_inquire("order_by_meth", GP_FLAGS) if ((result & GP_SINGLE) & !(result & GP_ZERO_OR_ONE)) selection_required = 1 else selection_required = 0
if (@widget("order_by_meth")->num_of_selections = PV_1 selection_required = 1 else selection_required = 0
num_sels = sm_gp_inquire("order_by_meth", GP_NOCCS)
Assuming that the group "order_by_meth" contains the widgets
"postal_meths", "phone_meths" and "internet_meths".
num_sels = @widget("postal_meths")->max_occurrences + @widget("phone_meths")->max_occurrences + \ @widget("internet_meths")->max_occurrences
sm_isselected(string group_name, int group_occurrence)
In Jam7, each radio and check button has the 'selected' property, which can be directly queried or set, where the possible values are PV_YES or PV_NO. To access this property, it is necessary to directly reference the individual widget, rather then using the group name.
ret = sm_isselected("mailtype", 2)
ret = @widget("airmail")->selected
ret = sm_isselected("mailtype", 2)
code to read the group and determine if 2 is selected