Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
call method with variable nr of arguments
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
GiddeonZeix  
View profile  
 More options Jan 18 2010, 7:34 pm
From: GiddeonZeix <o...@hno3.com>
Date: Mon, 18 Jan 2010 16:34:36 -0800 (PST)
Local: Mon, Jan 18 2010 7:34 pm
Subject: call method with variable nr of arguments
Hello everybody

i wonder if it is possible to call a method defined in Obj-C
for example NSString stringWithFormat , from F-Script

for example:

nrOfItems := 99
myString := NSString stringWithFormat:'i count %d items',nrOfItems

it works with only one parameter like:
       myString := NSString stringWithFormat:'i count %d items'

but i would like to pass multiple parameters

some cocoa classes have such methods

does someone know how to do this  ?

thank you in advance


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Ferry  
View profile  
 More options Jan 19 2010, 3:18 am
From: Ken Ferry <kenfe...@gmail.com>
Date: Tue, 19 Jan 2010 08:18:50 +0000
Local: Tues, Jan 19 2010 3:18 am
Subject: Re: [F-Script] call method with variable nr of arguments

Hi Giddeon,

No, F-Script doesn't support calling methods that take a variable number of
arguments at the moment.

For formatting you can use the ++ string concatenation operator:

> myString := 'I count ' ++ (nrOfItems description) ++ ' items'

Getting a little fancier, you could consider the following if you thought it
read better:

> {'I count ', nrOfItems, ' items'} @ description \#++

-Ken


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »