Select to view content in your preferred language

Extending the ArcGIS Viewer for Flex "Virtual Campus"

1755
4
Jump to solution
02-17-2014 07:06 AM
DustinHolt
Deactivated User
I'm taking the course "Extending the ArcGIS Viewer for Flex" and I have a problem with a custom widget. In "Step 5: Wire the event handlers" they are asking me to "Create a new instance of FeatureLayer and assign it to the existing myFeatureLayer instance variable". I have attached the instructions and code. It says to create this within the "open handler function", can any one show me where this is?
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   Not sure if you missed a step some where or what but if you go to the WidgetTemplate does it have an open attribute? and if so does it have the convexHull_openHandler(event)? If it does than try deleting out the convexHull_openHandler(event) from between the double quotes and then then delete the beginning " and retype it. That should bring up a dialog choose "generate open handler" and now you will find the protected function you are looking for.

View solution in original post

0 Kudos
4 Replies
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   Sure, when working with widgets the WidgetTemplate has both an open and closed event.

<viewer:WidgetTemplate id="convexHull"
                           width="300" height="300">
                                 open="convexHull_openHandler(event)">


Does that help?
0 Kudos
DustinHolt
Deactivated User
Not really. The location where they want me to add the code is confusing me. If you look at the code in the tutorial, they want you copy and paste it under:

protected function convexHull_openHandler(event:Event):void
{
    // TODO Auto-generated method stub

This "protected function" doesn't exist in my code.
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   Not sure if you missed a step some where or what but if you go to the WidgetTemplate does it have an open attribute? and if so does it have the convexHull_openHandler(event)? If it does than try deleting out the convexHull_openHandler(event) from between the double quotes and then then delete the beginning " and retype it. That should bring up a dialog choose "generate open handler" and now you will find the protected function you are looking for.
0 Kudos
DustinHolt
Deactivated User
I did miss a step. Fixed it, all makes sense now. Thanks.
0 Kudos