POST
|
Hi, I am trying to add a close event to a command I have made for a Map web part in SharePoint. The command adds some graphics to the map and all I want to do is clear the graphics when the user clicks the 'X' button on the Command window. I have added an EventHandler to the ShowWindow method : MapApplication.Current.ShowWindow("Perform a search", gazSearch, false, DialogClosing, null, WindowType.Floating); Then I have called my Reset function in the handler method: public event EventHandler<System.ComponentModel.CancelEventArgs> DialogClosing; protected virtual void OnDialogClosing2(object sender, System.ComponentModel.CancelEventArgs args) { if (DialogClosing2 != null) { DialogClosing2(this, args); gazSearch.reset(); } } But no matter what I have tried I have not been able to get the event to fire. Can somebody tell me what I am doing wrong. Thanks
... View more
05-02-2012
12:41 AM
|
0
|
1
|
1579
|
POST
|
Eventually found this post which had the answer. http://forums.arcgis.com/threads/26074-Draw-Widget-tooltips
... View more
10-07-2011
03:27 AM
|
1
|
0
|
119
|
POST
|
Hi, I am using Flex 2.3.1 and I'm stuck on what should be a really simple problem, I think. I want to change to text in the tip that is displayed next to the cursor when using the draw tool. I have changed the tool tip but this is not having any effect on the mouse tip text. I want to change the "Click to add a point" beside the cursor above. Thanks for any help.
... View more
10-07-2011
02:06 AM
|
0
|
1
|
1803
|
POST
|
This issue is kind of resolved once the service has been published to the server and ran for the first time. Until the service is restarted or the cache is cleared the DLLs remain in memory so there is no delay until the first run after a restart.
... View more
09-27-2011
01:39 AM
|
0
|
0
|
558
|
POST
|
From what I have found on the internet, it doesn't seem possible to do this using arcpy yet. I have resorted to using cx_Oracle to connect to the database and execute some SQL to get the information required.
... View more
09-27-2011
01:37 AM
|
0
|
0
|
101
|
POST
|
Thanks for the reply Jason. Would there be anyway to speed that up? 15 seconds doesn't sound like a lot but the app has to be fast. At the minute it takes about 35 seconds to run so in that context just to call and use SelectLayerByLocation the first time is half of the running time of the app.
... View more
09-23-2011
12:38 AM
|
0
|
0
|
558
|
POST
|
Hi Marc, I understand what you are saying. But I think what is happening with the SelectLayerByLocation is a bit different from what you have described. In my app SelectLayerByLocation is being called twice every time the the app is ran and even after running the app a lot of times, without loading a new environment, the first call to SelectLayerByLocation always takes about 15 seconds and the second call always takes a more expected time of about 2 seconds, no matter on the order of the layers that I call the function for. Maybe I am mistaken, but would publishing the app as a GP task and running it from a REST endpoint not remove the time discrepancy? Because the same thing happens at the REST endpoint too. Thanks, Anthony
... View more
09-22-2011
08:31 AM
|
0
|
0
|
558
|
POST
|
Hi, I am using the following line of code to select some features from 2 different layers. arcpy.SelectLayerByLocation_management(inputLayer, "INTERSECT", selectFeatures, "", "NEW_SELECTION") It works correctly, but when it is first ran it is really slow but the second time it is run it performs the task a lot faster. It doesn't matter which layer I run the task on first, the first run is always very slow and any subsequent runs are faster. Does anybody know why this happens or a way to make the first run the same speed as the following runs? Thanks for any tips.
... View more
09-22-2011
02:24 AM
|
0
|
5
|
1530
|
POST
|
Hi Robert, I got it working. Thanks for the help again! Sorry about not replying I have been away the last couple of weeks.
... View more
06-13-2011
01:52 AM
|
0
|
0
|
463
|
POST
|
I tried both viewerCon:ViewerContainer = ViewerContainer.getInstace(); // inside init()
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, viewerCon.getWidgetId("Selection") ) );
AND
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, ViewerContainer.getInstance().getWidgetId("Selection") ) ); and I recieved the same error. Im probably making a stupid mistake somewhere.
... View more
05-30-2011
08:17 AM
|
0
|
0
|
463
|
POST
|
Bob, You have to know your widgets Id number. The widgets id is not a string it is a sequential number that is assigned when the widget is created in FlexViewer. Here is the code: ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, yourWidgetsID#)); I added a new function to the ViewerContainer.mxml for the purpose of finding a widgets id #
//Add this new variable at the beginning with the other private and public vars
public var _configData:ConfigData;
//Add this new function
public function getWidgetId(widgetLabel:String):Number
{
var id:Number;
for (var i:Number = 0; i < _configData.widgets.length; i++)
{
if (_configData.widgets.label == widgetLabel)
id = _configData.widgets.id;
}
return id;
}
//Add this to the postConfigHandler function
_configData = event.data as ConfigData;
Then you can do something like this ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, ViewerContainer.getWidgetId("Search"))); Hi again Robert, I know this is a fairly old post now but this function would be very useful to me at the minute. I was wondering how you can call the getWidgetId function the way you are above since the function is not static and there is no instance of ViewerContainer to be able to call the function? I have added in all of the code above into my ViewerContainer.mxml file and the calls I need into my other file where I want to run the widget but, if I dont make the getWidgetId function static I can't access it and if I do try to make it static I get an "Error #1009: Cannot access a property or method of a null object reference." at line 273: "var wgtContainer:IWidgetContainer = configData.widgetContainers[idx.container].container.obj;" of the WidgetManager.mxml file Thanks for any help.
... View more
05-30-2011
01:54 AM
|
0
|
0
|
463
|
POST
|
After all that it turned out that there was an error with the models in the service when it was moved from one vm to the next. Thanks for the help anyway 😄
... View more
05-26-2011
07:02 AM
|
0
|
0
|
55
|
POST
|
Im not quite sure why but Im getting a different error today :confused: [FaultEvent fault=[RPC Fault faultString="Unable to complete operation." faultCode="400" faultDetail="GPTask 'submitJob' does not exist or is inaccessible."] messageId=null type="fault" bubbles=false cancelable=true eventPhase=2]
... View more
05-25-2011
03:12 AM
|
0
|
0
|
342
|
POST
|
Sorry but its not. I don't have permission to share it either.
... View more
05-24-2011
06:24 AM
|
0
|
0
|
342
|
POST
|
I know what you mean Robert :D. I didn't know that the flash errors reported in Firebug wouldn't be the cause of the problem so at least I know now that the problem must be in my implementation of the service.
... View more
05-24-2011
06:11 AM
|
0
|
0
|
342
|
Title | Kudos | Posted |
---|---|---|
1 | 10-07-2011 03:27 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|