[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Recent key-value encoding changes to NSObject.
From: |
Manuel Guesdon |
Subject: |
Re: Recent key-value encoding changes to NSObject. |
Date: |
Mon, 11 Feb 2002 14:50:34 +0100 (CET) |
On Mon, 11 Feb 2002 09:45:33 +0000 Richard Frith-Macdonald <address@hidden>
wrote:
>|
>| The recent changes to key-value encoding in NSObject introduce five non
>| standard new methods
>| to the API which are not used by anything (apart from some EOF code I
>| guess) and make the
>| key-value coding methods less efficient.
>|
>| It seems to me that the derived objects for which these changes are
>| intended (which exist in a
>| separate framework), should actually be overriding the key-value
>| encoding methods of NSObject,
>| rather than the NSObject methods being hacked to call methods in the
>| derived objects.
>|
>| I therefore intend to revert the changes since it seems to me that the
>| required effect would
>| be more efficiently (and certainly more cleanly) be implemented
>| elsewhere.
I don't really agree because
- it make redundant code (with possible problem due to later non
synchronization of these two codes)
- AFAIK, KVC is not used in core or GUI part.
- today it's only used in EOF but it could be used elsewhere to add
support for ivar like storing mechanisms
(use of dictionaries, for example) or specific optimizations (hasing the ivar
names for example).
- EOF specifications don't say you have to derive your objects from
EOGenericRecord and it
could be nice to have a minimum coding to make objects storing things in
dictionaries or something else without
having to rewrite the whole KVC functions
- I think Apple has the same kind of 'hack'
- the loss of efficiency (this adds only 2 methods call) is IMHO not
very high compared to the whole KVC process
(GSInstanceVariableInfo have a while loop to iterate on ivars and do a strcmp
on each ivar name). IMHO, a better way to improve the
previous and existing KVC part may be to make only one call to
GSInstanceVariableInfo instead of the actual 2 calls.
Manuel
--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <address@hidden>
14 rue Jean-Baptiste Clement - 93200 Saint-Denis - France
Tel: +33 1 4940 0999 - Fax: +33 1 4940 0998
- Recent key-value encoding changes to NSObject., Richard Frith-Macdonald, 2002/02/11
- Re: Recent key-value encoding changes to NSObject.,
Manuel Guesdon <=
- Re: Recent key-value encoding changes to NSObject., Nicola Pero, 2002/02/11
- Re: Recent key-value encoding changes to NSObject., Richard Frith-Macdonald, 2002/02/11
- Re[2]: Recent key-value encoding changes to NSObject., Manuel Guesdon, 2002/02/11
- Re: Re[2]: Recent key-value encoding changes to NSObject., Richard Frith-Macdonald, 2002/02/11
- Re: Re[2]: Recent key-value encoding changes to NSObject., Nicola Pero, 2002/02/11
- Re[4]: Recent key-value encoding changes to NSObject., Manuel Guesdon, 2002/02/11
- Re: Re[4]: Recent key-value encoding changes to NSObject., Nicola Pero, 2002/02/11
- Re[6]: Recent key-value encoding changes to NSObject., Manuel Guesdon, 2002/02/11
- Re: Re[6]: Recent key-value encoding changes to NSObject., Nicola Pero, 2002/02/11
- Re[8]: Recent key-value encoding changes to NSObject., Manuel Guesdon, 2002/02/11