Re: [Lazarus] LCL Cocoa: Overriding delegate protocols

2016-10-21 Thread Graeme Geldenhuys via Lazarus
On 2016-10-13 17:13, Zoë Peterson via Lazarus wrote:
> It seems like the fix 
> would be to move all of the CreateHandle code into a method in 
> TCocoaWindow (possibly init)

I'm not a core Lazarus developer, but your suggestion does sound like a
good solution without down sides. One method doing multiple things is
never a good design choice, so splitting it up definitely seems the
right way to go.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] LCL Cocoa: Overriding delegate protocols

2016-10-13 Thread Zoë Peterson via Lazarus
I need to handle some delegate protocols in our application layer, which 
will require overriding things that the LCL Cocoa layer already 
implements in classes like TCocoaWindow.


In the Carbon interface, the equivalent was fairly easy, since 
TCarbonWSCustomForm.CreateHandle just creates a TCarbonWindow and passes 
it back, so it's trivial to implement a new CreateHandle that returns my 
descendant.  TCocoaWSCustomForm.CreateHandle, on the other hand, creates 
a TCocoaWindow and then does a bunch of extra work to set that window up.


I'd really rather not duplicate the entirety of TCocoaWS*.CreateHandle, 
especially since the interface is still immature.  It seems like the fix 
would be to move all of the CreateHandle code into a method in 
TCocoaWindow (possibly init), and if that's the case, we can certainly 
look into a patch to do that, but I'd like some direction from the devs 
first.


Thanks,

Zoë Peterson
Scooter Software

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus