View Single Post

  #1 (permalink)  
Old 01-05-2006
fergdeff fergdeff is offline
Junior Member
White Belt
 
Join Date: Jan 2006
Posts: 3
Strange behaviour with square brackets.

Hi there,

I'm using the MapPoint ActiveX through C# .NET.

MapPoint is throwing a COM Exception when I attempt to find a pushpin
by name, where the name is surrounded by square brackets.

ActiveMap.FindPushpin("[TestName]") => fails
ActiveMap.FindPushpin("Test[Name]") => fails
ActiveMap.FindPushpin("[TestName") => fails
ActiveMap.FindPushpin("Test[Name") => fails
ActiveMap.FindPushpin("]TestName[") => succeeds
ActiveMap.FindPushpin("TestName") => succeeds

Of course, the square brackets can easily be removed - just wondering
if anyone has seen this behaviour before or knows why it happens.

Actually what's interesting is that the first call to AddPushpin,
FindPushpin, etc with a "bad" name succeeds. All subsequent calls throw
a COM Exception.

Regards,
Fergus
Reply With Quote