TSimpleGraph Issues (and wish list)

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

Re: TSimpleGraph Issues (and wish list)

Postby Kambiz » October 8th, 2011, 1:14 pm

Vladimir, I checked the issue with the latest version of SG, all was fine.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph Issues (and wish list)

Postby Vladimir » October 9th, 2011, 12:19 pm

I found the problem, was my fault, I've added a number of new shapes and properties to the component and also changed SGDemo for my task, for more convinient and fast work IMHO. Are you interested?
Vladimir
Member
Member
 
Posts: 2
Joined: October 6th, 2011, 10:02 am

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 20th, 2011, 10:10 am

Stefan wrote:A find in node would be most helpful!

:)


you need to be more specific what exactly you want to search in a node, As it is you have multiple choices in searching in nodes including the foreach methods with a custom callback to do what ever you want to do.
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 20th, 2011, 11:20 am

Hi,

two things

1) is the wish list published anywhere so any one who wants to can start implementing a specific feature?
2) can you sent me the grouping enhancements with a short descriptions on what it needs to be completed?

For my needs of groupings and layering I have implement a simple layering and I was thinking to create a Group Node which will contain the grouped nodes
act as proxy for the drawing and handle the keyboard and mouse events it self. Since I haven't code anything for grouping yet it would be better to work on your grouping code instead and add what ever needs to be added.

thank you
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby hungary2006 » October 22nd, 2011, 10:28 pm

I must say this is a good and useful component, is there any hope on using it in Delphi XE2 and Win32 and Win64?
hungary2006
Active Member
Active Member
 
Posts: 10
Joined: October 22nd, 2011, 10:21 pm

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 23rd, 2011, 12:26 am

XE2 Win32 wouldn't be too much trouble I think that just a update to the .inc file should be all that it takes for 64bit thought I was hopping to download the trial version and try to port it but the 15 days limit is to low for me and I don't think I can manage a port in that time.
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby hungary2006 » October 24th, 2011, 6:07 am

I have send you an email.com
taazz2 wrote:XE2 Win32 wouldn't be too much trouble I think that just a update to the .inc file should be all that it takes for 64bit thought I was hopping to download the trial version and try to port it but the 15 days limit is to low for me and I don't think I can manage a port in that time.
hungary2006
Active Member
Active Member
 
Posts: 10
Joined: October 22nd, 2011, 10:21 pm

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 24th, 2011, 7:15 am

hungary2006 wrote:I have send you an email.com


Email Received, thank you.

I'll see what I can do about it.
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby hungary2006 » October 24th, 2011, 11:22 am

Alright, if you figure out please do not hesitate to show us how you do it.
hungary2006
Active Member
Active Member
 
Posts: 10
Joined: October 22nd, 2011, 10:21 pm

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 24th, 2011, 3:22 pm

I had a quick look today and I managed to install it, compile the demo program, for 32 and 64bits with out a problem there are 3 thinks you need to be aware off

  • search and replace PAnsiChar with PChar.
  • TGraphLink.CreateTextRegion method has a line that reads < SetLength(TmpText, StrLen(PChar(TmpText))); > change it to <SetLength(TmpText, Length(TmpText)-4);>This might not be the proper way to solve this I haven't found out why those 2 setlength statements are needed in there yet I'm trying to understand. Perhaps Kambiz could help us with that.
  • TSimpleGraph.WMPaint method. Rename the 2 variables Width, Height to W, H use the rename refactoring of Delphi Ctrl+Shift+E
So far everything seems to work as expected I can even open the existing samples with out a problem save them and then reopen them with a D2007 build Demo app no problems, I guess that the TReader, TWriter classes do a good job tagging, saving and loading the strings in either unicode or ansi format.

Although I have build a 64bit exe I do not have any 64bit OS installed to test it but I do not expect any problems.

I have attached an updated DELPHIAREA.INC file that understands Delphi XE2 but you dont need it as this inc file works in reverse order than the rest of the them eg it assumes always the latest compiler and undefines if older compiler is detected.

IF you havent grabbed it already go to http://forum.delphiarea.com/viewtopic.php?f=5&t=1949 and download my extensions to simplegraph for GDI+ and run the first search and replace on the UEvsSgCanvas.pas as well.

If you have any problems post a query here and I"ll try to help.
Attachments
DELPHIAREA.inc.zip
(715 Bytes) Downloaded 1847 times
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby Kambiz » October 24th, 2011, 7:46 pm

Thank you taazz2.

Code: Select all
SetLength(TmpText, StrLen(PChar(TmpText)))

TmpText is a buffer for the final string. Its length is larger than the actual string, because of that I used StrLen to find the actual data string using its null character terminator. I don't think this line should be identical for both 32 and 64 bit compilers.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Re: TSimpleGraph Issues (and wish list)

Postby hungary2006 » October 24th, 2011, 9:38 pm

Thanks and did you get rad running?
taazz2 wrote:I had a quick look today and I managed to install it, compile the demo program, for 32 and 64bits with out a problem there are 3 thinks you need to be aware off

  • search and replace PAnsiChar with PChar.
  • TGraphLink.CreateTextRegion method has a line that reads < SetLength(TmpText, StrLen(PChar(TmpText))); > change it to <SetLength(TmpText, Length(TmpText)-4);>This might not be the proper way to solve this I haven't found out why those 2 setlength statements are needed in there yet I'm trying to understand. Perhaps Kambiz could help us with that.
  • TSimpleGraph.WMPaint method. Rename the 2 variables Width, Height to W, H use the rename refactoring of Delphi Ctrl+Shift+E
So far everything seems to work as expected I can even open the existing samples with out a problem save them and then reopen them with a D2007 build Demo app no problems, I guess that the TReader, TWriter classes do a good job tagging, saving and loading the strings in either unicode or ansi format.

Although I have build a 64bit exe I do not have any 64bit OS installed to test it but I do not expect any problems.

I have attached an updated DELPHIAREA.INC file that understands Delphi XE2 but you dont need it as this inc file works in reverse order than the rest of the them eg it assumes always the latest compiler and undefines if older compiler is detected.

IF you havent grabbed it already go to http://forum.delphiarea.com/viewtopic.php?f=5&t=1949 and download my extensions to simplegraph for GDI+ and run the first search and replace on the UEvsSgCanvas.pas as well.

If you have any problems post a query here and I"ll try to help.
hungary2006
Active Member
Active Member
 
Posts: 10
Joined: October 22nd, 2011, 10:21 pm

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 24th, 2011, 10:00 pm

Kambiz wrote:Thank you taazz2.

Code: Select all
SetLength(TmpText, StrLen(PChar(TmpText)))

TmpText is a buffer for the final string. Its length is larger than the actual string, because of that I used StrLen to find the actual data string using its null character terminator.


Not in that method. You already have the correct size and string a few lines above and you do
Code: Select all
      TmpText := Trim(Text);
      SetLength(TmpText, Length(TmpText) + 4);
      ..
      ..
      SetLength(TmpText, StrLen(PChar(TmpText)));


Kambiz wrote:I don't think this line should be identical for both 32 and 64 bit compilers.

Since this line does not depend in anything string specific its just an undo and it only uses a system function with well defined behavior I do expect it to work as it is on 64 bit compilers.
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby taazz2 » October 24th, 2011, 10:02 pm

hungary2006 wrote:Thanks and did you get rad running?


Yes, I"m a happy user thank you.
taazz2
Active Member
Active Member
 
Posts: 22
Joined: September 28th, 2011, 4:21 am

Re: TSimpleGraph Issues (and wish list)

Postby hungary2006 » October 25th, 2011, 6:52 pm

Following all your steps and I fire up Delphi XE2, and error TSimpleGraph occurred.

taazz2 wrote:I had a quick look today and I managed to install it, compile the demo program, for 32 and 64bits with out a problem there are 3 thinks you need to be aware off

  • search and replace PAnsiChar with PChar.
  • TGraphLink.CreateTextRegion method has a line that reads < SetLength(TmpText, StrLen(PChar(TmpText))); > change it to <SetLength(TmpText, Length(TmpText)-4);>This might not be the proper way to solve this I haven't found out why those 2 setlength statements are needed in there yet I'm trying to understand. Perhaps Kambiz could help us with that.
  • TSimpleGraph.WMPaint method. Rename the 2 variables Width, Height to W, H use the rename refactoring of Delphi Ctrl+Shift+E
So far everything seems to work as expected I can even open the existing samples with out a problem save them and then reopen them with a D2007 build Demo app no problems, I guess that the TReader, TWriter classes do a good job tagging, saving and loading the strings in either unicode or ansi format.

Although I have build a 64bit exe I do not have any 64bit OS installed to test it but I do not expect any problems.

I have attached an updated DELPHIAREA.INC file that understands Delphi XE2 but you dont need it as this inc file works in reverse order than the rest of the them eg it assumes always the latest compiler and undefines if older compiler is detected.

IF you havent grabbed it already go to http://forum.delphiarea.com/viewtopic.php?f=5&t=1949 and download my extensions to simplegraph for GDI+ and run the first search and replace on the UEvsSgCanvas.pas as well.

If you have any problems post a query here and I"ll try to help.
hungary2006
Active Member
Active Member
 
Posts: 10
Joined: October 22nd, 2011, 10:21 pm

PreviousNext

Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 4 guests

cron