Page 1 of 1

how to get a certain method signature

PostPosted: Fri May 07, 2010 5:55 am
by udo.killermann
Dear Forum,

i need to provide the following Objective-C method signature within my Application delegate:
Code: Select all
- (BOOL)application:(NSApplication *)sender delegateHandlesKey:(NSString *)key


What do I need to do in a declare in order to achieve this? I have tried several things and by looking in the resulting Objective-C header I can tell it doesn't work for me.

Kind regards,
Udo

Re: how to get a certain method signature

PostPosted: Fri May 07, 2010 8:45 am
by berndnoetscher
Hi Udo,

as all variables are declared as id by the ObjB-Compiler, it addtional declares wrappesr to get the right calls for delegates known by the ObjB-Compiler. Doing this by yourself is not possible yet. The following code will work, with the next update coming by the end of the next week.

CU
Bernd

Code: Select all
Delegate application(sender As NSApplication, delegateHandlesKey:=key As NSString) As Boolean

' in order to get:
- (BOOL)application:(NSApplication *)sender delegateHandlesKey:(NSString *)key

Re: how to get a certain method signature

PostPosted: Fri May 07, 2010 6:24 pm
by udo.killermann
Hi Bernd,

thanks for your answer. Good to hear this will be supported very soon. I just started to experiment application scriptabilty and for this a need the mentioned signature. I'll postpone my experiments for a week or so.

Enjoy your weekend
Udo

BTW: using Objective Basic I can tackle with a lot of things I didn't try using Objective-C - this language gives me a very nice lab environment with fast turn arround times. Thanks for this effort.

Re: how to get a certain method signature

PostPosted: Sun May 09, 2010 10:40 am
by berndnoetscher
Hi Udo,

by testing ObjB you already have given me important feedback. Thanks for your help.

CU
Bernd