Sungjin Chun wrote:
Thank you for your kind help, and would you mind sending me some small
example on this if you make success? I can understand Gorm/nib bundle
part. But cannot figure our surely on controller part.
Thanks in advance.
On Feb 25, 2005, at 04:51 AM, Matthew D Swank wrote:
You could also possibly use Gorm. One thing I am currently
experimenting with is compiling a Gorm gui as a Bundle instead of an
App, and making the controller just a place-holder that can take a
delegate at runtime.
Matt
--------------------------------------------------
Sungjin Chun, Developer
Embian
[EMAIL PROTECTED]
Well I still don't know a lot about Gorm, but I believe you could have a
controller as simple as:
|#import<Foundation/Foundation.h>
@interface Controller : NSObject
{
id _delegate;
}
-initWithDelegate: delegate;
@end
@implementation Controller
-initWithDelegate: delegate;
{
ASSIGN(_delegate,delegate);
return [self init];
}
-(void)forwardInvocation:(NSInvocation *)invocation
{
SEL aSelector = [invocation selector];
if (_delegate && [_delegate respondsToSelector:aSelector])
[invocation invokeWithTarget:_delegate];
else
[self doesNotRecognizeSelector:aSelector];
}
-(NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector
{
if(_delegate)
return [_delegate methodSignatureForSelector:aSelector];
else
[self doesNotRecognizeSelector:aSelector];
}
@end
|
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep