Select to view content in your preferred language

Error #1014: Class com.esri.viewer::BaseWidget could not be found

2517
8
03-22-2011 03:36 PM
by Anonymous User
Not applicable
Greetings All!

This might be a really trivial question but I wanted to take a compiled widget (in the form of a subdirectory containing an swf and xml file), add it to the widgets folder of the base flexviewer, then add the appropriate <widget> code to the config.xml file and that was all I needed to do to have a new widget added to my existing viewer. When I do this however I get the error message "Error #1014: Class com.esri.viewer::BaseWidget could not be found" ... Any ideas what I'm doing wrong or how to fix it?  The new widget works just fine in the application is was original compiled with ...

- Bob
Tags (2)
0 Kudos
8 Replies
DasaPaddock
Esri Regular Contributor
Was the widget compiled for Viewer 2.1? Are you trying to add it to a 2.2 Viewer?
0 Kudos
by Anonymous User
Not applicable
Was the widget compiled for Viewer 2.1? Are you trying to add it to a 2.2 Viewer?


That could cause it, huh? I'll check and let you know ...
0 Kudos
RafaelSalgado
New Contributor
I am using the api 2.2 and I am trying create a new widget, but i can not to inherit from the BaseWidget because i can not find it on API!!! Can anyone help?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Rafael,

   If you are using the Flex Viewer 2.2 and when you use a widget that was compiled for 2.1 you will get this error. You need to get a newer version of the widget you are attempting to load or if the source code for the widget is available you need to recompile it yourself to make it 2.2 compatable.
0 Kudos
RafaelSalgado
New Contributor
Robert,

You are fast!!! Thanks. But i edited my post with a question more objective. I guess that will be more easy for you.

Thanks!!!
0 Kudos
by Anonymous User
Not applicable
Well, recompiling with version 2.2 certainly fixed the problem but I was just curious about the "plug and play" aspects of using precompiled widgets. Do you know if newer widgets are backward compatible, that is will work in an older viewer, or do you always need to be on a consistent build?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
I am using the api 2.2 and I am trying create a new widget, but i can not to inherit from the BaseWidget because i can not find it on API!!! Can anyone help?


Rafael,

   BaseWidget is not part of the API it is part of the Flex Viewer which is built on the API.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Well, recompiling with version 2.2 certainly fixed the problem but I was just curious about the "plug and play" aspects of using precompiled widgets. Do you know if newer widgets are backward compatible, that is will work in an older viewer, or do you always need to be on a consistent build?



Bob,

    Widgets had a minor change from 2.1 to 2.2 that will not allow compiled widgets to be backward compatible.
0 Kudos