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

/Frameworks/AppKit/rhino.platform/CPCibLoading.j

http://github.com/polymar/polish
Unknown | 41 lines | 41 code | 0 blank | 0 comment | 0 complexity | c489ac7044c27258e8c8fb09d9ca168a MD5 | raw file
 1I;21;Foundation/CPBundle.jI;25;Foundation/CPDictionary.jI;21;Foundation/CPString.jc;1850;
 2var _1="CPCibOwner";
 3var _2={};
 4var _3=objj_getClass("CPObject");
 5if(!_3){
 6objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPObject\""));
 7}
 8var _4=_3.isa;
 9class_addMethods(_3,[new objj_method(sel_getUid("awakeFromCib"),function(_5,_6){
10with(_5){
11}
12})]);
13var _3=objj_getClass("CPBundle");
14if(!_3){
15objj_exception_throw(new objj_exception(OBJJClassNotFoundException,"*** Could not find definition for class \"CPBundle\""));
16}
17var _4=_3.isa;
18class_addMethods(_3,[new objj_method(sel_getUid("loadCibFile:externalNameTable:loadDelegate:"),function(_7,_8,_9,_a,_b){
19with(_7){
20var _c=objj_msgSend(objj_msgSend(CPCib,"alloc"),"initWithCibNamed:bundle:loadDelegate:",_9,_7,objj_msgSend(_7,"class"));
21_2[objj_msgSend(_c,"hash")]={loadDelegate:_b,externalNameTable:_a};
22}
23})]);
24class_addMethods(_4,[new objj_method(sel_getUid("loadCibFile:externalNameTable:loadDelegate:"),function(_d,_e,_f,_10,_11){
25with(_d){
26var cib=objj_msgSend(objj_msgSend(CPCib,"alloc"),"initWithContentsOfURL:loadDelegate:",_f,_d);
27_2[objj_msgSend(cib,"hash")]={loadDelegate:_11,externalNameTable:_10};
28}
29}),new objj_method(sel_getUid("loadCibNamed:owner:loadDelegate:"),function(_13,_14,_15,_16,_17){
30with(_13){
31var _18=_16?objj_msgSend(CPBundle,"bundleForClass:",objj_msgSend(_16,"class")):objj_msgSend(CPBundle,"mainBundle"),_19=objj_msgSend(_18,"pathForResource:",_15);
32objj_msgSend(_13,"loadCibFile:externalNameTable:loadDelegate:",_19,objj_msgSend(CPDictionary,"dictionaryWithObject:forKey:",_16,_1),_17);
33}
34}),new objj_method(sel_getUid("cibDidFinishLoading:"),function(_1a,_1b,_1c){
35with(_1a){
36var _1d=_2[objj_msgSend(_1c,"hash")];
37delete _2[objj_msgSend(_1c,"hash")];
38objj_msgSend(_1c,"instantiateCibWithExternalNameTable:",_1d.externalNameTable);
39objj_msgSend(_1d.loadDelegate,"cibDidFinishLoading:",_1c);
40}
41})]);