Skip to content

Instantly share code, notes, and snippets.

@jagipson
Created July 7, 2010 13:42
Show Gist options
  • Select an option

  • Save jagipson/466706 to your computer and use it in GitHub Desktop.

Select an option

Save jagipson/466706 to your computer and use it in GitHub Desktop.
- (@action)reltypeClick:(id)sender
{
var button;
var direction;
switch ([sender tag]) {
case 1:
direction = reltypeaDirBA;
button = reltypeaDirToggle;
break;
case 2:
direction = reltypebDirBA;
button = reltypebDirToggle;
break;
case 3:
direction = reltypeabDirBA;
button = reltypeabDirToggle;
break;
default:
CPLog(@"No match for %@", [sender tag]);
}
console.log(button);
CPLog ("reltypeaDirBA = " + reltypeaDirBA);
if (direction) {
[button setTitle:relationshipTypes[([sender indexOfSelectedItem])].label_a_b];
} else {
[button setTitle:relationshipTypes[([sender indexOfSelectedItem])].label_b_a];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment