Class: Data_List_mixin
Class Hierarchy:
cObjectMixinData_List_mixinClass Definition
Properties
IntegerAuto_Index_State
IntegerBatch_State
integerChanging_State
internal
IntegerDisable_No_refresh_State
This disables no_refresh_state. This property is internal and
will probably go away (along the no_refresh_state)
don't mess with this
IntegerFind_Mode
internal non-ds
IntegerInit_From_Top_State
integerInitial_Column
dflt refresh col
integerInitial_Row
dflt refresh row
IntegerItem_Index_state
internal
integerLine_Display_State
internal
IntegerNo_refresh_State
internal.optimizer
IntegerNo_Relate_State
optimizer. Non_DS only
integerpbPrivateOrdering
index order - private.. use ordering
booleanpbReverseOrdering
This is the current index direction. If true, index is reversed
BooleanpbUseServerOrdering
If True, the DDO server is use if the DDO exists and it specifies an ordering. You usually set the
DDO ordering when you have constraints and you always want the optimal index. In such a case
it makes sense that the dbList or dbGrid should use this optimal index.
This is set false for historical reasons. True is actually a better setting.
integerpiLastDisplayableRows
integerprivate.Main_File
IntegerRead_Only_State
IntegerStatic_State
Functions and Procedures
Activating()
internal
as of 15.1 we changed all deactivating/activating signatures to not return values (see windows.pkg / ComboForm / Activating for more)
Returns Integer
Add_Row()
add row at end of item list
integerAdd_Rows(integer direction Integer NumRows)
Add_Rows: Load records into table
very internal
Pass: Direction and number of rows to add (to top or bottom).
Current top or bottom record must be in buffer.
Returns: number of rows actually added.
AdjustGridRows(integer iOldMaxRows)
Adjust a current grid. This is called when the maximum number of rows changes in
a non batch grid. Rather than just doing a display to refresh the grid we add and
single rows as needed without changing the current row's data. This way you can resize
dbGrids with changed data without losing that data.
append_blank_row()
add blank row at end of item list
append_new_row()
add row at end of item list & display
Auto_Reorder_List(integer item#)
This should only get called by an iEntry procedure
Beg_End_Data(Integer Direction Integer NoSave)
Internal:
Fill from top or bottom of the table based on dir
If the table is empty then we will use the Initial_Column as our column.
If the table has lines. we use the current column position.
Beginning_of_Data(Integer NoSave)
Beginning_of_Panel()
Clear()
created for Server support
notification of clear-record
Clear_All()
created for Server support
notification of clear-set
Clear_Current_Record()
Replaced with proc below 03/27/95
procedure Clear_Current_Record
integer ser# //oldchg
get Server to ser#
//
// NOTE: Clear may cause problems with other tables on the same data_Set
//
If Ser# ne 0 Send Clear to ser#
else Send vClear (Main_File(self))
end_procedure
alternate better method for clearing file. If deferred or main-file
is not the same as the server then only the buffer should clear.
clear_row(integer row#)
invoked by append_blank_row and insert_blank_row
Clear_Set()
created for Server support
notification of derived clear
IntegerCol_Index(Integer Item#)
Function Col_Index public
return the best Index for this column or -1 if no choice is good
This is useful for override and augmentation. When the Auto_Reorder_List
message is invoked as part of iEntry this gets called. If we override it
we can do some custom selections for a choice of index.
Construct_Object(integer img)
integerCurrent_Record()
this can only be used with recnum tables. You are better off using
Get CurrentRowId (to get the real rowId) or Get CurrentRowHasRecord (to see if you have a record)
BooleanCurrentRowHasRecord()
returns true if current row has a RowId
RowIdCurrentRowId()
Delete_Data()
Delete_row(integer row#)
remove given row#
Display()
use of lineDisplayState is required because the list sends its Server
msgs Clear and Find when it only wants to affect the current row
display_Line()
Display_Other_UI()
--------------------------------------------------------------------
All record finding handled by these routines
--------------------------------------------------------------------
Procedure Display_UI
Procedure Display_Other_UI
Procedure Read_by_Recnum record
Procedure Establish_Find_Mode find_mode
Procedure Read_Next_Record
Procedure Find_Init Direction
Procedure Clear_Current_Record
Function File_record Returns Record
display other UI objects. If server only do this if the
deferred_state to false (also do a request assign).
if no server this is idea for override
JJT- Modify to never set no_refresh_state to true.
This was an optimzation that never should have
happened. By disabling this, display_other_ui acts exactly like
display_ui. So, this message might go away in the future.
display_row(integer row#)
note also sets base_Item and record_rowId
Display_UI()
display all UI objects. If server only do this if the
deferred_state to false (also do a request assign).
if no server just do the one object
- JJT Don't send request_assign if already assigned
- JJT Pass main_file with request_assign
DoCheckDisplayableRows()
This is called in VDF when GuiSize changes. It is not called anywhere in character mode, but
it could be and it will work
If the number of displayable rows changes we need to refresh non-batch
list by sending display. This is called by set GuiSize and could be called
by other methods that affect the number of rows in a grid.
DoSetOrderingDirection(integer bReverse)
messages added to support reversing index ordering
DoToggleColumnOrdering(integer iCol)
Good for augmentation.
Down_Row()
empty_list()
created to empty list item data (aug'd by SelList)
End_of_Data(Integer NoSave)
End_of_Panel()
Establish_Find_Mode(Integer eFindMode)
Establish finding direction
Pass: Mode
IntegerFile_Record()
If you try this with a non-recnum table you will get a runtime error
IntegerFileRecord()
RowIdFileRowId()
Function: FileRowId
Returns: The record number of the record currently in the buffer
Return FOUND if record is active
Fill_List()
IntegerFill_next_row(Integer Row#)
Function: Fill_next_Row
Pass: Row# - The record for this row MUST be rsNewAtBottom or rsNewAtTop
-1 = find down, -2 = find up.
Return: 1 if found. if rsNewAtBottom or rsNewAtTop it is not found
New record and related in buffer
Fill_Page(integer Row# integer Col#)
Internal
Fill list around Row# Col# based on the current active record buffer
Find_Current_Buffer()
Find_Current_Buffer: Public Message
find record that matches the record buffer, Current record should
be inactive --- Forces load buffer record..does not notify others.
Find_Init(Integer Dir)
Find_Record(Integer rec#)
Refind & relate the record in rec# by Main_file.
If you try this with a non-recnum table you will get a runtime error
Find_RowId(RowId riRec)
Refind & relate the record in rec# by Main_file
integerFindMode(integer mode)
This handles translation of find modes to make reverse ordering
work. Pass the mode and return the mode, translated if reverse ordering is needed
Goto_Bottom_Row()
Goto_Top_Row()
Added to make this work like the old 3.01 data_list
Initialize_List()
Internal: for override
insert_blank_row(integer row#)
Insert_new_row(integer row#)
insert & display row before specified row#
Insert_Row(integer row#)
insert row before specified row#
integerisAutoFillFind()
private implementation: created post 8.2-JJT
Called by refresh (which is called by DDs) The purpose is to return true if the refresh is part
of a parent/child constrained autofill. When autofill is called the grid or dblist needs to refresh
based around an initial row and column (e.g. filling an order entry detail table). When not autofill
the refresh should be based around the current row and column (e.g. filling a dblist). The method for
determining if this is a DD based autofill is imperfect and might be changed in future revisions.
booleanIsRecnumTable(integer iFile)
integerItem_Change(Integer iFromItem Integer iToItem)
integerItem_Matching(string sSearch integer iItem)
This was changed in 8.1 to better handle incremental searches with non-bacth lists.
IntegerLoad_Page(Integer Row#)
Load_Page: Load page starting at row#.
Internal
Pass: Row# to load from. MUST have starting record in buffer
Returns: The records new row (in case it got adjusted).
Will relocate if the top is not filled.
Note that the record is not in the buffer any more.
INTEGERMain_File()
Move_to_Column(Integer Col#)
Public:
Move to the selected column...
New_Entry_Set()
OnNewOrdering(integer iOrdering)
integerOrdering()
Augmented to return the DDOs server if the DDO
should provide this information.
integerPrototype_Object()
added for dependent-items support
Read_By_Recnum(integer rec#)
Read_By_Recnum:
Pass: Rec# find from server or from direct file.
Returns: FOUND if record found and records in buffer & related
If you try this with a non-recnum table you will get a runtime error
Read_Next_Record()
Read_Next_Record
Return: FOUND, and record in and related
Read_record(integer Rec#)
Create this message because the old 3.01 data-list did it this
way. (Avoid this if possible - use Read_by_recnum. This might
go away).
If you try this with a non-recnum table you will get a runtime error
ReadByRowId(RowId riRec)
integerRecord_Number(integer row#)
this can only be used with recnum tables. You are better off using
Get record_rowId (to get the real rowId) or Get RecordStatus (to check top or bottom) or RowHasRecord
RowIdRecord_RowId(integer row#)
integerRecordStatus(integer row#)
Refresh(integer notifyMode)
-------------------------------------------------------------------
Refresh_Page(integer Row# integer Col#)
Public:
refresh page will refresh the screen both up and down. Based on
the contents of the active record buffer.
This allows for proper multi-user refreshes
Reorder_list(Integer iNewCol)
Public: Reorder_list
Assign Index and refresh screen based.
Parameter: iNewCol is optional, if not passed use current column
If bacth or if the DDO controls the ordering, nothing happens
Request_New_Index(Integer iIndex)
Set index to idex number iIndex and refresh.
integerRow_Changing(integer from# integer to#)
Assume the From# comes pre-loaded with its current record
return with current record for the returned item (to#)
BooleanRowHasRecord(integer iRow)
Scan_Servers()
Scroll(integer dir integer dist)
BooleanServerOrderingOverride()
This returns true if the ordering should come from the DDO. This only
happens if the pbUseServerOrdering is T and there is a server with an
ordering property. If T, the ordering property will return the DDOs ordering.
Important: If DDO has no Ordering (it usually does not), this returns false indicating
that the ordering for the list is provided by the list
set(integer newval)
Set(Integer row# RowID riNewval)
NOTE: Although Set record_rowId, Set RecordStatus, Set CurrentRowId and Set CurrentRecordStatus are all public
they should be used *very* carefully. A row is defined by its RowId and it's status. If you chnange one
your probably want to change both. RecordStatus also is overloaded for historical purposes. If the table is
is a recnum table it contains a recnum or a 0, top or bottom. If rowId it contains 1 or 0, top bottom.
If you mess with these methods you must handle this properly. Look at procedure display_row to see how this is done.
In general, you should never need to use these set messages. They are very low level and make it easy to break things.
set(integer row# integer newval)
SET(RowId NewVal)
SET(integer iNewVal)
set(integer iIndex)
Set is augmented to send OnNewOrdering when order changes. Can
be used to change the pbReverseOrdering property on a column by
column basis (by default this does nothing)
If the DDO determines the server, the set is canceled
set(integer row# integer newval)
================================compatibility methods================
Set record_number/Current_record will generate errors because you should not set these
without setting the RowId array. If you are calling this you need to make code changes.
SET(integer newVal)
Trim_Page()
force to fit within visible table
Up_Row()
vClear(integer File#)
vFind_Init(Integer File# Integer ordr# Integer Dir)
------- Various direct file commands. Called when no server ----
vFind_Rec(Integer File# Integer Ordr# Integer Mode)
integerVirtual_Scroll(Integer Direction Integer Dist)
private: only used by non-batch lists
vRead_rec(integer file# integer rec#)
If you try this with a non-recnum table you will get a runtime error
vReadRowId(integer iFile RowId riRec)
vRelate(integer File#)