[Adium-devl] Calling -formattedUID on AIMetacontact returns nil
George Armah
armahg at gmail.com
Wed Feb 6 16:53:52 UTC 2008
Augie Fackler wrote:
> On Feb 6, 2008, at 9:54 AM, George Armah wrote:
>
>
>> Hello Adium-devs,
>> as the subject of the email and the following comment from
>> AIMetaContact.m indicate ,
>> for a metaContact, "//FormattedUID will return nil if we have multiple
>> different UIDs contained within us".
>>
>> This is causing a window to fail to display in my plugin if a user
>> selects a metaContact.
>> I wanted to know if there was any special reason for the above
>> behavior.
>>
>
> My guess: so that code asking for formattedUIDs will fail if it gets a
> meta. Honestly, I think it might be wiser for us to raise an exception
> in AIMetaContact's -formattedUID. Then again, I'm a lunatic.
>
>
>> If not would any of the following behaviors be acceptable ?:
>>
>> Return the formttedUID's associated with the primary service or
>> preferredContact for the MetaContact
>> (the one that is displayed in the contact list window)
>> or
>> Return an NSArray of NSStrings containing the formattedUID's for the
>> listContacts contained in that
>> metaContact.
>>
>
> The problem with these solutions (as I see it) is that -formattedUID
> only really has meaning on a service, and without the service
> information a formattedUID just looks pretty.
> Why not just check for nil and if you got nil just do [[meta
> preferredContact] formattedUID]?
>
> Peace,
> Augie
>
>
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
>
>
I did rewrite my code to handle the metaContact case immediately after
sending this email.
I was just curious as to the reasons for the current AIMetaContact
behavior and you answered my questions so I think
I'm satisfied for now. I still personally think the method should return
something or do something else
other than just returning nil.
Thanks for your responses!
George.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080206/deae1870/attachment-0001.html>
More information about the devel
mailing list