"Possibly Undefined Property" Error

  • Problem
  • Updated 4 years ago
Hi All,

I'm getting the following error when trying to run ASDoc over the modestmaps code:

modestmaps/overlays/MarkerClip.as(151): col: 35 Error: Access of possibly undefined property id through a reference with static type flash.display:DisplayObject.
markersByName[marker.id] = marker;

Any ideas?

Thanks!
~Mike
Photo of Mike BronnerMB

Mike Bronner

  • 3 Posts
  • 0 Likes
  • frustrated

Posted 4 years ago

  • 1
Photo of RandomEtc

RandomEtc, Tween Branch Maintainer

  • 522 Posts
  • 47 Likes
It should be marker.name - are you using an old version? My copy of MarkerClip.as, from Google Code, doesn't have any mention of marker.id:

http://code.google.com/p/modestmaps/s...
Photo of Mike BronnerMB

Mike Bronner

  • 3 Posts
  • 0 Likes
Thanks for your response. How do I tell what version I am using? I downloaded and compiled from source on the modestmaps web site. Don't recall if the code was from Google Code or not. What version is the latest version?
Photo of RandomEtc

RandomEtc, Tween Branch Maintainer

  • 522 Posts
  • 47 Likes
The latest version is in Google Code source control. The download could be out of date depending on which one you used. If in doubt, use the version on Google Code.

I know this isn't the most user-friendly way, I'm sorry. The version in Google Code should be very stable - please post back if you need help accessing it.
Photo of Mike BronnerMB

Mike Bronner

  • 3 Posts
  • 0 Likes
Thanks. :) To be honest, I'm a bit scared to update my copy of the code, as I have it working in project. I'll copy off my current code, and give the google code a run. I don't think I'll have problems accessing it.

Thanks! I'll post back if that fixes my problems. As I'm using this with Flex 4, has ModestMaps been updated to be compatible (i.e. by changing MarkerClip to extend UIComponent instead of Sprite)?
Photo of RandomEtc

RandomEtc, Tween Branch Maintainer

  • 522 Posts
  • 47 Likes
No, Modest Maps is still plain-old-Flash code. The Flex code in Modest Maps is very out of date and never really worked properly.