Hi.
I'm probably missing something obvious, but I can't find a logarray method for Delphi. There is for Java and .Net?
Regards
Claes Enskär
Subscribe to forum
Forum
Logarray in Delphi?
Page: 1
| Author | Post |
|---|---|
|
#1 Sun Jul 20, 2008 7:04 pm
|
|
|
Member
Registered: Jul 2008
Posts: 2
|
|
|
#2 Mon Jul 21, 2008 5:48 am
|
|
|
Administrator
Registered: Sep 2007
Posts: 132
|
Hello Claes,
The reason why Delphi has no LogArray method is that you cannot easily get a string representation of an arbitrary value. In Java and .NET you can simply call the toString/ToString method. It might be possible to do something with Delphi's RTTI in this case (as we do for LogObject). I added it to our feature request list. If you are looking into logging an array of a specific type, you could also implement a custom logging routine. With newer versions of Delphi (I think since 2005 or 2006), you can implement so called helper classes which let you add new methods to existing classes. This way, it is quite simple to attach a new log method to the TSiSession class. An example of a helper class can be found here: http://www.gurock.com/support/forum/topic-144.html I'm happy to assist in implementing such a custom routine. |
|
#3 Mon Jul 21, 2008 8:25 am
|
|
|
Member
Registered: Jul 2008
Posts: 2
|
Ok.
I'l try the classhelper solution. (I'm primarily want to log only 1 or 2 array-types) Regards Claes Enskär |
Page: 1