Hi Folks, hoping someone who understands this better than me can point me in right direction.
While chasing a bug in RichMemo on Mac, that is, why GetTextLen does not work, I realised it also does not work for TMemo. So, following the code I determined that the issue is in
lcl/interfaces/cocoa/cocoaWSCommon # 1762 TCocoaWSWinControl.GetTextLen(),
obj: NSObject;
...
obj := NSObject(AWinControl.Handle);
Result := obj.isKindOfClass_(NSControl); // returns false
Decides that the passed handle is not a NSControl and exits. Neither TRichMemo nor TMemo are NSControls and GetTextLen does not work. Thats does not surprise me. But I found that TEdit and TLabel work fine, they are NSControls. Surprise.
So, my question, how does a component, descended from TComponent, get to be a NSControl in Apple speak ?
NSControl, NSObject and obj.isKindOfClass_() are imported from Apple Object C headers.
And pointers gratefully received.
Davo