Chip is correct. "Save" is not always needed. In the listboxes I was thinking about, the records were being unloaded or reloaded during the editing process, so saving immediately was required. I just added "Read Write" to a form that contained a listbox used to display records. Edited fields saved without any save command.
Keith - CDI > On Sep 30, 2016, at 9:16 AM, Chip Scheide <[email protected]> wrote: > > v13 - I do not do that. I.E. issue save record after a change of data. > to edit an item in a listbox I use the following code to access the > record - this may be different then what you are doing. > > Code: > //lstbox_Enter_Data_Directly > //$1 - longint - column into which to allow (first) entry > > // ∙ Created 5/19/16 by Chip - > C_LONGINT($1;$Entry_Column;$Selected_Line) > C_TEXT($Column_Name_to_Edit) > > $Entry_Column:=$1 > > $Selected_Line:=utl_listbox_Get_Selected_Line (ptr_Incld_Form_LB) > $Column_Name_to_Edit:=lstbox_Column_Name > (ptr_Incld_Form_LB;$Entry_Column) > EDIT ITEM(*;$Column_Name_to_Edit;$Selected_Line) > //End lstbox_Enter_Data_Directly > > > applicable lines of code from utl_listbox_Get_Selected_Line: > RESOLVE POINTER($Listbox_ptr;$Listbox_Name;$Table_Number;$Junk) > LISTBOX GET TABLE SOURCE($Listbox_ptr->;$Table_Number;$Named_Selection) > ... > $Table_ptr:=Table($Table_Number) > $Current:=Selected record number($Table_ptr->) > $0:=$Current > > > > On Fri, 30 Sep 2016 11:13:42 +1300, Keith Goebel wrote: >> Hi all. >> Using 4D v15.2 on Win, I have a selection based listbox where some of >> the fields are enterable. >> The only way I have found (so far) to save the entered changes is to >> trap the On Data Change event in the listbox method and call Save >> Record. >> >> Do we all have to add code like that to enterable listbox columns or >> is there a setting I've missed that causes the entered values to be >> automatically saved like they are with included forms? >> TIA, Keith >> ********************************************************************** >> 4D Internet Users Group (4D iNUG) >> FAQ: http://lists.4d.com/faqnug.html >> Archive: http://lists.4d.com/archives.html >> Options: http://lists.4d.com/mailman/options/4d_tech >> Unsub: mailto:[email protected] >> ********************************************************************** > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

