/Frameworks/AppKit/rhino.platform/_CPCibConnector.j

http://github.com/jfahrenkrug/MapKit-HelloWorld · Unknown · 73 lines · 73 code · 0 blank · 0 comment · 0 complexity · 3ff2b2b595dd057da0f597a48605c10e MD5 · raw file

  1. I;21;Foundation/CPObject.jI;29;Foundation/CPKeyValueCoding.jc;3017;
  2. var _1="_CPCibConnectorSourceKey",_2="_CPCibConnectorDestinationKey",_3="_CPCibConnectorLabelKey";
  3. var _4=objj_allocateClassPair(CPObject,"_CPCibConnector"),_5=_4.isa;
  4. class_addIvars(_4,[new objj_ivar("_source"),new objj_ivar("_destination"),new objj_ivar("_label")]);
  5. objj_registerClassPair(_4);
  6. objj_addClassForBundle(_4,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  7. class_addMethods(_4,[new objj_method(sel_getUid("replaceObjects:"),function(_6,_7,_8){
  8. with(_6){
  9. var _9=_8[objj_msgSend(_source,"hash")];
  10. if(_9!==undefined){
  11. _source=_9;
  12. }
  13. _9=_8[objj_msgSend(_destination,"hash")];
  14. if(_9!==undefined){
  15. _destination=_9;
  16. }
  17. }
  18. })]);
  19. var _4=objj_getClass("_CPCibConnector");
  20. if(!_4){
  21. objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"_CPCibConnector\""));
  22. }
  23. var _5=_4.isa;
  24. class_addMethods(_4,[new objj_method(sel_getUid("initWithCoder:"),function(_a,_b,_c){
  25. with(_a){
  26. _a=objj_msgSendSuper({receiver:_a,super_class:objj_getClass("CPObject")},"init");
  27. if(_a){
  28. _source=objj_msgSend(_c,"decodeObjectForKey:",_1);
  29. _destination=objj_msgSend(_c,"decodeObjectForKey:",_2);
  30. _label=objj_msgSend(_c,"decodeObjectForKey:",_3);
  31. }
  32. return _a;
  33. }
  34. }),new objj_method(sel_getUid("encodeWithCoder:"),function(_d,_e,_f){
  35. with(_d){
  36. objj_msgSend(_f,"encodeObject:forKey:",_source,_1);
  37. objj_msgSend(_f,"encodeObject:forKey:",_destination,_2);
  38. objj_msgSend(_f,"encodeObject:forKey:",_label,_3);
  39. }
  40. })]);
  41. var _4=objj_allocateClassPair(_CPCibConnector,"_CPCibControlConnector"),_5=_4.isa;
  42. objj_registerClassPair(_4);
  43. objj_addClassForBundle(_4,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  44. class_addMethods(_4,[new objj_method(sel_getUid("establishConnection"),function(_10,_11){
  45. with(_10){
  46. var _12=_label;
  47. if(!objj_msgSend(_12,"hasSuffix:",":")){
  48. _12+=":";
  49. }
  50. var _13=CPSelectorFromString(_12);
  51. if(!_13){
  52. objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"-["+objj_msgSend(_10,"className")+" "+_11+"] selector "+_12+" does not exist.");
  53. }
  54. if(objj_msgSend(_source,"respondsToSelector:",sel_getUid("setAction:"))){
  55. objj_msgSend(_source,sel_getUid("setAction:"),_13);
  56. }else{
  57. objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"-["+objj_msgSend(_10,"className")+" "+_11+"] "+objj_msgSend(_source,"description")+" does not respond to setAction:");
  58. }
  59. if(objj_msgSend(_source,"respondsToSelector:",sel_getUid("setTarget:"))){
  60. objj_msgSend(_source,sel_getUid("setTarget:"),_destination);
  61. }else{
  62. objj_msgSend(CPException,"raise:reason:",CPInvalidArgumentException,"-["+objj_msgSend(_10,"className")+" "+_11+"] "+objj_msgSend(_source,"description")+" does not respond to setTarget:");
  63. }
  64. }
  65. })]);
  66. var _4=objj_allocateClassPair(_CPCibConnector,"_CPCibOutletConnector"),_5=_4.isa;
  67. objj_registerClassPair(_4);
  68. objj_addClassForBundle(_4,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  69. class_addMethods(_4,[new objj_method(sel_getUid("establishConnection"),function(_14,_15){
  70. with(_14){
  71. objj_msgSend(_source,"setValue:forKey:",_destination,_label);
  72. }
  73. })]);