ListItemView doesn't implement the protocol defined in SC.ActionSupport #828

Closed
amiorin opened this Issue Sep 7, 2012 · 3 comments

4 participants

@amiorin
action: 'funBar' 

the action is not fired.

I tried the same action with a SC.ButtonView and the action is fired.

action: 'funBar'
target: 'App.target'

Writing an explicit target doesn't fix the problem.

The action should be fired on doubleClick.

@dcporter
SproutCore member

To elaborate, @amiorin reported that he was able to get the action to fire by making it a local function on the ListItemView.

I haven't repro'd personally, but the symptoms sound like ListItemView is using the old school action-as-function paradigm and never got updated to the newer target/action paradigm. Funny thing though is that I don't see any action handling built into ListItemView at all, so why would action-as-function work?

@geoffreyd
@publickeating
SproutCore member

Yeah, sorry, action/target is supposed to be set on the collection view (see http://docs.sproutcore.com/#doc=SC.CollectionView&method=action&src=false). The collection view handles all the user interaction, not the item views that it creates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment