On Mar 25, 2007, at 11:45 AM, Theodore H. Smith wrote:

>
> On 25 Mar 2007, at 16:35, realbasic-nug-
> [EMAIL PROTECTED] wrote:
>
>> To: REALbasic NUG <[email protected]>
>> Message-ID: <[EMAIL PROTECTED]>
>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>>
>>
>> On Mar 25, 2007, at 10:32 AM, John Kubie wrote:
>>
>>>
>>> On Mar 25, 2007, at 9:49 AM, Charles Yeomans wrote:
>>>
>>>> What is it that you find confusing about the Dictionary interface?
>>>
>>> The first awkwardness is the apparent necessity to test for the
>>> existence of a key before getting the key-value combination
>>> Next, the word "key" is not used when getting a value associated  
>>> with
>>> a key.
>
> ElfDataDictionary doesn't impose this. You can just get value and if
> it doesn't exist, nil is returned.


But a REALbasic Dictionary allows one to store anything as a value,  
including nil.  That leaves no magic value to return when no entry  
with the specified key exists.  Raising a KeyNotFoundException is  
then the best response.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to