Hello Jim,
You can use the "isChecked" binding to do this.
For example, bind it to a method named "companyIsInArray". Assume
your WORepetition's "item" binding is set to "currentCompany", and
the destination (mutable) array is called "companyArray". Then write
something like (warning, not debugged!):
public boolean companyIsInArray() {
return companyArray.containsObject( currentCompany );
}
public void setCompanyIsInArray( boolean value ) {
if( value && !companyIsInArray() ) {
companyArray.addObject( currentCompany );
}
if( !value && companyIsInArray() ) {
companyArray.removeObject( currentCompany );
}
}
This would do what you want.
Regards,
Mark
On Feb 24, 2006, at 11:34 PM, Jim Wong wrote:
I want to display a list of objects from entity COMPANY. the list
will be displayed using WORepetition. Each line will contain the
companyName and a WOCheckBox. When "GO" button is clicked, I want
to pass all the selections into a NSMutableArray. But I dunno how
to code this. ANyone can help? Thanks.
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/markm%
40onpointsoftware.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]