Chris,
Working with collection or entity selection based listboxes is easier for
me when I think of the listbox as simply 'showing' or 'displaying' the
underlying data. From this perspective when I add something to that
underlying data the listbox updates itself because that's all it's doing -
showing the data.

Old school listboxes, in contrast, were objects that did the modifying of
the underlying data. So I had to change the listbox to change that data.
See how it's sort of flipped?

In the example you mention you probably have a button or something to
initiate adding a new line. That's where the new data object (whether it's
a record or an object in the collection) get's created. The listbox will
change to show it.

I've been using 17r6 which is pretty darn good with this stuff. In some
earlier versions if you changed the data outside of the listbox object
itself, I think, and you were using Form you had to set the collection to
itself to update the listbox. So if I had Form.myCollection displayed in a
listbox and it was updated by some other action I would want to be sure to
call

Form.myCollection:=Form.myCollection

Like I say this has been fixed but I don't remember where.

On Mon, Aug 26, 2019 at 5:31 PM Chris Belanger via 4D_Tech <
[email protected]> wrote:

> I am using ORDA-based programming exclusively now; not using ‘classic’
> methodology.
> I am wondering what you are doing about creating ‘new’ entities within a
> listBox (related to some master record).
>
> For example, classic scenario:
> INVOICE - invoice table
> INVDETAIL - invoice detail lines table
> Invoice opened; INVDETAIL displayed in a listBox.
>
> User needs to add invoice lines; BUT an ‘ADD BUTTON’ is clumsy, and still
> could result in erroneously-created BLANK entities in the INVDETAIL file.
>
> Using a COLLECTION-based listBox makes it easy to let them do whatever
> (can create ‘blank’ entries in the collection so they can naturally enter
> within the listBox) and then ’save’ these lines to InvDetail when they save
> the invoice.
> But that means managing the underlying InvDetail records.
>
> So is there a better way? Do Transactions work with ORDA?
>
> Thanks for any input.
>
> — Chris
> **********************************************************************
> 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]
> **********************************************************************



-- 
Kirk Brooks
San Francisco, CA
=======================

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**********************************************************************
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