/Frameworks/AppKit/browser.platform/CPThemeBlend.j

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

  1. I;21;Foundation/CPObject.jI;16;AppKit/CPTheme.jI;29;AppKit/_CPCibCustomResource.jI;30;AppKit/_CPCibKeyedUnarchiver.jc;1452;
  2. var _1=objj_allocateClassPair(CPObject,"CPThemeBlend"),_2=_1.isa;
  3. class_addIvars(_1,[new objj_ivar("_bundle"),new objj_ivar("_themes"),new objj_ivar("_loadDelegate")]);
  4. objj_registerClassPair(_1);
  5. objj_addClassForBundle(_1,objj_getBundleWithPath(OBJJ_CURRENT_BUNDLE.path));
  6. class_addMethods(_1,[new objj_method(sel_getUid("themes"),function(_3,_4){
  7. with(_3){
  8. return _themes;
  9. }
  10. }),new objj_method(sel_getUid("initWithContentsOfURL:"),function(_5,_6,_7){
  11. with(_5){
  12. _5=objj_msgSendSuper({receiver:_5,super_class:objj_getClass("CPObject")},"init");
  13. if(_5){
  14. _bundle=objj_msgSend(objj_msgSend(CPBundle,"alloc"),"initWithPath:",_7+"/Info.plist");
  15. }
  16. return _5;
  17. }
  18. }),new objj_method(sel_getUid("loadWithDelegate:"),function(_8,_9,_a){
  19. with(_8){
  20. _loadDelegate=_a;
  21. objj_msgSend(_bundle,"loadWithDelegate:",_8);
  22. }
  23. }),new objj_method(sel_getUid("bundleDidFinishLoading:"),function(_b,_c,_d){
  24. with(_b){
  25. var _e=objj_msgSend(_bundle,"objectForInfoDictionaryKey:","CPBundleReplacedFiles"),_f=0,_10=_e.length,_11=objj_msgSend(_bundle,"bundlePath");
  26. while(_10--){
  27. var _12=_e[_10];
  28. if(objj_msgSend(_12,"pathExtension")==="keyedtheme"){
  29. var _13=objj_msgSend(objj_msgSend(_CPThemeKeyedUnarchiver,"alloc"),"initForReadingWithData:bundle:",objj_msgSend(CPData,"dataWithString:",objj_files[_11+"/"+_12].contents),_bundle);
  30. objj_msgSend(_13,"decodeObjectForKey:","root");
  31. objj_msgSend(_13,"finishDecoding");
  32. }
  33. }
  34. objj_msgSend(_loadDelegate,"blendDidFinishLoading:",_b);
  35. }
  36. })]);