Naty,
So if I understand correctly then you are calling execSearch1 from the minisearch and it works fine (meaning it brings up the full searchwidget if it is not open already and executes the search) and when you open any other widget and add some new text to the minisearch and click enter it doesn't work. Does it give you any error?
Naty,
Error 1009 is such a generic error it just means that a variable is null. The best thing for you to do now is download the Flash Player debugger version form Adobe so that you can add a break point in and see where the error is actually occurring. Google "Flash Player Debugger" and down load the appropriate version IE or netscape compatible version once you install that then you can click the little green bug in Flex or Flash builder instead of the run button.
Robert, I'm trying to find the error, I saw that I get the widget and the problem is in queryBuilding...I dont know how it can be....cause I pass correct value...
it seems like some variables stop working when I lunch another widget ....
😞
Naty
Robert I downloaded the debugger and I m running it
but it stops here:
[SWF] /Buildings/com/esri/solutions/flexviewer/assets/flash/red_glow.swf - 1,082 bytes after decompression
[SWF] /Buildings/com/esri/solutions/flexviewer/assets/flash/loader.swf - 941 bytes after decompression
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Function/com.esri.solutions.flexviewer:MapManager/refreshLayer/com.esri.solutions.flexviewer:timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
var id:Number = SiteContainer.getInstance().getWidgetId("Search");
var bWidget:IBaseWidget = SiteContainer.getInstance().widgetManager.getWidget(id) as IBaseWidget;
var aaa:String;
aaa=ti.text;
if (bWidget){
var bWidg:BaseWidget = bWidget.getInstance();
var vSW:SearchWidget = bWidg as SearchWidget;
vSW.queryBuilding(aaa);//Just comment out this line or delete it. var bWidg:BaseWidget = bWidget.getInstance(); // and change this line var vSW:SearchWidget = bWidg as SearchWidget; to var vSW:SearchWidget = bWidget as SearchWidget;
Naty,
I have seen this before and the fix is simple.//Just comment out this line or delete it. var bWidg:BaseWidget = bWidget.getInstance(); // and change this line var vSW:SearchWidget = bWidg as SearchWidget; to var vSW:SearchWidget = bWidget as SearchWidget;
Naty,
Do you have a complete mini search as you are using it? I would like to see what you have done and maybe implement some of it on my site. It sounds like you have it set up to handle a broad amount of data. Please let me know.
Thanks,
Alex