MapPoint Forums

MapForums

Community of VE/MapPoint 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

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


All times are GMT -5. The time now is 12:22 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


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