<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">On Tuesday 14 July 2009 07:30:55 am Michael Schnell wrote:<br>
> > MsgStr: string[20]; //Doesn't work<br>
><br>
> I suppose the string reference counting deletes the string before the<br>
> receiver gets the message.<br>
><br>
> -Michael<br>
> _______________________________________________<br>
> fpc-devel maillist - fpc-devel@lists.freepascal.org<br>
> http://lists.freepascal.org/mailman/listinfo/fpc-devel<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Looking at the results of the StringMessageTable function and looking at the contents of the TMsgStrTable record, the name member seems to point to the wrong data, sometimes it contains the name of a declared procedure, sometimes it appears to be be binary data. I am assuming that these records are not being constructed properly by the compiler.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>from objpash.inc<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><table border="0" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="2" cellpadding="0"><tr><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">type TMsgStrTable = record</span></p></td><td></td><td></td></tr><tr><td style=" vertical-align:top;"><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> name: </span><a href="http://www.freepascal.org/docs-html/rtl/system/pshortstring.html"><span style=" font-family:'Courier New,courier'; text-decoration: underline; color:#0057ae;">PShortString</span></a><span style=" font-family:'Courier New,courier';">;</span></p></td><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p></td><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Message name</p></td></tr><tr><td style=" vertical-align:top;"><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';"> method: pointer;</span></p></td><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p></td><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Method to call</p></td></tr><tr><td><p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'Courier New,courier';">end;</span></p></td><td></td><td></td></tr></table></body></html>