Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

issue when switching rooms in spark but does not exist in mx namespace?

Avatar

Level 2

I have a Flex SDK 4.0 application that I have declared with <s:Application.  In this application I have 2 rooms, that have two different ConnectSession components associated with each as well as seperate Pod's with seperate shareID's for each. (nothing in the two rooms overlap).  I also have 2 buttons that switch between room1 and room2 when either button is clicked.

my issue is that using the <s:Application declaration for my app..then transitioning from room2 BACK to room1 (transitioning from room1 to room2 works fine), gives me this error:

TypeError: Error #1034: Type Coercion failed: cannot convert studygroups2@343f0a1 to mx.core.Application.

at com.adobe.rtc.collaboration::SharedCursorPane/removeMyEventListeners()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\collaboration\SharedCursorPane.as:477]

at com.adobe.rtc.collaboration::SharedCursorPane/onSynchronizationChange()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\collaboration\SharedCursorPane.as:538]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at com.adobe.rtc.sharedModel::CollectionNode/http://www.adobe.com/2006/connect/cocomo/messaging/internal::setIsSynchronized()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\sharedModel\CollectionNode.as:683]

at com.adobe.rtc.messaging.manager::MessageManager/onDisconnect()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\messaging\manager\MessageManager.as:813]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at com.adobe.rtc.session.managers::SessionManagerBase/http://www.adobe.com/2006/connect/cocomo/session/internal::disconnect()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerBase.as:112]

at com.adobe.rtc.session.managers::SessionManagerFMS/onFmsConnectorDisconnect()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:250]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at com.adobe.rtc.session.sessionClasses::FMSConnector/disconnect()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\sessionClasses\FMSConnector.as:393]

at com.adobe.rtc.session.managers::SessionManagerFMS/http://www.adobe.com/2006/connect/cocomo/session/internal::logout()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerFMS.as:314]

at com.adobe.rtc.session.managers::SessionManagerAdobeHostedServices/http://www.adobe.com/2006/connect/cocomo/session/internal::logout()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\managers\SessionManagerAdobeHostedServices.as:139]

at com.adobe.rtc.session::ConnectSession/logout()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\ConnectSession.as:442]

at com.adobe.rtc.session::ConnectSessionContainer/logout()[C:\work\branches\connect\1004\cocomoPlayer10\src\com\adobe\rtc\session\ConnectSessionContainer.as:267]

at XXXXX/goGlobal()[C:\Users\Rees\Adobe Flash Builder 4\XXXXX\src\XXXXX.mxml:50]

at XXXXX/___XXXXX_Button2_click()[C:\Users\XXXXX\Adobe Flash Builder 4\XXXXX\src\XXXXX.mxml:105]

However, when I change the application to <mx:Application, and then attempted the transition again... BACK to room1 from room2.. everything works FINE!  This may be a simple issue so please bare with =).  Can anyone tell me why I'm getting this issue with spark and how to fix it so that I CAN use spark as my application namespace?  Thanks in advance!

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Wow, that's an interesting one - seems as though the sharedCursorPane has

some hard requirement that the base App be mx (this isn't terribly

surprising, considering it was built with the mx components, but it's still

a bug). Can you link against the source code (provided for player 10 now!),

and change that line in sharedCursorPane :

From :

Application(mx.core.Application.application).stage.removeEventListener(Mouse

Event.MOUSE_MOVE, onMouseMove);

To :

stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

and see if that works for you? I can't honestly tell why we're using the

line that was there... It's possible this was a workaround for another

issue. Anyhow, if you wouldn't mind being the guinea pig for this one, we

can get to the bottom of it.

thanks!

nigel

View solution in original post

7 Replies

Avatar

Correct answer by
Former Community Member

Wow, that's an interesting one - seems as though the sharedCursorPane has

some hard requirement that the base App be mx (this isn't terribly

surprising, considering it was built with the mx components, but it's still

a bug). Can you link against the source code (provided for player 10 now!),

and change that line in sharedCursorPane :

From :

Application(mx.core.Application.application).stage.removeEventListener(Mouse

Event.MOUSE_MOVE, onMouseMove);

To :

stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);

and see if that works for you? I can't honestly tell why we're using the

line that was there... It's possible this was a workaround for another

issue. Anyhow, if you wouldn't mind being the guinea pig for this one, we

can get to the bottom of it.

thanks!

nigel

Avatar

Level 2

Hi Nigel,

Thanks for the response.  This seems like this could be a real issue, I'd love to help!  I'm still fairly new to AFCS and flex overall actually, would you mind telling me how exactly to correctly import the player 10 source files?  And from there I feel I can make the edits you mentioned.  I have attemtped and succesfully created a "source attachment" associated to the afcs.swc file and made the edit above you mentioned, however, I'm thinking this isn't really the way source files are normally used.

Please let me know! And I can make the fix and get back to you asap!

Rees

Avatar

Former Community Member

Hi,

To import source files of player 10, go to the Project->Properties ->Flex Build Path . You will see the tab for the source path. Now you need to add the path com.adobe.afcs/payload/libs/player10/src to the source path from where you unzipped the SDK.

This will link the source files of player 10 to your project. In your flex Builder's flex navigator window, if you look at your project after this, this path will show up. You can dive in and open the files.

The SharedCursorPane file is in com/adobe/rtc/collaboration/ . You can change the file as nigel mentioned and let us know if that solves your problem.

Thanks

Hironmay Basu

Avatar

Level 2

Hi Hironmay,

thanks for the reply, i was able to correctly add the source files to the project as you mentioned, and they showed up in a folder called "[source path] src" that was in the same level in the hierarchy as the original "src" folder in the project.  I then renamed the "[source path] src"to "fix" and then removed the original afcs.swc.

however, in my code mxml code I get the "Could not resolve <rtc:COMPONENT>" error, so I'm guessing my last step in to correctly reference the new source files in my app.  I have tried this with xmlns:rtc="fix.com.adobe", and  xmlns:rtc="fix"... it doesn't seem to work, sorry again for a simple question but how would i go about referencing the source files in my mxml? do I also need to edit my  import com.adobe.rtc.pods.*; statements? I've also checked out the 'flex in a week' tutorials but didn't really help in this regard.  Please let me know!  thanks..

Avatar

Former Community Member

Hi,

The error is because, if you link to the source, the rtc namespace won't be there unless you also have afcs.swc in library path.

To solve this issue , there are two ways,

a)keep afcs.swc in your library path. Since you have a source path, it will link from source, but the errors should go away since you also have the swc added.

b) whichever component you have , add a xmlns namespace for that for example for SimpleChat, you can do xmlns:pods="com.adobe.rtc.pods." and then <pods:SimpleChat> , similarly for ConnectSession xmlns:session="com.adobe.rtc.session." and then <session:ConnectSession> and so on. Basically add the path to the smlns namespace for that component.

Hope this helps

Thanks

Hironmay Basu

Avatar

Level 2

Hi Nigel,

I was able to confirm that making the modification you mention above does successfully correct this error.  Thank you for your help with this! 

I'm curious how I should move forward with this fix, currently i just have the source files included in my project along with the original .swc.  however, is this the most lightweight approach for now?  Please let me know!

Thanks again!

Avatar

Former Community Member

Hi ,

You can keep it for now. We will come up with a patch that will have the fix in near future. Then you can add the swc and remove the source linkage.

If you want to remove the .swc for now and just keep the source, then you will have to define namespace for each and every component you are using in tag as I mentioned in previous enail.

Hope this helps

Thanks

Hironmay Basu

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----