[Adium-devl] AIApplicationAdditions changes in [20513] / [20515] / [20517]
Elliott Harris
excitebike at mac.com
Fri Aug 10 23:10:36 UTC 2007
On Aug 10, 2007, at 5:31 PM, Evan Schoenberg wrote:
> 1.
> What are these changes for? We've gone from single mathematical
> operation (a constant compared to a constant) to loading a file
> from disk, parsing it to a dictionary, extracting a string from
> the dictionary, creating an array out of it, then comparing values
> from that array.
>
The changes are designed to move us away from using the AppKit
version number for checking OS version. This accomplishes two things.
First, it lets us test for a particular version number or a
particular OS version without using Gestalt. Second, it lets us do
this without depending on version numbers which might be NDA'd. The
goal is to be able to recognize Leopard in certain situations, so
that we can handle things more easily. It's a bit more costly, but
gives us more control.
> 2.
> For higher == YES,
> if(major >= majorVersion || (major >= majorVersion && minor >=
> minorVersion) || (major >= majorVersion && minor >= minorVersion &&
> point >= pointVersion))
>
> The major >= majorVersion within each OR is duplicative - you hit
> it initially. I think you probably meant:
> if(major >= majorVersion || (major == majorVersion && minor >=
> minorVersion) || (major == majorVersion && minor == minorVersion &&
> point >= pointVersion))
>
> but i'm not positive.
Right on, I forgot to change those when copying. Thanks for spotting it.
>
> 3.
> isTiger returns NO on any version of 10.4 later than 10.4.0.
> Similarly for isLeopard and 10.5. For what purpose do we need to
> know if the user is on a particular OS?
>
Obviously, point release checking is a bit of overkill, but it's a
lot nicer than having to string up Gestalt code everytime you need to
check the OS version. Moving forward, I suspect that a fair amount of
code will be split between Tiger and Leopard versions for the sake of
taking advantage of some of the new excellent Leopard APIs. However,
since we have no planned version to go 10.5 only, a good API for
testing these changes and completely distinguishing between the two
versions, and not just checking for whether we are better than a
certain version seemed necessary.
It may be hard to see the use now, but I feel that having a solid and
thorough API for version checking can make working between two OS
versions a lot easier.
Assuming you are OK with the API changes, I'll push in fixes for both
issues. Sorry about the trouble, last time I implemented this type of
API, we didn't need to worry about point version.
> Cheers,
> Evan
Cheers,
Elliott
> _______________________________________________
> Adium-devl mailing list
> Adium-devl at adiumx.com
> http://adiumx.com/mailman/listinfo/adium-devl_adiumx.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20070810/c1b9ab0b/attachment-0001.html>
More information about the devel
mailing list