Message from discussion
Events, multiple listeners, and return data
Received: by 10.68.238.67 with SMTP id vi3mr3575848pbc.6.1337037117131;
Mon, 14 May 2012 16:11:57 -0700 (PDT)
X-BeenThere: cake-php@googlegroups.com
Received: by 10.68.241.165 with SMTP id wj5ls5811845pbc.4.gmail; Mon, 14 May
2012 16:11:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.68.227.73 with SMTP id ry9mr841336pbc.16.1337037098884; Mon,
14 May 2012 16:11:38 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
jamie....@gmail.com designates internal as permitted sender)
smtp.mail=jamie....@gmail.com; dkim=pass
header...@gmail.com
Received: by e9g2000pbh.googlegroups.com with HTTP; Mon, 14 May 2012 16:11:38
-0700 (PDT)
Date: Mon, 14 May 2012 16:11:38 -0700 (PDT)
In-Reply-To: <17246436.1701.1337036293292.JavaMail.geo-discussion-forums@yndz2>
References: <4FB16A86.3020505@gmail.com> <17246436.1701.1337036293292.JavaMail.geo-discussion-forums@yndz2>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19,gzip(gfe)
Message-ID: <51164e27-1483-4701-81bc-deb5d760e61a@e9g2000pbh.googlegroups.com>
Subject: Re: Events, multiple listeners, and return data
From: Jamie <jamie....@gmail.com>
To: CakePHP <cake-php@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thanks. Just curious - why is the result data overwritten in this way?
For me, at least, using the event system to get information from
multiple listeners (as in my situation) was one of the first uses I
thought of, especially since it can replace a bunch of custom stuff I
had written previously. It seems a bit odd not to handle return data
from multiple listeners without resorting to the methods you outlined
below.
On May 14, 3:58=A0pm, Jos=E9 Lorenzo <jose....@gmail.com> wrote:
> Basically you have two options, one is writing the result property direct=
ly on each listener to push new values on the array as needed, wich is the =
option I would recommend.
>
> The other option is to use the ObjectCollection instead of the event sust=