Skip navigation.
 
mlRe: "weak link" framework refs for 10.1 compatibility?
FROM : Rosyna
DATE : Sun Nov 10 20:47:53 2002

Ack, at 11/10/02, Ondra Cada said:

>>    if (NSClassFromString(@"RKAlias")==NULL)
>
>For a class there is the "Nil" constant -- "NULL" belongs to pointers.


There's really no difference. I've always used NULL since it's
defined in plain old C. Then again, I don't use nil either.

    #define nil 0
    #define NULL 0
    #define Nil 0

The only person it matters to is the person reading the code.

>>    {
>>
>>    NSBundle* rkBundle=[NSBundle bundleWithPath:[NSString
>>stringWithFormat:@"%@/%@",[thisBundle

>
>It's not that good to create paths manually this way. See
>stringByAppendingPathComponent: and similar methods.


I could, but what exactly would be the difference?

>
>>privateFrameworksPath],@"Protocol7Additions.framework"]];
>>    [rkBundle load];
>>    RKAliasClass=NSClassFromString(@"RKAlias");

>
>This line seems to be kinda superfluous, since...
>

>>    }
>>    RKAliasClass=(NSClassFromString(@"RKAlias"));

>
>...this is performed immediately afterwards. Also, why the parentheses?!?


I... have... no... clue. I didn't even see that extra
NSClassFromString() It's completely useless. Thanks for pointing it
out. I think it's a relic from when I was printing it out...
NSLog(@"%@",NSStringFromClass(NSClassFromString(@"RKAlias))) would
tell me if the class was loaded, the %@ was so NSLog would print
(null) if it wasn't.

>That all said, the general pattern is quite sound, although I would
>rather encapsulate it this way:


<snip>

But what if the class hasn't been loaded?
--


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People
---

Please include any previous correspondence in replies, it helps me
remember what we were talking about. Thanks.
_______________________________________________
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