Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use a class, which may not be available



On Thursday, January 29, 2004, at 09:33 am, Stefan Pantke wrote:

Since never occurred previously, soma advice is needed.

If I would like to use

NSSortDescriptor

which is availbale on 10.3 as base of some new class , but not before,
how do I have to code, such that my code will not crash.

In a 10.2 environment, the respective part of code - which uses the SortDescriptor -
will not be called. Thus, no problem regarding message dispatching should
occur. Since some 10.3 callback will not be called in 10.2.

But how about linking? Will the app crash due to unresolved symbols?

in the MachORuntime.pdf and it says on page 18:

"Weak references, a feature introduced in Mac OS X 10.2, is useful for selectively implementing
features that may be available on some systems, but not on others. This mode of binding
allows a program to optionally bind to specified shared libraries. If the dynamic linker cannot
find definitions for weak references, it sets them to null and continues to load the program.
The program can check at runtime to see whether or not a reference is null, and if so, avoid
using the reference. You can specify both libraries and individual symbols to be
weakly-referenced."

note the bit about being able to weakly reference individual symbols. could be a good way of doing it?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >How to use a class, which may not be available (From: Stefan Pantke <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.