Class: Selection_List_DS_mixin
Class Hierarchy:
cObjectMixinSelection_List_DS_mixinMixins:
Auto_Locate_Mixin, LIST_Mixin,
Class Definition
Properties
IntegerAuto_Column_State
IntegerAuto_Export_State
02/08/96 -JJT Added
IntegerDisplay_Buffer_msg
message id to send during move_value_out
IntegerExport_Column
Column to export (if export_item_state) -1=use initial column
IntegerFind_Search_State
IntegerLoad_Buffer_msg
RowIdOriginal_RowId
IntegerPrivate.Auto_Server_State
IntegerRelational_State
maintained by system
IntegerSeed_List_State
Integerstored_Auto_Column_State
Integerstored_Auto_Export_State
Integerstored_Auto_Index_State
Integerstored_auto_Server_State
Integerstored_deferred_State
Integerstored_Display_Buffer_msg
Integerstored_Export_Column
Integerstored_Export_Item_State
Integerstored_Initial_Column
Integerstored_Load_buffer_msg
Integerstored_Ordering
Booleanstored_pbReverseOrdering
Booleanstored_pbUseServerOrdering
Integerstored_Seed_List_State
Integerstored_Server
These are used to store the default properties. These are
stored when the object is activated and restored when it is
deactivated (if move_value_out_state is true).
Functions and Procedures
integerActivate()
Activating()
Augment activating to do all kinds of goodies
1. if Auto_locate_state .... locate the object
2. if Auto_Column_State .... find best column for this object
3. if selected column has an MSG_Auto_Reorder_List on its iEntry
make sure we are using that index
4. if seed_list_state, seed the lookup list
as of 15.1 we changed all deactivating/activating signatures to not return values (see windows.pkg / ComboForm / Activating for more)
Returns Integer
IntegerAdd_Focus(Handle hoParent)
BooleanAuto_Save_State()
This message is required by other deos. Always respond: NO
returns: Nope
IntegerAuto_Server_State()
integerCancel()
modified 9/18/97 - clean up this logic.
Construct_Object(integer img)
Deactivating()
Augmented to support auto_server state
if auto_server set the server back to 0. At this point server.pkg
has already removed this deo from the interface. Note there is a bug
in server.pkg. If you change the server w/ set server the old
server is not removed because remove_deo_from_Server is called after
the server id is set to 0. (oops). This isn't impacted because the
server has already been removed here.
as of 15.1 we changed all deactivating/activating signatures to not return values (see windows.pkg / ComboForm / Activating for more)
Returns Integer
display_row(integer iRow)
empty_list()
created to empty oSelectedRowIdsSet array along with list item data
End_Construct_Object()
integerEntering()
Entry_Display(Integer f1 integer f2)
New procedure to handle radio items properly
Entry_Find(integer mode)
Manually code entry-find. This corrects a bug in entry_class. This is
only called by serverless searches (request_find).
Entry_Update(integer mfile# integer flag)
Export_Item(Integer Item# Integer Rec#)
New message pass column 0 item to export. Use export_column property to
determine what value to export.
Note that we pass item# and Rec#. We don't use record number. We pass this
because it might be useful if this message is augmented.
Find_or_Ok()
If the property Find_Search_state is True (which is the default) the
alternate search method is used. If it is false (you must set this),
the old style incremental search is used.
The new style works as follows: (user presses <enter> )
Send message Find_Or_OK
Find_or_Ok checks to see if the item was changed (if it was
we are doing a lookup, if not we have made a selection).
If no Changes Send OK
Else Send Request_Lookup passing current_item
Request_Lookup sends Request_Find
Note that the kEnter is now inconsistant in that it performs two
behaviors (find or OK). While this is inconsistant it is totally
intruitive (user's never notice the inconsistancy ... it does what
they want it to do.
Procedure Find_or_Ok - sent by kEnter key.
If the item is changed we are doing a search (do request_lookup)
else (no change) we have selected and are returning a value
IntegerFirst_Selected_Item()
as of 11.0, use first_selected_item and next_selected_item only for batch tables and use
FirstSelectedRowId and NextSelectedRowId for non-batch tables
If your table supports recnum, the first/next_selected_item can still be used but it is discouraged
RowIdFirstSelectedRowId()
Flag_Items()
Key(integer keyval)
created to support FIRST_CHARACTER searching
integerlast_panel_item()
created for Bottom_of_Panel support
Latch_Auto_server()
Augmented to support auto_server state
Note that this will only work properly with single object selection
lists. Don't try this if you've got child DEO objects within this.
Also, it is critical that this hook-up occurs when it does (before
the object is active - active_state=F).
06/02/94 - changed to support both activate and Add_focus. Note that
both add_focus and Activate must be used since active_state
is set by Activate when the list has no client and is set by
add_focus when the list is in a client. We should look for a
cleaner way to do this.
called by Activate and add_focus
Move_Value_Out()
Move_value_out has been augmented to allow for more independance
between the data_set and its invoking object. Here is the new logic:
if export_item_state
Do normal export item behavior (forward send the message)
else // not export_item_state .. a normal update
Find selected record as needed
Find out who prompted us (invoking_object)
Find the data_set of the invoking object
If data_set exists (it should) notify data_set about the record
If a display_buffer_MSG exists send this message to the invoking
object. (This allows the invoking object to do custom updating).
better export value out support
Invoking_object_id checked sooner.
New_Entry_Set()
Augment datalist to make sure that the correct item is selected if
the select mode is auto_select
integerNext_Selected_Item(Integer ClFg)
Added parameter Clear_Fg. If true unset the selected item.
Returns: If batch - next selected Item (column 0)
if not batch - next selected record #
-1 if no more items
Should be used for finding the next batch item.
For backwards compatibility this will work with recnum tables to return recnum
IntegerNext_Selection()
use new function (maintained for compatability sake)
returns -1 if no selections
RowIdNextSelectedRowId(Integer bClear)
used to get and find the next row Id. Returns rowId and the recortd loaded in the buffer (not the dd)
Request_Find(integer mode integer entUpdtFlag)
This is pretty much standard request_Find behavior. This acts pretty
the same as pressing F9 in a table. Load buffer with screen values
and find the record by the main_index for the current field. Pretty
much "lifted" from the table class.
05/02/97 JJT - modified to properly superfind when the field is a
parent file.
Request_Lookup(Integer Item#)
Procedure Request_Lookup (public)
lookup and redisplay. Standard behavior is to just do a find. This
is very useful for overriding and doing it yourself. The passed Item#
is useful when doing an override.
Restore_Defaults()
Seed_List()
This seeds a selection_list by performing an entry_update from the
invoking object strucuture and then finding the record we need.
04/05/94 - add support for seeding of export_item lists
IntegerSelect_Best_Column(Integer FileNum Integer FieldNum)
Select_Best_Column
Pass: the file and field of the invoking object's item.
Return: The best column for this field or -1 if none are good
integerSelect_Count()
Select_Toggling(integer Itm Integer State)
New Augmentation. We don't want select_toggling to set item_changed
_state to TRUE if we are using find_Search_state.
Set(Integer iState)
when auto_server_state is set deferred_state must also be set. Normally
the list should be deferred when auto-server so the invoking object
does not change each time you change a record in the list. When
auto-server is false the list does not need to be deferred. If one
needs to change this behavior they will have the set deferred_State
manually AFTER they have set auto-server.
set(integer newval)
Set(integer item# integer newState)
Store_Defaults()
Store_defaults stores the most commonly changed dblist properties when
the object is activated. Restore_defaults restores them when it is
deactivated. This only occurs with popup lists (move_value_out_State=t).
Store and Restore_defaults should be mirrors of each other. This can be
augmented if the developer needs to store other properties.
This allows a developer to make custom changes in the invoking object
in the callback procedure prompt_callback. The developer can change any
of the common properties and they will get restored autoamtically by the
dblist when it is deactivated.
Toggle_Select()