> On Nov 1, 2020, at 8:45 AM, Zoë Peterson via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> I'd like to have a generic objcclass that would add some extra functionality 
> for multiple base types.  I don't have a lot of experience with generics, but 
> this compiles:
> 

Waiting for Jonas to reply but I'm pretty certain this is a feature never 
implemented. I've been working with generics in the compiler recently and I 
don't see any reason why they would be hard to implement but maybe Jonas knows 
the answer.

What are you trying to do exactly? There are categories in ObjC but those don't 
allow fields (they're like helpers in Object Pascal). If you need to share data 
between a bunch of different NSView subclasses then all you can do is make a 
common subclass or make the shared data a class of its own and pass that into 
all your subclasses. Nothing ObjC related about that however but I'm not sure 
what you're trying to do.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to