MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




OleVariant Problem with Delphi 6

This is a discussion on OleVariant Problem with Delphi 6 within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello I'm trying to use the Item property within Delphi 6 such as: - FMap.Shapes.Item[1].Name := 'my name'; but it ...


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

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-19-2004
Junior Member
White Belt
 
Join Date: Apr 2004
Posts: 1
OleVariant Problem with Delphi 6

Hello

I'm trying to use the Item property within Delphi 6 such as: -

FMap.Shapes.Item[1].Name := 'my name';

but it keeps giving me the erorr message: -

Types of actual and formal var parameters must be identical

I must admit, I'm lost around variants and Olevariants, so I don't know where to start looking for a problem.

Any help would be appreciated.

Thanks in advance.

Les
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 04-19-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Re: OleVariant Problem with Delphi 6

Top204:

You first need to define a variable to store the item number. In your routine, create a variable defined as an olevariant. For example:


procedure TFMain.AssignName;
var ilevariant;
begin
FMap.Shapes.Item[i].Name := 'my name';
end;

That should do it.
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 04-19-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Re: OleVariant Problem with Delphi 6

Top204:

You first need to define a variable to store the item number. In your routine, create a variable defined as an olevariant. For example:


procedure TFMain.AssignName;
var ilevariant;
begin
i := 1;
FMap.Shapes.Item[i].Name := 'my name';
end;

That should do it.[/quote]
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 04-29-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Sorry for the delay in replying.


Your solution worked perfectly. Thanks very much :P

Regards
Les
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

Tags
delphi, olevariant, problem


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
Delphi class terrastudios MapPoint 2006/2009 Discussion 9 12-02-2005 04:01 AM
OLEVariant conversion phoque MapPoint 2006/2009 Discussion 1 10-10-2005 12:44 PM
Mappoint in OleContainer problem //Delphi Anonymous MapPoint 2006/2009 Discussion 6 01-08-2005 01:03 PM
Delphi OleContainer Resize Problem. Sheridan MapPoint 2006/2009 Discussion 5 12-19-2003 05:50 AM
Delphi Anonymous MapPoint 2006/2009 Discussion 2 12-18-2003 11:11 AM


All times are GMT -5. The time now is 12:23 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Sharm El Sheikh Holiday
Enjoy the hot sun and fantastic beaches on your Sharm El Sheikh holiday! Check out the UlookUbook online offers...



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