how to get a certain method signature

Coding Questions, IDE related or anything else

how to get a certain method signature

Postby udo.killermann » Fri May 07, 2010 5:55 am

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
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: how to get a certain method signature

Postby berndnoetscher » Fri May 07, 2010 8:45 am

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
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Re: how to get a certain method signature

Postby udo.killermann » Fri May 07, 2010 6:24 pm

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.
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: how to get a certain method signature

Postby berndnoetscher » Sun May 09, 2010 10:40 am

Hi Udo,

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

CU
Bernd
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am


Return to Objective-Basic (Xcode 3)

Who is online

Users browsing this forum: No registered users and 1 guest

cron