Construct_Object(integer img)
New Properties:
Allow_Top_Add_State Dflt:False If true then you may cursor up
to the top of the list and an empty
space will open up
Allow_Bottom_Add_State Dflt: TRUE If true then you may cursor down
to the end of the list and an empty
space will open up
Allow_Insert_Add_State Dflt: TRUE If true then you may insert a new
row at the current position.
No_Create_State Dflt: False If True you can not add any new row (it
overrides the above three states).
No_Delete_State Dflt: False If True deletes are disabled in table
Read_Only_State Dflt: False If true no edits, adds, or deletes
are allowed.
Auto_Refresh_State Dflt:True If true the the table updates itself
after a save with the exception of
being in add mode.. It will rebuild
after you exit add mode. If False it
will not rebuild until screen is
refreshed
Needs_Refresh_State Dflt:False Maintained by system. If true than
a save might have changed the table
order.
- Integer
Create_Cbox_Object()
Create the cbox object. This only gets created if required.
We create this in the class and not the mixin because you seem to
get odd results if objects are created in mixin procedures
returns ID of object
- Integer
Obj - CBox : CBox_array
keep track of list of
Clear()
clear inserts a new line and goes to that line
03/06/95 JJT - adjust so a clear returns to the first enterable
item and not the first column.
- Integer
oldDynUpdt - Integer
base - Integer
oldChg - Integer
iRet
Request_Clear()
public
- Integer
rval
- integer
validate_range(integer from# integer to#)
internal
- Integer
count - Integer
retval - Integer
oldcuritem
- Integer
Allow_Row_Change()
Internal
Function: Allow_row_Change - Rets 0 if ok to change
We want to change row...See if it is allowed. it is allowed if:
1. There is no change - no problem
2. If changes and auto_save - attempt to make the save
3. If changes and not auto_save - verify_data Loss
- Integer
RetVal
Remove_Row(Integer CurRow)
internal:
Remove row. Add another line in the table to replace the missing
row. Make sure the current record remains active
03/06/95 JJT - make sure we stay in the same column when we remove
the last row in a table
- Integer
rowCount - Integer
CurItem - Integer
notAtEnd - RowId
riRec - Integer
eRecordStatus
- integer
FirstEnterableColumn()
private. Figure out what the first enterable column is likely to be. We use
this to figure out if an exit message will need to get sent
- Integer
hProto - Integer
iCol - Integer
bShadow
add_or_Remove_row()
internal
Add_or_Remove_row: This is the table clearing handler. If:
A. New row / Unchanged: Delete empty row if this is not the
only row.
B. old row / unchanged: If Allow_Insert_Add_State and not
no_create_state, insert new row and enter.
C. New row / changed: Verify_loss and create emtpy row. Goto 1st
enterable column.
D. old row / changed: Verify_loss and insert row.
(was: restore to what was)
03/06/95 JJT Altered logic. Case A: If row is new and unchanged
and there is only 1 row do nothing.
Case C: Goto first enterable column (not col 0)
- Integer
dynUpdt - Integer
Changed - Integer
iCur - Integer
iRet - RowId
riCurRec
- integer
Clear_a_row()
internal
Clear_a_row: This is the table clearing handler. If:
A. New row / Unchanged: Delete empty row (should it be ignore?)_
Only do this, if this is not the only row.
B. old row / unchanged: ignore
C. New row / changed: verify_loss and create emtpy row, goto 1st
enterable column
D. old row / changed: verify_loss and restore to what was
03/06/95 JJT Altered logic. Case A: If row is new and unchanged
and there is only 1 row do nothing.
Case C: Goto first enterable column (not col 0)
- Integer
dynUpdt - Integer
Changed - Integer
rVal - Integer
iCur - RowId
riCurRec
Add_New_Row(Integer iLoc)
public message: Add_new_row
Pass: loc as: -1=top, 0=current row, 1=bottom
- Integer
iOpt - Integer
iCur - Integer
iCount
Child_Wrapping(integer direction integer xorigID)
Internal
procedure Child_Wrapping integer direction
integer base targetItem
send activate
get base_item to base
if direction ne 0 begin
Move (base + item_limit(self)) to targetItem
if targetItem ge (item_count(self)) send add_row
end
else begin
Move (base - 1) to targetItem
if targetItem lt 0 move 0 to targetItem
end
set current_item to targetItem
procedure_return 1
end_procedure
- Integer
targetItem - Integer
origID
Request_Delete()
public
Sun 07-05-1992 Added send Append_Blank_Row to leave an blank line
03/06/95 - Move to first enterable item if a blank-row is added.
- Integer
obj# - Integer
dynUpdt
Request_Save()
public
- Integer
curItem - Integer
retval
Request_Save_No_Clear()
this allows us to save a record without it clearing regardless of
the Auto_Clear_DEO_State value
- Integer
oldclr
- integer
Row_Changing(integer from# integer to#)
internal
Function: Row Changing
New row / Unchanged: Delete empty row..then move
old row / unchanged: Move
Auto_Save -New row / changed: Save then move
Auto_Save -old row / changed: Save then move
~Auto_Save -New row / changed: Verify data loss / empty / move
~Auto_Save -old row / changed: Verify data loss / restore /move
10/04/94 -JJT changed to make add mode items insert new rows
instead of overwriting
- Integer
retval - Integer
lim - Integer
toRow - Integer
fromRow - Integer
rowcount - Integer
dynUpdt - Integer
wasNew - Integer
ROS - Integer
NCS - Integer
bToMoved - Integer
iOldCurrentItem - Integer
iOldTo - Integer
eRowStatus - RowId
riRec
Beginning_of_Data()
public
End_of_Data()
public
Scroll(Integer eDirection Integer iNumLines)
public
- Integer
dynUpdt
- Integer
Load_Page(Integer Row#)
Augment to unset the UnSorted_State Flag
- Integer
Retval
Mouse_Down(Integer iWindowNumber Integer iPosition)
Private:
Control Mouse down so that it will move into an empty
row just like down arrow does. Also if pressed anyhwere at the
bottom of an empty then move to the last valid row.
- Integer
rCount - Integer
Row#
Request_Clear_All()
-------------------------------------------------------------------
messages requiring server services
------------------------------------------------------------------
public
- Integer
srvr# - Integer
retval - Integer
foc
Entry_Autofind(integer eFindMode integer iItem)
Support passing of optinal Item to autofind on. If not passed the
runtine will figure it out. Always pass the autofind-item. The runtime
also calls this not passing an item but it figure it out.
- Integer
srvr# - Integer
file# - Integer
datafile# - Integer
field# - Integer
oldDisp - Integer
oldChg - Integer
item#
Request_Find(integer mode integer entUpdtFlag)
public
FindEdit support behavior
- Integer
dataFile - Integer
ser# - Integer
mainfile# - Integer
dfrdState
Request_Superfind(integer mode)
public
FindEdit support behavior
- Integer
obj# - Integer
file# - Integer
mainfile#
Row_Delete()
internal
- Integer
Srvr#
- integer
Row_save()
This isbeing marked public because it is the one message that is always sent when a row in a grid is saved
All other DEOs can use request_save for both sending and augmentation to catch a save. Here we need to
send request_save but augment row_save (which i scalled by request_save and others).
- Integer
hoServer - Integer
iErr - Integer
iRetVal - Integer
iMainFile - Boolean
bInRowSave
Save_row()
internal
This exists to maintain compatability with the DAC table
interface (people might have augmented this). Note: It is better
to augment the row_save function because it returns a status value
- Integer
hoDD - Integer
iRec - Integer
iMain - RowId
riNewRec
- Integer
Row_Changed()
internal
- Integer
Srvr# - Integer
ch
- Integer
Should_Save()
added 07-24-1992 - could replace row_changed
- Integer
Child_Entering()
Child_Entering and Child_Exiting are only called when Child_Table_State is
true. When a table is nested inside another DEO (a header / table
condition) you have different needs.
Function Child_Entering
By default this does nothing. If you return a non-zero value the table
will not be entered. Very useful. You will often use this to make sure
that 1) it is valid to enter the table and 2) that the header is
saved before entering the table.
- Integer
Child_Exiting(Integer toObj#)
Function Child_Exiting
You can stop the exiting by returning a non-zero value. By default this
save the current record. If the save fails the exiting is stopped. Note
that the object ID you are entering is passed. This can be useful to
know. If you are exiting to a form or editor that is part of the table
(often a child of the table object) you may not want to save the table
line. If the object you are entering is part of the header, you would
probably want to save the table. Note that the default errs on the side
of caution (it always saves the table).
- Integer
ret_val - Boolean
bInRowSave
Entering()
Entering is augmented to call Child_Entering if Child_Table_State=T
- Integer
ret_val - Integer
bChanged - Boolean
bHasRecord
- Integer
Exiting(Handle hoDestination)
Exiting is augmented to call Child_Exiting if Child_Table_State=T
- Integer
ret_val
End_Construct_Object()
fix for RT bug in dependent_items that causes invalid item number
error if items don't exist when update_dependent_items occurs.
Refresh(integer notifyMode)
05/16/95 -Augment so that refreshes that are part of a save sets the sorted
state to false. This probably belongs in data_list but this would require
moving all of the unsorted_state logic into that class. Not for now.
Reorder_List(Integer iNewCol)
disallow if row cannot be changed or it the record is new
- RowId
riId
DoSetOrderingDirection(integer bReverse)
disallow if row cannot be changed or it the record is new
but still set the new ordering
- RowId
riId