Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 5 of 5

Strange behaviour with square brackets.

This is a discussion on Strange behaviour with square brackets. within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi there, I'm using the MapPoint ActiveX through C# .NET. MapPoint is throwing a COM Exception when I attempt to ...

  1. #1
    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

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4
    Fergus,

    This is an interesting finding. I am going to point it out to the program manager and try to see if he has any insight.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    dont use it (easey remedy) !

    Blonde girl go to doctor and tell she hurst in all her body. Everywhere where she push it hurts. After a long investigation the doctor's diagnose was that her finger was broken ...

    I hope you ar not blond

  4. #4
    fergdeff is offline Junior Member White Belt
    Join Date
    Jan 2006
    Posts
    3

    Ha, ha

    No [Wilfried] I'm not blonde (sadly).

    Of course I have added some replacement code for square brackets and that makes everything work fine (unfortunately I don't have control over the source of the square brackets.) But, of course it's a hack and I can see someone staring at the code 12 months down the line with madness in their eyes...

    I guess, to stick with your analogy, I'd really like to know how the blonde managed to break her finger...

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    [Hi],

    I think the hack is probably only solution. I tryed some experiments like trying to escape it or so, but with no result. the '[' trows exception. Wierd.

    btw: In fact I dont know how she broken her finger. Maybe while checking if she was ill and then pushing to hard

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Displaying a WayPoint without showing the default square
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 04-20-2006, 10:33 PM
  2. strange order in the exported Excel flile
    By pileggi in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-29-2005, 11:08 AM
  3. How to get the Locations for the 4 vertices of a Square?
    By cx123 in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 10-26-2004, 11:01 AM
  4. GetPictureFromObject returns strange maps
    By cd4000 in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 08-30-2004, 07:12 PM
  5. [Why such a behaviour] ???
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 06-03-2003, 12:03 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127