discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] How can I display Window using StepTalk?


From: Matthew D Swank
Subject: Re: [Q] How can I display Window using StepTalk?
Date: Fri, 25 Feb 2005 13:13:59 -0600
User-agent: Mozilla Thunderbird 1.0 (X11/20050209)

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
chunsj@embian.com


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

|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]