Code review comment for lp://staging/~zsombi/ubuntu-ui-toolkit/60-action-value-type

Revision history for this message
Zsombor Egri (zsombi) wrote :

> 67 + * However this will only work if the \l
> {Action::parameterType}{parameterType}
> 68 + * will be set to Action.Integer or not set at all, in which case the
> ListItem
> 69 + * will set the type to Action.Integer.
>
>
> Alternatively, we can simply change the doc to ", in which case the ListItem
> will change the type from Action.None to Action.Integer when it is triggered."
> to be more explicit about what will happen.

Happened. revno 1295.

>
> Do we have a need to somehow support other parameter types here? (I don't know
> how). If not, let's not pass the index when the type is different (add the if-
> statement of my first comment), and add a sentence to the doc: "If the
> parameterType is neither Action.Integer or the default Action.None, no value
> will be passed when triggering the action."

We cannot really handle other parameters tbh... I mean only thing we know is the index of the ListItem. Not more. And Action.trigger() will pass undefined to the signal if the functoins' parameter type differs from the one in parameterType.

« Back to merge proposal