Re: Binding WOString to method with parameters
Re: Binding WOString to method with parameters
- Subject: Re: Binding WOString to method with parameters
- From: Randall Cayford <email@hidden>
- Date: Sun, 28 Mar 2004 11:08:25 -0800
At 6:54 PM -1000 3/25/04, Art Isbell wrote:
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?
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.
I see how to communicate from my table cell back to the page
component using WORepetition using the index key.
Is there a component which does this in a more general way? In other
words, is there some way to have a component (table cell, WOString,
whatever) set values in the page component? It seems very easy to
pull values from the page component for use in the subcomponent but I
can't see anyway to pass information the other way. Except for a
couple of specialized cases like the index in WORepetition.
Randall
_______________________________________________
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.