Re: Binding WOString to method with parameters
Re: Binding WOString to method with parameters
- Subject: Re: Binding WOString to method with parameters
- From: Art Isbell <email@hidden>
- Date: Thu, 25 Mar 2004 18:54:05 -1000
On Mar 25, 2004, at 6:33 PM, Randall Cayford wrote:
So, is there any way to bind a WOString to a function with arguments?
No.
If I can't do functions with arguments, I could have a class instance
variable instead:
int currentLane;
int getSpeed() {
return(speed[currentLane]);
}
But then how do I wrap the WOString in something which allows me to
set the currentLane variable for the particular cell?
I could even put the cells in a WORepetition which loops from 1 to 5
but then how do I get a repetition to loop through a count instead of
a list of objects and how do I set the instance variable to the
repetition count?
A WORepetition has an "index" key that can be bound to your
"currentLane" instance variable (0- not 1-based). Then with your
WOStrings' value keys bound to "getSpeed", your cells should be
appropriately populated.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.