MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Strange behaviour with square brackets.

This is a discussion on Strange behaviour with square brackets. within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2006
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2006
Eric Frost's Avatar
Senior Member
Black Belt
 
Join Date: Jul 1992
Posts: 2,304
Blog Entries: 1
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
__________________
~ Now taking orders for MapPoint 2009 ~
~
~ Upgrade to MapForums Plus membership ~
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 01-06-2006
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 01-07-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
[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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 07:32 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map

Cheap Ski Holidays Austria
For the best cheap ski holidays, Austria has a charm all of its own. Check out the unspoilt, picturesque villages with superb ski resorts of all types.

Travel Agent Service
Looking for a Travel Agent Service? Travel Counsellors are a Queen's Award winning Travel Agent.

Cape Town Flights
Book Cape Town flights through dealchecker.co.uk to get a great deal. Cape Town has fantastic weather and a wide range of activities to keep you busy.

Cancun Holidays
Cancun holidays offer beautiful scenery, calm waters and plenty of shopping. Get a taste of the good life while on holiday in Cancun.

Holidays
For bargain holidays to destinations including Mexico, South Africa, India and more, visit ULookUBook online today. Check out our free travel guides to help you make an informed decision for your holidays.

Travel Guides
As far as travel guides are concerned, your best move would be to check out our website at Travel.co.uk

Holidays to Fuerteventura
Come on; jump on the plane to the Canary Islands. Get information on cheap holidays to Fuerteventura at On The Beach.


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