3 Replies Latest reply on Aug 6, 2008 5:07 AM by Stephane Gervais

    Image in Task Instructions

      I was updating the task instructions at an approval step to include a photo of the submitter. It's easy enough to do in the HTML So, on the to do list cards deisplayed, the approver can see not only the text, but an actual photo of the people who submitted. The photo is displaying, but I am getting some errors with the Adobe Flash Player 9 that must be dismissed. This won't work in production.
      The error says:
      TypeError: Error #1034: Type Coercion failed: cannot convert flash events::Event@10b0e881 to mx.events.IndexChangedEvent.
      Any ideas?
        • 1. Re: Image in Task Instructions
          Stephane Gervais Level 1
          Is there more to this error? A stack trace maybe?
          • 2. Re: Image in Task Instructions
            Stephane Gervais Level 1
            Never mind, a colleague has reproduced the error.
            • 3. Re: Image in Task Instructions
              Stephane Gervais Level 1
              Sorry for the delay. We reproduced the error; your use case is somehow causing a flash.events.Event of type 'change' to fire, and since the 'change' type collides with mx.events.IndexChangeEvent's type, this generic Event is not expected by one of the handlers for IndexChangeEvent in the Workspace code, thus the coercion exception.

              If you're into rebuilding Workspace from source, you can begin to fix this yourself as I'll explain shortly. Mind you, the results are not stellar even with the fix... Otherwise, I'll recommend you avoid the images idea until this is fixed.

              To fix this yourself in 8.2.1:

              a) open lc.layout.WorkspaceTabNavigator.as

              b) locate function viewChangeHandler (line 76), and change the method signature from (event:IndexChangedEvent) to (theEvent:Event). You may have to import flash.events.Event.

              c) wrap the contents of that function in an if-block, defining variable event in the process, as follows:

              var event:IndexChangedEvent = theEvent as IndexChangedEvent;

              if ( event != null ) {

              {existing function contents here}

              }

              d) Recompile and redeploy the workspace-runtime.swc file.

              Beware of the build scripts if your change doesn't seem to make a difference: the shipping build scripts have been reported to only include a subset of the files, files that have to do with theming/skinning Workspace.