diff --git a/ExampleApplication/Example.rb b/ExampleApplication/Example.rb index 1b9d569..7cc2dc6 100644 --- a/ExampleApplication/Example.rb +++ b/ExampleApplication/Example.rb @@ -1,6 +1,9 @@ -require 'osx/cocoa' - -def actionProperty() +# begin +# require "osx/cocoa" +# rescue Exception=>e +# puts "Caught an exception" +# end +def actionProperty return "label-click" end @@ -12,6 +15,6 @@ def actionTitle(withValue, forValue) return "Ruby example" end -def actionEnable(withValue, forValue) +def actionPerform(withValue, forValue) puts withValue -end +end \ No newline at end of file diff --git a/ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3 b/ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3 index add4f60..4b1ed63 100644 --- a/ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3 +++ b/ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3 @@ -291,18 +291,18 @@ 1DC323CE0F3B77B40011E197 1DC3242A0F3B86790011E197 080E96DDFE201D6D7F000001 + 29B97323FDCFA39411CA2CEA 1C37FBAC04509CD000000102 - 1DD73A340F3C9F0400552B38 1C37FABC05509CD000000102 PBXSmartGroupTreeModuleOutlineStateSelectionKey - 30 + 36 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 308}, {186, 338}} + {{0, 410}, {186, 338}} PBXTopSmartGroupGIDs @@ -321,7 +321,7 @@ 186 RubberWindowFrame - 559 481 690 397 0 0 1440 878 + 445 481 690 397 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -358,7 +358,7 @@ Frame {{0, 0}, {482, 0}} RubberWindowFrame - 559 481 690 397 0 0 1440 878 + 445 481 690 397 0 0 1440 878 Module PBXNavigatorGroup @@ -378,7 +378,7 @@ Frame {{0, 5}, {482, 351}} RubberWindowFrame - 559 481 690 397 0 0 1440 878 + 445 481 690 397 0 0 1440 878 Module XCDetailModule @@ -402,9 +402,9 @@ TableOfContents - 1DD73A4E0F3C9F0C00552B38 + 1DF38D6D0F3DE90700431004 1CE0B1FE06471DED0097A5F4 - 1DD73A4F0F3C9F0C00552B38 + 1DF38D6E0F3DE90700431004 1CE0B20306471E060097A5F4 1CE0B20506471E060097A5F4 @@ -523,7 +523,7 @@ StatusbarIsVisible TimeStamp - 255660444.095864 + 255718078.155727 ToolbarDisplayMode 1 ToolbarIsVisible @@ -538,18 +538,14 @@ 5 WindowOrderList - 1DD73C6F0F3CFBE100552B38 1C530D57069F1CE1000CFCEE - 1DD73B9B0F3CCA0A00552B38 - 1DD73B9C0F3CCA0A00552B38 - 1DD73B890F3CC98100552B38 - 1DC323630F3B75AF0011E197 1CD10A99069EF8BA00B06720 1C78EAAD065D492600B07095 + 1DC323630F3B75AF0011E197 /Users/ghansard/Projects/github/PluginManager/ExampleApplication/ExampleApplication.xcodeproj WindowString - 559 481 690 397 0 0 1440 878 + 445 481 690 397 0 0 1440 878 WindowToolsV3 @@ -570,7 +566,7 @@ PBXProjectModuleGUID 1CD0528F0623707200166675 PBXProjectModuleLabel - <No Editor> + StatusBarVisibility @@ -628,7 +624,7 @@ TableOfContents 1DC323630F3B75AF0011E197 - 1DD73A580F3C9F3000552B38 + 1DF38D7E0F3DEA1800431004 1CD0528F0623707200166675 XCMainBuildResultsModuleGUID @@ -639,7 +635,7 @@ WindowToolGUID 1DC323630F3B75AF0011E197 WindowToolIsVisible - + FirstTimeWindowDisplayed @@ -670,8 +666,8 @@ yes sizes - {{0, 0}, {316, 198}} - {{316, 0}, {378, 198}} + {{0, 0}, {316, 201}} + {{316, 0}, {378, 201}} VerticalSplitView @@ -686,8 +682,8 @@ yes sizes - {{0, 0}, {694, 198}} - {{0, 198}, {694, 183}} + {{0, 0}, {694, 201}} + {{0, 201}, {694, 180}} @@ -720,7 +716,7 @@ 148 Frame - {{316, 0}, {378, 198}} + {{316, 0}, {378, 201}} RubberWindowFrame 373 433 694 422 0 0 1440 878 @@ -748,13 +744,13 @@ TableOfContents 1CD10A99069EF8BA00B06720 - 1DD73A500F3C9F0C00552B38 + 1DF38D6F0F3DE90700431004 1C162984064C10D400B95A72 - 1DD73A510F3C9F0C00552B38 - 1DD73A520F3C9F0C00552B38 - 1DD73A530F3C9F0C00552B38 - 1DD73A540F3C9F0C00552B38 - 1DD73A550F3C9F0C00552B38 + 1DF38D700F3DE90700431004 + 1DF38D710F3DE90700431004 + 1DF38D720F3DE90700431004 + 1DF38D730F3DE90700431004 + 1DF38D740F3DE90700431004 ToolbarConfiguration xcode.toolbar.config.debugV3 @@ -807,8 +803,6 @@ 212pt - BecomeActive - ContentConfiguration PBXProjectModuleGUID @@ -844,8 +838,8 @@ TableOfContents 1C530D57069F1CE1000CFCEE - 1DD73C3C0F3CDA1800552B38 - 1DD73C3D0F3CDA1800552B38 + 1DF38D890F3DEAC300431004 + 1DF38D8A0F3DEAC300431004 1CDD528C0622207200134675 1CD0528E0623707200166675 @@ -910,7 +904,7 @@ TableOfContents 1C78EAAD065D492600B07095 - 1DD73AC40F3C9FA500552B38 + 1DF38D7F0F3DEA1800431004 1C78EAAC065D492600B07095 ToolbarConfiguration diff --git a/ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser b/ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser index 5c16320..f57af07 100644 --- a/ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser +++ b/ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser @@ -48,9 +48,9 @@ }; 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {439, 1806}}"; - sepNavSelRange = "{3841, 0}"; - sepNavVisRange = "{308, 474}"; + sepNavIntBoundsRect = "{{0, 0}, {720, 1596}}"; + sepNavSelRange = "{2914, 0}"; + sepNavVisRange = "{3099, 542}"; }; }; 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */ = { @@ -101,10 +101,17 @@ 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {720, 364}}"; - sepNavSelRange = "{538, 5}"; + sepNavSelRange = "{572, 5}"; sepNavVisRange = "{220, 393}"; }; }; + 1DC323EB0F3B795E0011E197 /* ExampleController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {720, 784}}"; + sepNavSelRange = "{1079, 0}"; + sepNavVisRange = "{840, 580}"; + }; + }; 1DC324310F3B89D30011E197 /* ExampleApplication.sdef */ = { uiCtxt = { sepNavWindowFrame = "{{15, 9}, {795, 864}}"; @@ -134,212 +141,62 @@ speakMessage = 0; useDebuggerSideImplementation = 0; }; - 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */; - name = "JavascriptPluginManager.m: 55"; - rLen = 2; - rLoc = 1497; - rType = 0; - vrLen = 369; - vrLoc = 1315; - }; - 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */; - name = "LuaPluginManager.m: 144"; - rLen = 0; - rLoc = 3913; - rType = 0; - vrLen = 497; - vrLoc = 753; - }; - 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: syntax error before ')' token"; - fRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */; - rLen = 1; - rLoc = 34; - rType = 1; - }; - 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322FC0F3B74FA0011E197 /* JavascriptPluginManager.m */; - name = "JavascriptPluginManager.m: 55"; - rLen = 2; - rLoc = 1497; - rType = 0; - vrLen = 369; - vrLoc = 1315; - }; - 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322FE0F3B74FA0011E197 /* LuaPluginManager.m */; - name = "LuaPluginManager.m: 144"; - rLen = 0; - rLoc = 3913; - rType = 0; - vrLen = 497; - vrLoc = 753; - }; - 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC323000F3B74FA0011E197 /* NuPluginManager.m */; - name = "NuPluginManager.m: 100"; - rLen = 0; - rLoc = 2743; - rType = 0; - vrLen = 479; - vrLoc = 704; - }; - 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "error: syntax error before ')' token"; - fRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */; - rLen = 1; - rLoc = 36; - rType = 1; - }; - 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322FA0F3B74FA0011E197 /* FScriptPlugInManager.m */; - name = "FScriptPlugInManager.m: 105"; - rLen = 0; - rLoc = 3097; - rType = 0; - vrLen = 568; - vrLoc = 866; - }; - 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */ = { + 1DF38D830F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */; - name = "ExamplePlugin.m: 18"; + name = "ExamplePlugin.m: 21"; rLen = 5; - rLoc = 538; + rLoc = 572; rType = 0; vrLen = 393; vrLoc = 220; }; - 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */ = { + 1DF38D840F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */; - name = "PythonPluginManager.m: 112"; - rLen = 5; - rLoc = 4197; + fRef = 1DC323EB0F3B795E0011E197 /* ExampleController.m */; + name = "ExampleController.m: 35"; + rLen = 0; + rLoc = 1079; rType = 0; - vrLen = 606; - vrLoc = 3891; + vrLen = 580; + vrLoc = 840; }; - 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */ = { + 1DF38D850F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - rLen = 5; - rLoc = 2754; + fRef = 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */; + rLen = 0; + rLoc = 2410; rType = 0; }; - 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */ = { + 1DF38D860F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1DC323D10F3B77D80011E197 /* ExamplePlugin.m */; - name = "ExamplePlugin.m: 18"; + name = "ExamplePlugin.m: 21"; rLen = 5; - rLoc = 538; + rLoc = 572; rType = 0; vrLen = 393; vrLoc = 220; }; - 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC323080F3B74FA0011E197 /* PythonPluginManager.m */; - name = "PythonPluginManager.m: 112"; - rLen = 5; - rLoc = 4197; - rType = 0; - vrLen = 606; - vrLoc = 3891; - }; - 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - name = "NSApplescript+FCSAdditions.m: 69"; - rLen = 5; - rLoc = 2754; - rType = 0; - vrLen = 623; - vrLoc = 2479; - }; - 1DD73C7A0F3CFE1A00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322F70F3B74FA0011E197 /* ApplescriptPluginManager.h */; - name = "ApplescriptPluginManager.h: 27"; - rLen = 0; - rLoc = 747; - rType = 0; - vrLen = 350; - vrLoc = 397; - }; - 1DD73C7B0F3CFE1A00552B38 /* PBXTextBookmark */ = { + 1DF38D870F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; - comments = "error: 'infoDictionary' undeclared (first use in this function)"; - fRef = 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */; - rLen = 1; - rLoc = 16; - rType = 1; - }; - 1DD73C7C0F3CFE1A00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC322F70F3B74FA0011E197 /* ApplescriptPluginManager.h */; - name = "ApplescriptPluginManager.h: 27"; + fRef = 1DC323EB0F3B795E0011E197 /* ExampleController.m */; + name = "ExampleController.m: 35"; rLen = 0; - rLoc = 747; + rLoc = 1079; rType = 0; - vrLen = 350; - vrLoc = 397; + vrLen = 580; + vrLoc = 840; }; - 1DD73C7D0F3CFE1A00552B38 /* PBXTextBookmark */ = { + 1DF38D880F3DEAC300431004 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */; - name = "ApplescriptPluginManager.m: 116"; - rLen = 0; - rLoc = 3841; - rType = 0; - vrLen = 474; - vrLoc = 308; - }; - 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "warning: 'NSObject' may not respond to '-objectForKey:'"; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - rLen = 1; - rLoc = 137; - rType = 1; - }; - 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - name = "NSApplescript+FCSAdditions.m: 154"; - rLen = 0; - rLoc = 5620; - rType = 0; - vrLen = 399; - vrLoc = 5221; - }; - 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - comments = "warning: 'NSObject' may not respond to '-allKeys'"; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - rLen = 1; - rLoc = 135; - rType = 1; - }; - 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */; - name = "NSApplescript+FCSAdditions.m: 156"; + name = "ApplescriptPluginManager.m: 89"; rLen = 0; - rLoc = 5748; + rLoc = 2914; rType = 0; - vrLen = 434; - vrLoc = 5236; + vrLen = 542; + vrLoc = 3099; }; 29B97313FDCFA39411CA2CEA /* Project object */ = { activeArchitecture = i386; @@ -453,32 +310,16 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 255631107; - PBXWorkspaceStateSaveDate = 255631107; + PBXPerProjectTemplateStateSaveDate = 255715561; + PBXWorkspaceStateSaveDate = 255715561; }; perUserProjectItems = { - 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C230F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C240F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C250F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C260F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C270F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */ = 1DD73C280F3CD94B00552B38 /* PBXTextBookmark */; - 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */ = 1DD73C320F3CD9D100552B38 /* PBXTextBookmark */; - 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */ = 1DD73C330F3CD9D100552B38 /* PBXTextBookmark */; - 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C360F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C370F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C380F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C390F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C3A0F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */ = 1DD73C3B0F3CDA1800552B38 /* PBXTextBookmark */; - 1DD73C7A0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7A0F3CFE1A00552B38 /* PBXTextBookmark */; - 1DD73C7B0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7B0F3CFE1A00552B38 /* PBXTextBookmark */; - 1DD73C7C0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7C0F3CFE1A00552B38 /* PBXTextBookmark */; - 1DD73C7D0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7D0F3CFE1A00552B38 /* PBXTextBookmark */; - 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */ = 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */; - 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */ = 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */; - 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */ = 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */; - 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */ = 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */; + 1DF38D830F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D830F3DEAC300431004 /* PBXTextBookmark */; + 1DF38D840F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D840F3DEAC300431004 /* PBXTextBookmark */; + 1DF38D850F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D850F3DEAC300431004 /* PBXTextBookmark */; + 1DF38D860F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D860F3DEAC300431004 /* PBXTextBookmark */; + 1DF38D870F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D870F3DEAC300431004 /* PBXTextBookmark */; + 1DF38D880F3DEAC300431004 /* PBXTextBookmark */ = 1DF38D880F3DEAC300431004 /* PBXTextBookmark */; }; sourceControlManager = 1DC322F40F3B747D0011E197 /* Source Control */; userBuildSettings = { diff --git a/ExampleApplication/ExampleApplication.xcodeproj/project.pbxproj b/ExampleApplication/ExampleApplication.xcodeproj/project.pbxproj index c52d190..b2e3887 100644 --- a/ExampleApplication/ExampleApplication.xcodeproj/project.pbxproj +++ b/ExampleApplication/ExampleApplication.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ 1DD73C5A0F3CF93500552B38 /* Example.py in Copy plugins */ = {isa = PBXBuildFile; fileRef = 1D973F310F3BF36000437B6D /* Example.py */; }; 1DD73C610F3CFA9F00552B38 /* NSApplication+Applescript.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DD73C600F3CFA9F00552B38 /* NSApplication+Applescript.m */; }; 1DD73C6D0F3CFBDE00552B38 /* ApplescriptPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC322F80F3B74FA0011E197 /* ApplescriptPluginManager.m */; }; + 1DF38D770F3DE9AA00431004 /* RubyPluginManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DC3230A0F3B74FA0011E197 /* RubyPluginManager.m */; }; 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; @@ -424,6 +425,7 @@ 1DD73C2C0F3CD9A700552B38 /* NSApplescript+FCSAdditions.m in Sources */, 1DD73C610F3CFA9F00552B38 /* NSApplication+Applescript.m in Sources */, 1DD73C6D0F3CFBDE00552B38 /* ApplescriptPluginManager.m in Sources */, + 1DF38D770F3DE9AA00431004 /* RubyPluginManager.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ExampleApplication/ExampleController.m b/ExampleApplication/ExampleController.m index a414b47..c66663f 100644 --- a/ExampleApplication/ExampleController.m +++ b/ExampleApplication/ExampleController.m @@ -32,7 +32,6 @@ - (IBAction)showPluginMenu:(id)sender { id value = nil; if ([sender tag] == 0) value = [self.me objectForKey:@"name"]; else if ([sender tag] == 1) value = [self.me objectForKey:@"phone"]; - NSLog(@"%s %@", _cmd, self.me); NSArray *plugins = [PluginManager pluginsForProperty:@"label-click" forValue:self.me withValue:value]; NSMenu *m = [[[NSMenu alloc] initWithTitle:@"pluginMenu"] autorelease]; diff --git a/src/ApplescriptPluginManager.m b/src/ApplescriptPluginManager.m index b8634c5..0a734e7 100644 --- a/src/ApplescriptPluginManager.m +++ b/src/ApplescriptPluginManager.m @@ -76,7 +76,6 @@ -(NSArray *)pluginsForProperty:(NSString *)property forValue:(id)forValue withVa if (!arr || ![arr count]) return nil; NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; - NSLog(@"%s %@ %@", _cmd, NSStringFromClass([forValue class]), NSStringFromClass([withValue class])); if (forValue) [parameters setObject:forValue forKey:[NSNumber numberWithUnsignedLong:ASPluginForCode]]; if (withValue) [parameters setObject:withValue forKey:[NSNumber numberWithUnsignedLong:ASPluginWithCode]]; @@ -87,7 +86,6 @@ -(NSArray *)pluginsForProperty:(NSString *)property forValue:(id)forValue withVa while (as = [e nextObject]) { NSAppleEventDescriptor *enabledDesc = [as executeEvent:ASPluginEnableEventCode eventClass:ASPluginAppClassCode() parameters:parameters]; - NSLog(@"%s THERE", _cmd); if (enabledDesc && [enabledDesc booleanValue]) { NSAppleEventDescriptor *desc = [as executeEvent:ASPluginTitleEventCode eventClass:ASPluginAppClassCode() parameters:parameters]; diff --git a/src/NSApplescript+FCSAdditions.m b/src/NSApplescript+FCSAdditions.m index 0898363..123eba7 100644 --- a/src/NSApplescript+FCSAdditions.m +++ b/src/NSApplescript+FCSAdditions.m @@ -120,6 +120,8 @@ +(BOOL)sendRecordableEventWithEventCode:(AEEventID)eventCode eventClass:(AEEvent @implementation NSObject (ASPrivateMethods) +// Convenience method used above to convert standard types (and types with object specifiers) into a suitable +// descriptor. -(NSAppleEventDescriptor *)ASDescriptor { NSAppleEventDescriptor *desc = nil; @@ -147,7 +149,7 @@ -(NSAppleEventDescriptor *)ASDescriptor desc = [[self objectSpecifier] _asDescriptor]; else desc = [NSAppleEventDescriptor nullDescriptor]; - return desc; + return desc ? desc : [NSAppleEventDescriptor nullDescriptor]; } @end diff --git a/src/RubyPluginManager.m b/src/RubyPluginManager.m index 0a52ba1..2001168 100644 --- a/src/RubyPluginManager.m +++ b/src/RubyPluginManager.m @@ -92,8 +92,11 @@ -(void)runPlugin:(NSDictionary *)plugin forValue:(id)forValue withValue:(id)with -(id)runScriptAtPath:(NSString *)path { + NSString *rubyCode = [NSString stringWithContentsOfFile:path]; + if (!rubyCode) return nil; + void *v = (void *)rb_eval_string([rubyCode UTF8String]); + // How do I get a return value from a script? Can I with Ruby? return nil; - // return [[NSAppleScript appleScriptWithContentsOfFile:path] executeAndReturnError:nil]; } @end