Typo: the .push line should push “info”; $info, of course.

And I’ve no idea where the <http://box.info <http://box.info/>> came from - 
it’s not in the message I sent.

Jeremy

> On 28 Jul 2019, at 17:20, Jeremy Roussak <[email protected]> wrote:
> 
> I hope this is a more sensible query than my last one!
> 
> I have a collection objects, each of which has a pointer to a variable and an 
> associated object:
> 
>       <>boxes.push(new object(“lb”; ->list; “box”; $info))
> 
> I want to find the item in the collection from the pointer, which is in $ptr
> 
>       $boxes:=<>boxes.query(“lb = :1”;$ptr)
> 
> When I run this, 4d crashes instantly on the query line. If I put a trace 
> just before that line, I can see that <>boxes contains only one item, which 
> is an object whose lb is the same as $ptr (it’s given in the debugger as 
> “->form_9_1C”). 
> 
> If I code it as
> 
>       for each ($box; <>boxes)
>               if ($box.lb = $ptr)
>                       $result:=$box.info <http://box.info/>
>               end if
>       end for each
> 
> It works fine.
> 
> Is searching for pointers not allowed?
> 
> Jeremy

**********************************************************************
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