Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-02

Adding Mac specific functionality

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus.

I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux.

Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X.

     {$ifdef DARWIN}
     NSTextView(Memo1.Handle).setFocusRingType(NSFocusRingTypeNone);
     {$endif}

Regards,
Ryan Joseph

Reply by email

Ryan Joseph
to Ryan Joseph

I submitted a patch to correct the problem. WantsTab property of TMemo should affect the focus ring on Mac.

https://bugs.freepascal.org/view.php?id=35016

Show quoted text 20 lines
On Feb 5, 2019, at 9:24 AM, Ryan Joseph via lazarus wrote: I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus. I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux. Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X. {$ifdef DARWIN} NSTextView(Memo1.Handle).setFocusRingType(NSFocusRingTypeNone); {$endif} Regards, Ryan Joseph -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

Regards,
Ryan Joseph

Reply by email