Skip navigation.
 
mlRe: "weak link" framework refs for 10.1 compatibility?
FROM : Marco Scheurer
DATE : Sat Nov 09 16:40:37 2002

On Friday, November 8, 2002, at 11:17 AM, Bill Cheeseman wrote:
> The bottom line, as I understand it, is that an application using C
> constants that are new in 10.2 will not launch in 10.1.x or earlier.
> Checking the system version to branch around them will not work,
> because the
> loader tries to load them all at once, up front.


Is that true? The following code, in a category of NSTextField,
compiled on 10.2 does not break on 10.1.x (text field is not rounded).

- (void) beRounded
{
   if (IsJaguarOrLater()) {
       [self setBezeled:YES];
       [self setBezelStyle:NSTextFieldRoundedBezel];
   }
}

Not only the NSTextFieldRoundedBezel constant, but also the
setBezelStyle method are new to 10.2. These are defined in
NSTextFieldCell and NSTextField like this:

#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
typedef enum {
    NSTextFieldSquareBezel  = 0,
    NSTextFieldRoundedBezel = 1
} NSTextFieldBezelStyle;
#endif


#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2
- (void)setBezelStyle:(NSTextFieldBezelStyle)style;
- (NSTextFieldBezelStyle)bezelStyle;
#endif


And IsJaguarOrLater uses Gestalt to get the OS version:

BOOL IsJaguarOrLater()
{
   unsigned long os_version = 0;
   Gestalt (gestaltSystemVersion, &os_version);
   return (os_version >= 0x1020);
}

Marco Scheurer
Sen:te, Lausanne, Switzerland    http://www.sente.ch
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
ml"weak link" framework refs for 10.1 compatibility? Dan Wood Nov 7, 20:20
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 8, 11:17
mlRe: "weak link" framework refs for 10.1 compatibility? Dan Wood Nov 9, 16:02
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 9, 16:31
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 9, 16:40
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 9, 19:35
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 9, 19:38
mlRe: "weak link" framework refs for 10.1 compatibility? Jonathan Hendry Nov 9, 20:55
mlRe: "weak link" framework refs for 10.1 compatibility? Nicholas Riley Nov 10, 03:17
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 05:30
mlRe: "weak link" framework refs for 10.1 compatibility? Sam Griffith Nov 10, 06:56
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 08:39
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 10, 11:10
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 13:38
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 16:30
mlRe: "weak link" framework refs for 10.1 compatibility? Piers Uso Walter Nov 10, 18:34
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 20:21
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 20:27
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 10, 20:47
mlRe: "weak link" framework refs for 10.1 compatibility? Sam Griffith Nov 10, 21:56
mlRe: "weak link" framework refs for 10.1 compatibility? Finlay Dobbie Nov 10, 22:12
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 10, 22:29
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 10, 23:45
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 01:11
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 11, 11:07
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 11, 12:23
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 14:52
mlRe: "weak link" framework refs for 10.1 compatibility? Marco Scheurer Nov 11, 17:27
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 18:11
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 11, 20:51
mlRe: "weak link" framework refs for 10.1 compatibility? Ondra Cada Nov 11, 22:14
mlRe: "weak link" framework refs for 10.1 compatibility? Bill Cheeseman Nov 12, 00:37
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:40
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:43
mlRe: "weak link" framework refs for 10.1 compatibility? Rosyna Nov 12, 01:45