Could not understand TCodeSiteLoggingClass

Post questions here regarding the CodeSite Express edition

Could not understand TCodeSiteLoggingClass

Postby clementyap » Tue May 26, 2015 9:25 pm

Though I have read CodeSite5's help documentation and convention, I have a difficulty understanding the explanation. :?

I have tried testing Codesite->SendDateTime but it did not not work because I was not sure about it.
I looked up in the help document and convention and could not figure it out.

For eg, see the attached.
https://drive.google.com/open?id=0B8pWRAmt5nDUVVpjQTBLVnVNNUU&authuser=0

Can you help explain so that It can be applied to all in the help document? I must admit that I am still new in C++ Builder and Delphi and I am still learning... :mrgreen:

Clement
clementyap
 
Posts: 7
Joined:
Fri May 08, 2015 1:59 am

Re: Could not understand TCodeSiteLoggingClass

Postby clementyap » Tue May 26, 2015 10:51 pm

Sorry. I used the link with specified sharing.

Here's the correct link - https://drive.google.com/file/d/0B8pWRA ... sp=sharing
clementyap
 
Posts: 7
Joined:
Fri May 08, 2015 1:59 am

Re: Could not understand TCodeSiteLoggingClass

Postby Raize Support » Wed May 27, 2015 3:02 am

Hi Clement,

The SendDateTime method is overloaded, which means that the same method name is used for multiple methods, and each method has a different set of parameters. Consider the following examples:

Code: Select all
procedure TForm10.RzButton1Click(Sender: TObject);
var
  DT: TDateTime;
begin
  DT := Now;
  CodeSite.Send( 'DT', DT );
  CodeSite.SendDateTime( 'DT', DT );
  CodeSite.SendDateTime( 'DT', DT, 'yyyy-mm' );
  CodeSite.SendDateTime( csmOrange, 'DT', DT );
end;



Running this program produces the following output:

Code: Select all
<Info Icon>   DT = 42,151.12
<Info Icon>    DT = 5/27/2015 2:55:07 AM
<Info Icon>    DT = 2015-05
<Yellow Icon> DT = 5/27/2015 2:55:07 AM


The first Send method call results in a floating point number being displayed because the TDateTime type is an alias for Double.

The SendDateTime methods are provided to format the TDateTime value in a way that we expect to see. The first SendDateTime method just takes the message string ( 'DT' ) and the TDateTime variable. The second SendDateTime method does the same as the first, except that a format string is specified which means the date-time value is displayed in that format (i.e. 2015-05). The third SendDateTime example includes the message type in the call. In this case, the csmOrange message type, which results in an orange icon next to the message in the viewer.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 603
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Could not understand TCodeSiteLoggingClass

Postby clementyap » Wed May 27, 2015 4:04 am

Hi Ray Thanks

CodeSite help document can be improved by providing more details

Clement
clementyap
 
Posts: 7
Joined:
Fri May 08, 2015 1:59 am


Return to Express Edition

Who is online

Users browsing this forum: No registered users and 3 guests

cron