InsertLink by code with breakpoint?

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

InsertLink by code with breakpoint?

Postby HPW » March 27th, 2006, 10:21 am

When I want to insert a link by code between 2 nodes but with a breakpoint, what is the way to go?

Code: Select all
function InsertLink(Source, Target: TGraphObject; ALinkClass: TGraphLinkClass = nil): TGraphLink;

function InsertLink(Source: TGraphObject; const Pts: array of TPoint; ALinkClass: TGraphLinkClass = nil): TGraphLink;

function InsertLink(const Pts: array of TPoint; Target: TGraphObject; ALinkClass: TGraphLinkClass = nil): TGraphLink;

function InsertLink(const Pts: array of TPoint; ALinkClass: TGraphLinkClass = nil): TGraphLink;


The first version only links directly.
Does the versions with the Start/end-Pts link to a node which can be found there?
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 230
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby Kambiz » March 27th, 2006, 11:15 am

Directrly use TGraphLink.CreateNew constructor.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2405
Joined: March 7th, 2003, 7:10 pm

Postby HPW » March 27th, 2006, 11:26 am

Oops, I missed it. :oops:
Thanks for the info.
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 230
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby HPW » April 18th, 2006, 11:18 am

I am trying to do this, but currently a bit struggled to build the array dynamicly:

Code: Select all
VAR
    ptarray      : array of TPoint;


    ....
    J := 1;
    FOR I := 0 TO ArrayCount DO
     BEGIN
      pt := point(....);
      ptarray[J] := pt;
      Inc(J);
     END;


Giving me access-violations.
:(
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 230
Joined: February 25th, 2006, 10:19 am
Location: Germany

Postby HPW » April 18th, 2006, 12:32 pm

I finally managed it with:

SetLength(ptarray, acount);
Hans-Peter
HPW
Moderator
Moderator
 
Posts: 230
Joined: February 25th, 2006, 10:19 am
Location: Germany


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 2 guests

cron