I'm playing around with listboxes and subforms. The scenario is reasonably
simple:
I have a table of [PEOPLE] which I display in a dialog. The parent form On
Load loads them into Form:

Form.people:=ds.PEOPLE.all().orderBy("Name asc")


Parent form contains:

1) a listbox with datasource=Form.people

The listbox data Data Source property for the current selection is
Form.Person (the selected entity).

A column of the listbox displays the Name for each person using This.Name.


2) a subform designed to show the details of the selected person. The
subform is an object and its datasource=Form.Person
The subform is where the record data are edited.


Everything works as expected - clicking the listbox sets the selected
entity which immediately appears in the subform. After changes are made in
the subform

$status:=Form.save()

is called and updates the record (because 'Form' in the context of the
subform is selected entity from the listbox).

The thing that's not working is the Name column of the listbox - it doesn't
change even though the entity it is based on does change. And if I click
around on the listbox and come back to the edited record the changes appear
(in the subform) but the value in the listbox doesn't.

I tried reloading Form.people but that doesn't do it. In all the examples
I've seen and played with these things just update like magic. I suspect
this has something to do with starting with the ds but I can't figure out
what i'm doing/not doing in this case.
-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to