FLUID-4391: Image Reorderer fails when event listener is supplied as part of initial options

Metadata

Source
FLUID-4391
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2011-08-07T21:49:26.998-0400
Updated
2011-08-09T11:01:17.690-0400
Versions
N/A
Fixed Versions
  1. 1.4
Component
  1. Image Reorderer

Description

Reported by harriswong in IRC 05/08/11 -

[12:54] <harriswong> Justin_o: i have a question on the imageReorderer. I keep getting a " ASSERTION FAILED: Listener registered for event afterMove which is not defined for this component" and i am not sure what i am missing.
[12:56] <Justin_o> harriswong: sounds like you have a listener that doesn't exist.. like if you passed in options like the following
[12:56] <harriswong> Justin_o: Looking at http://wiki.fluidproject.org/display/fluid/Image+Reorderer+API, listeners; i tried adding the "afterMove" to the listener in the demo (webapp/demos/reorderer/imageReorderer/js/imageReorderer.js)
[12:56] <Justin_o> listeners: {someEvent: someUndefinedFunction};
[12:57] <harriswong> Justin_o: that's what i thought, i must be missing something somewhere, here is my code if you have a min, http://pastebin.com/CcpeLJJH
[12:58] <Justin_o> harriswong: what happens if you don't include the listener block at all?
[12:58] <harriswong> Justin_o: then it's fine, the current demo has no listeners.
[12:59] <Justin_o> harriswong: but you get the error with this?

This was caused by a framework fix that prohibited adding listeners to non-existent events, as well as the non-standard "wrapper" strategy for this initialise which creates a "fake component".

Comments

  • Antranig Basman commented 2011-08-07T22:37:22.583-0400

    Bug Parade Infusion 1.4

  • Justin Obara commented 2011-08-09T11:00:58.207-0400

    Pushed the pull request https://github.com/fluid-project/infusion/pull/131 at 6c4f7a89e4f4e3e804af453319d69c1eaf381a48