On Sun, 15 Apr 2007 23:01:28 +0200
Vincent Snijders <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to find out why the listview example doesn't load in the
> IDE on windows 64.
>
> I enabled and added some debugln's and got this information. The
> listview has an empty
>
> [TJITComponentList.ReaderError] "Error reading ImageList1.Bitmap:
> Access violation" ignoring=0
>
> Some more writelns told me the crash occurs when FOnChange(Self) is
> called in procedure TCustomImageList.Change;
>
> The value of TMethod(FOnChange).code points to a copy of the
> TPersistentWithTemplates.DoNothing procedure which is located on the
> heap. It is a place holder for procedure TForm1.ImageList1Change.
>
> Questions:
> * Is this code actually to be executed? Was it designed so that the
> IDE could execute this code at design time? I think the answer is yes.
Short answer: yes
Long answer: It is the really dirty hack in the IDE.
It was done, because assigning a 'real' TMethod to an event has the
advantage that all OI, RTTI and all streaming code work without hacks or
additions.
> * I tested on windows XP 64. Does anybody know if the 64 bits version
> of windows works differently in this respect than the 32 bits
> version? For example does it proctect the memory on the heap from
> execution?
If yes, then it is finally time to use the Delphi half Assigned trick
and to check and extend the whole OI, RTTI and Streaming code to support
this.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives