tag:blogger.com,1999:blog-6977069.post109113387249118841..comments2022-10-27T11:40:01.409+02:00Comments on Hallvard's Blog: Hack #7: Interface to Object [in The Delphi Magazine]Hallvards New Bloghttp://www.blogger.com/profile/09527199955524812466noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-6977069.post-12749931815235246632015-09-11T12:10:00.463+02:002015-09-11T12:10:00.463+02:00This comment has been removed by a blog administrator.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-84541567465399867092013-01-24T09:41:15.144+01:002013-01-24T09:41:15.144+01:00Thank you for your quick answer.Thank you for your quick answer.m2studiohttps://www.blogger.com/profile/16527136620026698848noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-6086378866101767652013-01-24T09:10:56.419+01:002013-01-24T09:10:56.419+01:00You probably have strict pointer types turned on i...You probably have strict pointer types turned on in compiler options - you can probably compile the code by changing it to:<br /><br /> Result := TObject(Pointer(I));<br />Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-68038829357851158232013-01-24T09:06:53.235+01:002013-01-24T09:06:53.235+01:00I tried this code but it cannot was compiled in my...I tried this code but it cannot was compiled in my machine. <br /><br />Incompatible types: 'TObject' and '_Pointer' << compiled error in the line below:<br />Result := Pointer(I);<br /><br />How do I fix it ?m2studiohttps://www.blogger.com/profile/16527136620026698848noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-65956100383242264602013-01-24T09:06:35.189+01:002013-01-24T09:06:35.189+01:00This comment has been removed by the author.m2studiohttps://www.blogger.com/profile/16527136620026698848noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-68318007097860736802012-06-13T14:46:44.120+02:002012-06-13T14:46:44.120+02:00Note also that for later versions of Delphi (since...Note also that for later versions of Delphi (since Delphi 2005 AFAIR), you have the "as" operator. See my own version in http://blog.synopse.info/post/2012/06/13/Retrieve-the-object-instance-from-an-interfaceArnaudhttps://www.blogger.com/profile/00421394020248758254noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-51369382974091271562011-08-16T22:40:23.608+02:002011-08-16T22:40:23.608+02:00Man, that was exactly what I needed! Thanx a lot!Man, that was exactly what I needed! Thanx a lot!Robson Bragahttps://www.blogger.com/profile/14564995651325300596noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-6701019153270037572011-06-29T08:04:03.574+02:002011-06-29T08:04:03.574+02:00Note to those wanting to use this hack in newer ve...Note to those wanting to use this hack in newer versions of Delphi (2009+): You must change the two occurrences of PChar to PAnsiChar, otherwise you will get twice the increment (PChar is 2 bytes now by default).Cenizahttps://www.blogger.com/profile/13711461089780429660noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-39641654068888631552007-06-22T10:57:00.000+02:002007-06-22T10:57:00.000+02:00Now I understand the reference to "The Delphi Maga...Now I understand the reference to "The Delphi Magazine" which I though was dead: it is dead, it's just DelphiFeeds picking up your old articles because you're changing your site! :)Fernando Madrugahttps://www.blogger.com/profile/07296473246062338124noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-35188237919694107782007-06-22T10:47:00.000+02:002007-06-22T10:47:00.000+02:00I prefer black as my background color in the text ...I prefer black as my background color in the text editor: less straining on my eyes for prolonged coding sessions! :)<BR/><BR/>Similar, but not exactly equal, to the Twilight color scheme: I start with that scheme then make a couple changes...<BR/><BR/>But, for display in a webpage, this TP classic style has a bit more oomph...Fernando Madrugahttps://www.blogger.com/profile/07296473246062338124noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-20540253580982128582007-06-18T00:11:00.000+02:002007-06-18T00:11:00.000+02:00>Actually they're the original Turbo >Pascal (and ...>Actually they're the original Turbo >Pascal (and TC) colors (says an >old-enough-to-have-actually-been-a-programmer-before-Delphi-existed >programmer ) :-)<BR/><BR/>I still use them in delphi, cause I'm so used to the TP colors. *chuckle*Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-1098775343430309722004-10-26T09:22:00.000+02:002004-10-26T09:22:00.000+02:00John,
Indeed - that's what I say in the TDM arti...John, <br /><br />Indeed - that's what I say in the TDM article as well ;). And I show how to solve it the clean way. This is a last-resort hack when there so no other way to perform a task.Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-1098740314317626552004-10-25T23:38:00.000+02:002004-10-25T23:38:00.000+02:00First, I must add a disclaimer to the fact that I ...First, I must add a disclaimer to the fact that I did not read The Delphi Magazine article, but I agree with you that it has the best content for the price.<br /><br />The hack is certainly 'cool' and will be a hack solution in some cases... but in this is not a good thing to use because the whole objective of interfaces is to hide the implimentation from the user of the interface. If you John Ehttps://www.blogger.com/profile/05176272788321417660noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-1094820902513443382004-09-10T14:55:00.000+02:002004-09-10T14:55:00.000+02:00> I like the classic Delphi colors ;).
Actually th...> I like the classic Delphi colors ;).<br />Actually they're the original Turbo Pascal (and TC) colors (says an old-enough-to-have-actually-been-a-programmer-before-Delphi-existed programmer ) :-)<br /><br />Matthijs Hebly, The NetherlandsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6977069.post-1091734252680052722004-08-05T21:30:00.000+02:002004-08-05T21:30:00.000+02:00So? Sue me...! :-P
Seriously, that does sound lik...So? Sue me...! :-P<br /><br />Seriously, that does sound like a bug in your RSS reader?<br /><br />I like the classic Delphi colors ;).Hallvards New Bloghttps://www.blogger.com/profile/09527199955524812466noreply@blogger.comtag:blogger.com,1999:blog-6977069.post-1091712956386776792004-08-05T15:35:00.000+02:002004-08-05T15:35:00.000+02:00It doesn't look good in a RSS aggregator, such as ...It doesn't look good in a RSS aggregator, such as SharpReader. Appears black on blue. Very very hard to read.<br /><br />Chee Wee. ;o)Anonymousnoreply@blogger.com