Re: Loading external code
Re: Loading external code
- Subject: Re: Loading external code
- From: Thilo Ettelt <email@hidden>
- Date: Tue, 28 May 2002 21:47:49 +0200
Vars: NSBundle *aBundle, Class aClass, id trayClass
aBundle = [[NSBundle alloc] initWithPath:thePath];
if (aClass = [aBundle principalClass]) {
trayClass = [[aClass alloc] init];
[allTrays addObject:trayClass];
[trayview addSubview:[allTrays objectAtIndex:i]];
NSLog(@"%@",allTrays);
[trayClass release];
if (![[allTrays objectAtIndex:i] view]) {
NSLog(@"There is no view");
}
}
[aBundle release];
When the code goes further....
and I call [window close] (window is an outlet in my maincontroller and
there's no equal outlet in the loaded code) PB tells me that the
selector [tray window] (tray is the principas class of the external
bundle) was not recognized.
Am Dienstag den, 28. Mai 2002, um 21:20, schrieb Ondra Cada:
On Tuesday, May 28, 2002, at 09:15 , Thilo Ettelt wrote:
When I want to load a bundle's class. Do I have to load it into a
different class in my app? I have noticed that when I load it in my
main controller all messages go surprisingly to the loaded class.
Ahem... *how* do you load it?
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.
_______________________________________________
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.