Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-26 Thread cobines
2010/1/25 Michalis Kamburelis michalis.ka...@gmail.com: This is the way it's supposed to work in delphi mode, as far as I remember Delphi allows it (disclaimer: I don't have Delphi now to check, but it used to be so around Delphi 7). I see. I suspected as much, but wanted to make sure it's not

Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread Anthony Walter
No, the assignment shouldn't be allowed. The assignment to procedure of object should only be allowed from instances. SizeOf(TNotifyProc) = SizeOf(Pointer) * 2 See also: the TMethod record ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread Michalis Kamburelis
cobines wrote: everything is ok. But I can also assign it using class name: CM.Callback := TContextMenu.ContextMenuSelect; This is the way it's supposed to work in delphi mode, as far as I remember Delphi allows it (disclaimer: I don't have Delphi now to check, but it used to be so around