PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/Frameworks/AppKit/browser.platform/_CPCibObjectData.j

http://github.com/jfahrenkrug/MapKit-HelloWorld
Unknown | 139 lines | 139 code | 0 blank | 0 comment | 0 complexity | bebdc0e88143fa0f542a98b953b89c51 MD5 | raw file
  1I;20;Foundation/CPArray.jI;21;Foundation/CPObject.jI;21;Foundation/CPString.ji;7;CPCib.ji;17;_CPCibConnector.jc;6115;
  2var _1=objj_allocateClassPair(CPObject,"_CPCibObjectData"),_2=_1.isa;
  3class_addIvars(_1,[new objj_ivar("_namesKeys"),new objj_ivar("_namesValues"),new objj_ivar("_accessibilityConnectors"),new objj_ivar("_accessibilityOidsKeys"),new objj_ivar("_accessibilityOidsValues"),new objj_ivar("_classesKeys"),new objj_ivar("_classesValues"),new objj_ivar("_connections"),new objj_ivar("_fontManager"),new objj_ivar("_framework"),new objj_ivar("_nextOid"),new objj_ivar("_objectsKeys"),new objj_ivar("_objectsValues"),new objj_ivar("_oidKeys"),new objj_ivar("_oidValues"),new objj_ivar("_fileOwner"),new objj_ivar("_visibleWindows"),new objj_ivar("_replacementObjects")]);
  4objj_registerClassPair(_1);
  5objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  6class_addMethods(_1,[new objj_method(sel_getUid("init"),function(_3,_4){
  7with(_3){
  8_3=objj_msgSendSuper({receiver:_3,super_class:objj_getClass("CPObject")},"init");
  9if(_3){
 10_namesKeys=[];
 11_namesValues=[];
 12_classesKeys=[];
 13_classesValues=[];
 14_connections=[];
 15_framework="";
 16_nextOid=[];
 17_objectsKeys=[];
 18_objectsValues=[];
 19_oidKeys=[];
 20_oidValues=[];
 21_fileOwner=nil;
 22_visibleWindows=objj_msgSend(CPSet,"set");
 23}
 24return _3;
 25}
 26}),new objj_method(sel_getUid("mainMenu"),function(_5,_6){
 27with(_5){
 28var _7=objj_msgSend(_namesValues,"indexOfObjectIdenticalTo:","MainMenu");
 29if(_7===CPNotFound){
 30_7=objj_msgSend(_namesValues,"indexOfObjectIdenticalTo:","Main Menu");
 31if(_7===CPNotFound){
 32return nil;
 33}
 34}
 35return _namesKeys[_7];
 36}
 37}),new objj_method(sel_getUid("displayVisibleWindows"),function(_8,_9){
 38with(_8){
 39var _a=nil,_b=objj_msgSend(_visibleWindows,"objectEnumerator");
 40while(_a=objj_msgSend(_b,"nextObject")){
 41objj_msgSend(_replacementObjects[objj_msgSend(_a,"hash")],"makeKeyAndOrderFront:",_8);
 42}
 43}
 44})]);
 45var _c="_CPCibObjectDataNamesKeysKey",_d="_CPCibObjectDataNamesValuesKey",_e="_CPCibObjectDataAccessibilityConnectors",_f="_CPCibObjectDataAccessibilityOidsKeys",_10="_CPCibObjectDataAccessibilityOidsValues",_11="_CPCibObjectDataClassesKeysKey",_12="_CPCibObjectDataClassesValuesKey",_13="_CPCibObjectDataConnectionsKey",_14="_CPCibObjectDataFontManagerKey",_15="_CPCibObjectDataFrameworkKey",_16="_CPCibObjectDataNextOidKey",_17="_CPCibObjectDataObjectsKeysKey",_18="_CPCibObjectDataObjectsValuesKey",_19="_CPCibObjectDataOidKeysKey",_1a="_CPCibObjectDataOidValuesKey",_1b="_CPCibObjectDataFileOwnerKey",_1c="_CPCibObjectDataVisibleWindowsKey";
 46var _1=objj_getClass("_CPCibObjectData");
 47if(!_1){
 48objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"_CPCibObjectData\""));
 49}
 50var _2=_1.isa;
 51class_addMethods(_1,[new objj_method(sel_getUid("initWithCoder:"),function(_1d,_1e,_1f){
 52with(_1d){
 53_1d=objj_msgSendSuper({receiver:_1d,super_class:objj_getClass("CPObject")},"init");
 54if(_1d){
 55_replacementObjects={};
 56_namesKeys=objj_msgSend(_1f,"decodeObjectForKey:",_c);
 57_namesValues=objj_msgSend(_1f,"decodeObjectForKey:",_d);
 58_classesKeys=objj_msgSend(_1f,"decodeObjectForKey:",_11);
 59_classesValues=objj_msgSend(_1f,"decodeObjectForKey:",_12);
 60_connections=objj_msgSend(_1f,"decodeObjectForKey:",_13);
 61_framework=objj_msgSend(_1f,"decodeObjectForKey:",_15);
 62_nextOid=objj_msgSend(_1f,"decodeIntForKey:",_16);
 63_objectsKeys=objj_msgSend(_1f,"decodeObjectForKey:",_17);
 64_objectsValues=objj_msgSend(_1f,"decodeObjectForKey:",_18);
 65_oidKeys=objj_msgSend(_1f,"decodeObjectForKey:",_19);
 66_oidValues=objj_msgSend(_1f,"decodeObjectForKey:",_1a);
 67_fileOwner=objj_msgSend(_1f,"decodeObjectForKey:",_1b);
 68_visibleWindows=objj_msgSend(_1f,"decodeObjectForKey:",_1c);
 69}
 70return _1d;
 71}
 72}),new objj_method(sel_getUid("encodeWithCoder:"),function(_20,_21,_22){
 73with(_20){
 74objj_msgSend(_22,"encodeObject:forKey:",_namesKeys,_c);
 75objj_msgSend(_22,"encodeObject:forKey:",_namesValues,_d);
 76objj_msgSend(_22,"encodeObject:forKey:",_classesKeys,_11);
 77objj_msgSend(_22,"encodeObject:forKey:",_classesValues,_12);
 78objj_msgSend(_22,"encodeObject:forKey:",_connections,_13);
 79objj_msgSend(_22,"encodeObject:forKey:",_framework,_15);
 80objj_msgSend(_22,"encodeInt:forKey:",_nextOid,_16);
 81objj_msgSend(_22,"encodeObject:forKey:",_objectsKeys,_17);
 82objj_msgSend(_22,"encodeObject:forKey:",_objectsValues,_18);
 83objj_msgSend(_22,"encodeObject:forKey:",_oidKeys,_19);
 84objj_msgSend(_22,"encodeObject:forKey:",_oidValues,_1a);
 85objj_msgSend(_22,"encodeObject:forKey:",_fileOwner,_1b);
 86objj_msgSend(_22,"encodeObject:forKey:",_visibleWindows,_1c);
 87}
 88}),new objj_method(sel_getUid("instantiateWithOwner:topLevelObjects:"),function(_23,_24,_25,_26){
 89with(_23){
 90var _27=objj_msgSend(_objectsKeys,"count");
 91while(_27--){
 92var _28=_objectsKeys[_27],_29=_objectsValues[_27],_2a=_28;
 93if(objj_msgSend(_28,"respondsToSelector:",sel_getUid("_cibInstantiate"))){
 94var _2a=objj_msgSend(_28,"_cibInstantiate");
 95if(_2a!==_28){
 96_replacementObjects[objj_msgSend(_28,"hash")]=_2a;
 97if(objj_msgSend(_2a,"isKindOfClass:",objj_msgSend(CPView,"class"))){
 98var _2b=objj_msgSend(_2a,"superview");
 99if(objj_msgSend(_2b,"isKindOfClass:",objj_msgSend(CPClipView,"class"))){
100var _2c=objj_msgSend(_2b,"superview");
101if(objj_msgSend(_2c,"isKindOfClass:",objj_msgSend(CPScrollView,"class"))){
102objj_msgSend(_2c,"setDocumentView:",_2a);
103}
104}
105}
106}
107}
108if(_26&&_29===_fileOwner&&_28!==_fileOwner){
109_26.push(_2a);
110}
111}
112}
113}),new objj_method(sel_getUid("establishConnectionsWithOwner:topLevelObjects:"),function(_2d,_2e,_2f,_30){
114with(_2d){
115_replacementObjects[objj_msgSend(_fileOwner,"hash")]=_2f;
116var _31=0,_32=_connections.length;
117for(;_31<_32;++_31){
118var _33=_connections[_31];
119objj_msgSend(_33,"replaceObjects:",_replacementObjects);
120objj_msgSend(_33,"establishConnection");
121}
122}
123}),new objj_method(sel_getUid("awakeWithOwner:topLevelObjects:"),function(_34,_35,_36,_37){
124with(_34){
125var _38=objj_msgSend(_objectsKeys,"count");
126while(_38--){
127var _39=_objectsKeys[_38],_3a=_replacementObjects[objj_msgSend(_39,"hash")];
128if(_3a){
129_39=_3a;
130}
131if(_39!==_36&&objj_msgSend(_39,"respondsToSelector:",sel_getUid("awakeFromCib"))){
132objj_msgSend(_39,"awakeFromCib");
133}
134}
135if(objj_msgSend(_36,"respondsToSelector:",sel_getUid("awakeFromCib"))){
136objj_msgSend(_36,"awakeFromCib");
137}
138}
139})]);