Re: v17R5 bug?

2019-07-29 Thread Jeremy Roussak via 4D_Tech
Miyako,

I’ll reply to Kirk’s long (and helpful) post with some more detail. There’s 
more than one way to skin a cat, I agree: but 4D shouldn’t crash if I ask it to 
search for a pointer, surely.

Jeremy

> On 29 Jul 2019, at 01:43, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> why not use a key value pair instead of a flat collection of pointers?
> 
>> 2019/07/29 2:16、John DeSoi via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Disappointing because you can search for pointers in a pointer array, but 
>> not in a collection. And the above gives -1 implying that the search was 
>> completed rather than an error to indicate it is not supported.
**
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: v17R5 bug?

2019-07-29 Thread John DeSoi via 4D_Tech
It is just a different work-around. I'd rather loop over the collection to 
solve it and use the right data structure.

Note also collection.distinct() fails to remove duplicate pointers.

John DeSoi, Ph.D.


> On Jul 28, 2019, at 7:43 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> why not use a key value pair instead of a flat collection of pointers?
> 
>> 2019/07/29 2:16、John DeSoi via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Disappointing because you can search for pointers in a pointer array, but 
>> not in a collection. And the above gives -1 implying that the search was 
>> completed rather than an error to indicate it is not supported.

**
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: v17R5 bug?

2019-07-28 Thread Keisuke Miyako via 4D_Tech
why not use a key value pair instead of a flat collection of pointers?

> 2019/07/29 2:16、John DeSoi via 4D_Tech <4d_tech@lists.4d.com>のメール:
> Disappointing because you can search for pointers in a pointer array, but not 
> in a collection. And the above gives -1 implying that the search was 
> completed rather than an error to indicate it is not supported.




**
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: v17R5 bug?

2019-07-28 Thread John DeSoi via 4D_Tech
Changed the subject, I assume you mean 17R5, version 15 does not have dot 
notation.

> On Jul 28, 2019, at 11:20 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is searching for pointers not allowed?

I would assume no because 4D can't search collections for a pointer: 

$test:=New collection(->[Table]Field).indexOf(->[Table]Field) `Returns -1

Disappointing because you can search for pointers in a pointer array, but not 
in a collection. And the above gives -1 implying that the search was completed 
rather than an error to indicate it is not supported.

See feature request here:

https://forums.4d.com/Post/EN/30491335/1/30491336#30491336


John DeSoi, Ph.D.
**
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
**