Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Two Way Communications via 4D_Tech
Thx Keisuke.

I am still getting to grips with the whole new paradigm that is objects, 
collections and ORDA.
The amount of information is elaborate, and often in different places.

So insights like this are really helpful.

Good thing we have the NUG ;-)

BTW, collections and ORDA are so cool! 


Rudy Mortier
Two Way Communications bvba 



> On 1 Aug 2018, at 22:44, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> that's right, you have to "touch" the data source object to signal that it is 
> dirty and has to be redrawn.
> 
> so, even though
> 
> col.push()
> 
> adds an element to the collection,
> in this context (listbox on form),
> you have to assign the variable to itself:
> 
> col:=col.push()
> 
> 2018/08/02 5:24、Christian Sakowski via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> Form.cColl:=Form.cColl
> 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Keisuke Miyako via 4D_Tech
that's right, you have to "touch" the data source object to signal that it is 
dirty and has to be redrawn.

so, even though

col.push()

adds an element to the collection,
in this context (listbox on form),
you have to assign the variable to itself:

col:=col.push()

2018/08/02 5:24、Christian Sakowski via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Form.cColl:=Form.cColl



**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Christian Sakowski via 4D_Tech
You have to assign the collection to itself:

Form.cColl:=Form.cColl

Then the Listbox will be updated.
--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
iChat/AIM: SakowskiF
Tel: +49/(0)40/52 10 59-23



> Am 01.08.2018 um 22:19 schrieb Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com>:
> 
> I guess I must be overlooking the obvious here …
> I searched the documentation, the NUG, the Blog but could not find an answer, 
> so maybe somebody can help me out.
> 
> I have a collection that is being displayed inside a listbox. So far so good. 
> No issues. I can select the rows and I can edit the cell contents.
> 
> Now, I want to add a row, and enter values.
> 
> Here’s where it goes wrong. I cannot get the row to display, let alone edit 
> it.
> 
> Since ‘LISTBOX INSERT ROWS’ only works with arrays, I tried cColl.push, which 
> actually adds an element to the collection (I verified in the debugger)
> But the row is not added to the listbox, no matter what I try (i.e. 
> REDRAW(Listbox))
> 
> The next challenge will be to delete an element …
> 
> Has anybody done this successfully?
> 
> 
> Rudy Mortier
> Two Way Communications bvba 
> 
> 
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
 
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**