pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: [pivot-toolkit] Re: MVC, swing and pivot
Date Fri, 13 Mar 2009 19:11:00 GMT
This change is done and has been committed. The listener "setters" have been eliminated, and
the WTKX syntax has been updated as described below.

Any future discussion on this topic should be via pivot-dev@incubator.apache.org.


On Friday, March 13, 2009, at 12:25PM, "Greg Brown" <gkbrown@mac.com> wrote:
>I think we had discussed adding knowledge of ListenerList to BeanDictionary, which we
didn't (and I still don't) like. However, WTKXSerializer does have knowledge of beans and
Sequences, so it's not a stretch to add ListenerList. 
>Since ListenerList is so integral to the framework, I think it is OK.
>On Friday, March 13, 2009, at 12:04PM, "Todd Volkert" <tvolkert@gmail.com> wrote:
>>I'm in favor, though I thought this wasn't originally done because we
>>didn't want too tight a coupling between specific classes in
>>WTKXSerializer (such as hard coded knowledge of ListenerList).  That
>>being said, the setXListener() adding to the listener list does break
>>naming conventions like Noel says, and it does make unsuspecting
>>developers look for removeXListener(), which is likely to be a common
>>confusion as Pivot gains adoption -- thus, I second the idea :)
>>On Fri, Mar 13, 2009 at 11:32 AM, Greg Brown <gkbrown@mac.com> wrote:
>>>>One alternative would be to make the parser aware of the pivot.util.ListenerList
>>>>in the same way that it is aware of the Sequence class and classes that expose
>>>>bean-style getters and setters. This might allow us to eliminate the listener
>>> Thinking through this a bit, the syntax might look like:
>>> <wtkx:script src="demo.js"/>
>>> <PushButton buttonData="Click Me!" buttonPressListeners="$buttonPressListener1,
>>> and:
>>> <PushButton buttonData="Click Me!">
>>>    <buttonPressListeners>
>>>        <foo:MyButtonPressListener1/>
>>>        <foo:MyButtonPressListener2/>
>>>    </buttonPressListeners>
>>> </PushButton>
>>> In Java, the code would still look like:
>>> myPushButton.getButtonPressListeners().add(buttonPressListener1);
>>> myPushButton.getButtonPressListeners().add(buttonPressListener2);
>>> We could then get rid of the setButtonPressListener() method (and others like
>>> I kinda like it. What do others think?
>>> Greg
>>> >
>>You received this message because you are subscribed to the Google Groups "pivot-toolkit"
>>To post to this group, send email to pivot-toolkit@googlegroups.com
>>To unsubscribe from this group, send email to pivot-toolkit+unsubscribe@googlegroups.com
>>For more options, visit this group at http://groups.google.com/group/pivot-toolkit?hl=en

View raw message