Class: Entry_Item_Mixin
Class Hierarchy:
cObjectMixinEntry_Item_MixinClass Definition
Properties
integerAuto_prompt_State
(JJT) Added for auto-prompt support (from autoprmpt.pkg)
Auto_Prompt_State: If true, autoprompt if iPrompt message exists
and field is blank. If False Auto_prompt must
be asked for (Msg_Auto_prompt).
integerobject_item_entry_exit
IntegerPrompt_Entry_Mode
Prompt_Entry_Mode
AUTO_PROMPT_READY = Allow autoPrompt. (idle position)
AUTO_PROMPT_CHECK = AutoPrompt if blank field
AUTO_PROMPT_ON = Do AutoPrompt on the next entry
AUTO_PROMPT_OFF = Do NOT AutoPrompt the next enxtry. (internal)
Functions and Procedures
Auto_Prompt(Integer Itm#)
*********************JJT
The following was added for auto_prompt support. In addition,
some properties in the define_entry_item and Prompt was changed.
This tells the next entry statement to execute an auto-prompt.
Right now there is a bug in the iEntry mechanism that causes the
the iEntry to not always get called. When this happens we lose the
auto_prompt (this often happens if your auto-prompt is in the first
item). The work-around for now is that the ENTRY function makes an
check. If the iEntry message is MSG_AUTO_PROMPT it will do the auto-
prompt for you. This means that the one line here is not really required.
However, when iEntry is fixed - it WILL be needed. This also shows how you
can use this statement in other iEntry messages
define_entry_item()
Description
This procedure defines kPrompt and kZoom accelerator keys for this
object.
Assumptions/Preconditions
This procedure should only be invoked from the Construct_Object
procedure of a class definition.
Exceptions
None.
Notes
None.
IntegerEntry()
stringEntry_Value(integer Itm#)
This is lifted from clmovemx.pkg. It shuts off auto_prompting. If this is
not done you get an auto-prompt after move. This is only required because
the entry function handles msg_auto_prompt directly because the ientry
hook is not always reliable. When that is fixed, we could also remove
this code. For this to work the entitem package MUST be mixed in after
the clmove mixin package. Used in entry_form and wide_list
procedure Move_Client_Location integer yoff integer xoff
// new line of code
Set Prompt_Entry_Mode to AUTO_PROMPT_OFF // been there, done that
//.....direct from clmovemx
// if allowed do the move....else delegate
if (Allow_Move_State(self)) ;
send Move_Location yoff xoff
Else Delegate Send Move_Client_Location yoff xoff
end_procedure
Public Message
Just like Value except this will strip .0000 from numeric
items which allows for comparison with data fields. Only works if
item is associated with a file.field
IntegerExec_Entry(Integer item#)
Description
This function invokes the entry-message for the specified item#, and
returns the result; non-zero means that entry to the specified item#
should be denied.
Assumptions/Preconditions
The item# argument must be a valid entry-item index (between 0 and
Item_Count-1), or the sentinel value CURRENT.
Exceptions
None.
Notes
This function is used to force execution of an item's entry-msg.
IntegerExec_Exit(Integer item#)
Description
This function invokes the exit-message for the specified item#, and
returns the result; non-zero means that exit from the specified item#
should be denied.
Assumptions/Preconditions
The item# argument must be a valid entry-item index (between 0 and
Item_Count-1), or the sentinel value CURRENT.
Exceptions
None.
Notes
This function is used to force execution of an item's exit-msg.
integerExec_Validate(integer item#)
Description
This function invokes the validate-message for the specified item#,
and returns the result; non-zero means that the data entered in the
specified item# is invalid, and that the cursor should stay on the
specified item#.
Assumptions/Preconditions
The item# argument must be a valid entry-item index (between 0 and
Item_Count-1), or the sentinel value CURRENT.
Exceptions
If the specified item# uses the AUTOFIND option, an entry_autofind
is performed.
Notes
This function is used to force execution of an item's validate-msg.
IntegerFindreq_Auto_Prompt(Integer Itm#)
03/17/95 - Fixed bug where datafile was not for Itm#.
Fixed logic to better handle autofind (where a record exists
but it was not auto-found.
integerItem_Entry(integer msg# integer item#)
Description
This function invokes the message given by msg#, passing the
specified item# as the only argument to the message. The value
returned by execution of the message is returned; non-zero means
that entry to the specified item# should be denied.
Assumptions/Preconditions
The msg# argument must be either a valid message id or 0. The item#
argument must be a valid entry-item index (between 0 and Item_Count-1).
Exceptions
If the specified msg# is 0, no action is taken.
Notes
This function is invoked by the Item_Change procedure, among others.
integerItem_Exit(integer msg# integer item#)
Description
This function invokes the message given by msg#, passing the
specified item# as the only argument to the message. The value
returned by execution of the message is returned; non-zero means
that exit from the specified item# should be denied.
Assumptions/Preconditions
The msg# argument must be either a valid message id or 0. The item#
argument must be a valid entry-item index (between 0 and Item_Count-1).
Exceptions
If the specified msg# is 0, no action is taken.
Notes
This function is invoked by the Item_Change procedure, among others.
integerItem_Validate(integer msg# integer item#)
Description
This function invokes the message given by msg#, passing the
specified item# as the only argument to the message. The value
returned by execution of the message is returned; non-zero means
that the data entered in the specified item# is invalid, and that
the cursor should stay on the specified item#.
Assumptions/Preconditions
The msg# argument must be either a valid message id or 0. The item#
argument must be a valid entry-item index (between 0 and Item_Count-1).
Exceptions
If the specified msg# is 0, no action is taken.
Notes
This function is invoked by the Item_Change procedure, among others.
Prompt()
Description
This procedure activates the prompt-objct, if any, for the current
entry-item.
Assumptions/Preconditions
This object (or one of its ancestor classes) implements a
prompt_object function to return a valid object id (for a
user-interface object understanding the PopUp message), or 0.
Exceptions
If the prompt-object is 0, no action is taken.
Notes
None.
Integerrequired_Auto_Prompt(Integer Itm#)
useful validate function. If you set iValidate to this message
you'll get an error when you attempt save and a prompt when
you attempt to move.
IntegerTest_for_Auto_prompt(Integer Itm#)
Function: Test_for_Auto_Prompt
Test if an auto-prompt should be executed. This is only called
by the entry function. It should Return TRUE if an autoprompt is
required. This checks to see if the item is blank.
This was designed for augmentation.
Zoom()
Description
This procedure activates the zoom-objct, if any, for the current
entry-item.
Assumptions/Preconditions
This object (or one of its ancestor classes) implements a
zoom_object function to return a valid object id (for a
user-interface object understanding the PopUp message), or 0.
Exceptions
If the zoom-object is 0, no action is taken.
Notes
None.