Changeset 153 for trunk/lingosource
- Timestamp:
- 02/21/08 07:51:08 (4 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 5 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (1 diff)
-
castlib1/alexUtilities.ls (modified) (3 diffs)
-
castlib1/bbedit_Utilities.ls (modified) (7 diffs)
-
castlib1/memberInfo.xml (modified) (21 diffs)
-
castlib2/memberInfo.xml (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r148 r153 26 26 subli.add("Insert divider") 27 27 pLookUpCommandList.setaprop("Insert divider", ["pasteDivider me", "alexUtilities"]) 28 29 subli.add("Insert lingodoc script abstract") 30 pLookUpCommandList.setaprop("Insert script abstract", ["snipAbstract me", "alexUtilities"]) 31 32 subli.add("Insert lingodoc handler description") 33 pLookUpCommandList.setaprop("Insert divider", ["snipTitle me", "alexUtilities"]) 28 34 29 35 li.add("") -
trunk/lingosource/castlib1/alexUtilities.ls
r151 r153 2532 2532 2533 2533 2534 on snipTitle me 2535 str = "-----------------------------------\ 2536 -- CREATED: <currentDate>\ 2537 -- ACTION: Description\ 2538 -- INPUT: -\ 2539 -- RETURNS: -\ 2540 -- CALLER: -\ 2541 -- DEBUG: -\ 2542 -- TODO: -\ 2543 -----------------------------------" 2544 pasteFieldContent str, 1 2545 end 2546 2547 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2548 2549 on snipAbstract me 2550 str = "-- <Scriptname>\ 2551 -----------------------------------\ 2552 -- CREATED:\ 2553 -- <currentDate>\ 2554 --\ 2555 -- DESCRIPTION:\ 2556 -- -\ 2557 --\ 2558 -- REQUIRES:\ 2559 -- (Prerequisites)\ 2560 --\ 2561 -- USAGE:\ 2562 -- -\ 2563 --\ 2564 -- PARAMS:\ 2565 -- -\ 2566 --\ 2567 -- RETURNS:\ 2568 -- -\ 2569 --\ 2570 -- WARNINGS:\ 2571 -- -\ 2572 --\ 2573 -- TODO:\ 2574 -- -\ 2575 -----------------------------------" 2576 pasteFieldContent str, 1 2577 end 2578 2579 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2580 2581 on pasteFieldContent whichFieldname, replacePlaceHolder 2582 m = member(whichFieldname) 2583 if ilk(m) <> #member then exit 2584 if [#field, #text].getPos(m.type) > 0 then mPasteItem m.text, replacePlaceHolder 2585 end 2586 2587 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2588 2534 2589 on pasteDate me 2535 2590 … … 2551 2606 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2552 2607 2553 on mPasteItem me, theText 2554 2555 pastefield = new(#field) 2556 pastefield.text = theText 2557 2558 oldclipboard = new(#field) 2559 oldclipboard.pasteClipBoardInto() 2560 2561 pastefield.copyToClipBoard() 2608 on mPasteItem me, theText, replacePlaceHolder 2562 2609 2563 2610 … … 2580 2627 end if 2581 2628 2629 2630 if ilk(theMem) = #member then 2631 if theMem.type = #script then 2632 2633 --------------------------------- we paste the placeholder only here in this script, because there is a placeholder 2634 --------------------------------- for the current scriptname, which we only "know" here in this script 2635 if replacePlaceHolder = 1 then 2636 placeholders = [["<currentDate>", the short date], ["<scriptname>", theMem.name]] 2637 2638 repeat with repl in placeholders 2639 if repl[1] <> repl[2] then 2640 offs = offset(repl[1], theText) 2641 repeat while offs > 0 2642 put repl[2] into char offs to offs + length(repl[1]) - 1 of theText 2643 offs = offset(repl[1], theText) 2644 end repeat 2645 end if 2646 end repeat 2647 2648 end if 2649 --------------------------------- 2650 2651 end if 2652 end if 2653 2654 pastefield = new(#field) 2655 pastefield.text = theText 2656 2657 oldclipboard = new(#field) 2658 oldclipboard.pasteClipBoardInto() 2659 2660 pastefield.copyToClipBoard() 2661 2662 2582 2663 if ilk(theMem) = #member then 2583 2664 if theMem.type = #script then -
trunk/lingosource/castlib1/bbedit_Utilities.ls
r151 r153 147 147 148 148 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 149 --------------------- 150 151 mDoShellCmd(me, "bbedit " & tempSrcPath) 149 150 if theResult = 0 then 151 alert "Unable to save temp file:" && tempSrcHFSPath 152 else 153 mDoShellCmd(me, "bbedit " & tempSrcPath) 154 end if 155 152 156 153 157 end if … … 206 210 sel = the selection of castlib cl 207 211 208 if mCheckForXtra(me, "BudAPI") then 209 -- tempFolder = basysfolder("temp") 210 211 if the platform contains "mac" then 212 213 isMac = 1 214 resetUNames = 0 215 if baSysFolder("prefs") starts "/" then 216 baReturnUnixNames(0) 217 resetUNames = 1 218 end if 219 tempFolderHFS = basysfolder("temp") 220 baReturnUnixNames(1) 221 tempFolder = basysfolder("temp") 222 if resetUNames = 0 then 223 baReturnUnixNames(0) 224 end if 225 226 else 227 tempFolderHFS = basysfolder("temp") 228 tempFolder = tempFolderHFS 229 end if 230 231 232 else 233 alert "You need the buddyApi xtra for this operation" 234 exit 235 end if 212 isMac = (the platform contains "mac") 236 213 237 214 editor = mGetExternalScriptEditor(me) … … 258 235 if doLiveEdit then 259 236 --------------------- 260 tempSrc Path = tempFolder & "temp_LingoScript_file.ls"237 tempSrcHFSPath = mGetTempFilePath(me, "temp_LingoScript_file.ls") 261 238 262 239 if isMac then 263 240 waitparam = "" 264 241 editor = mGetMacBinary(me, editor) 265 tempSrc HFSPath = mConvertUnix2Hfs(me, tempSrcPath)242 tempSrcPath = mConvertHfs2Unix(me, tempSrcHFSPath) 266 243 else 267 waitparam = " \w"268 tempSrc HFSPath = tempSrcPath244 waitparam = " /wait" 245 tempSrcPath = tempSrcHFSPath 269 246 end if 270 247 --------------------- … … 272 249 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 273 250 274 mDoShellCmd(me, QUOTE & editor & QUOTE && tempSrcPath & waitparam) 275 276 theText = mGetTextFromFile(me, tempSrcHFSPath) 277 278 theText = mForceMacLineBreaks(me, theText) 279 280 if theType = #script then 281 memref.scripttext = theText 282 else if theType = #text then 283 memref.html = theText 284 else if theType = #field then 285 memref.text = theText 251 if theResult = 0 then 252 alert "Unable to save temp file:" && tempSrcHFSPath 253 else 254 255 mDoShellCmd(me, QUOTE & editor & QUOTE && tempSrcPath & waitparam) 256 257 theText = mGetTextFromFile(me, tempSrcHFSPath) 258 259 if length(theText) < 1 then 260 alert "Temp file:" && tempSrcHFSPath && "contains no text. Changes will not be written to script." 261 262 else 263 264 theText = mForceMacLineBreaks(me, theText) 265 266 if theType = #script then 267 memref.scripttext = theText 268 else if theType = #text then 269 memref.html = theText 270 else if theType = #field then 271 memref.text = theText 272 end if 273 274 end if 275 286 276 end if 287 277 … … 295 285 --------------------- 296 286 -- create a temporary file from scripttext: 297 tempSrc Path = tempFolder & theName & ".ls"287 tempSrcHFSPath = mGetTempFilePath(me, theName & ".ls") 298 288 299 289 if isMac then 300 290 waitparam = " &" 301 editor = ""302 tempSrc HFSPath = tempSrcPath291 editor = mGetMacBinary(me, editor) 292 tempSrcPath = tempSrcHFSPath 303 293 else 304 294 waitparam = "" 305 tempSrc HFSPath = tempSrcPath295 tempSrcPath = tempSrcHFSPath 306 296 end if 307 297 … … 309 299 --------------------- 310 300 311 mDoShellCmd(me, QUOTE & editor & QUOTE && tempSrcPath & waitparam) 301 if theResult = 0 then 302 alert "Unable to save temp file:" && tempSrcHFSPath 303 else 304 mDoShellCmd(me, QUOTE & editor & QUOTE && tempSrcPath & waitparam) 305 end if 312 306 313 307 end if … … 355 349 #field: memref.text = theText 356 350 end case 351 352 else 353 alert "Temp file:" && tempSrcPath && "contains no text. Changes will not be written to script." 357 354 358 355 end if -
trunk/lingosource/castlib1/memberInfo.xml
r150 r153 5 5 <comments></comments> 6 6 <memberName>doCommandMovieScript</memberName> 7 <f name>doCommandMovieScript</fname>7 <fName>doCommandMovieScript</fName> 8 8 </doCommandMovieScript> 9 9 <thisMoviesScript> … … 11 11 <comments></comments> 12 12 <memberName>thisMoviesScript</memberName> 13 <f name>thisMoviesScript</fname>13 <fName>thisMoviesScript</fName> 14 14 </thisMoviesScript> 15 15 <keyboardNavigation_FrameLoop> … … 17 17 <comments></comments> 18 18 <memberName>keyboardNavigation_FrameLoop</memberName> 19 <f name>keyboardNavigation_FrameLoop</fname>19 <fName>keyboardNavigation_FrameLoop</fName> 20 20 </keyboardNavigation_FrameLoop> 21 21 <menu1_button> … … 23 23 <comments></comments> 24 24 <memberName>menu1_button</memberName> 25 <f name>menu1_button</fname>25 <fName>menu1_button</fName> 26 26 </menu1_button> 27 27 <menu2_button> … … 29 29 <comments></comments> 30 30 <memberName>menu2_button</memberName> 31 <f name>menu2_button</fname>31 <fName>menu2_button</fName> 32 32 </menu2_button> 33 33 <simpleBMMenu> … … 35 35 <comments></comments> 36 36 <memberName>simpleBMMenu</memberName> 37 <f name>simpleBMMenu</fname>37 <fName>simpleBMMenu</fName> 38 38 </simpleBMMenu> 39 39 <OSCmenu_Utilities> … … 41 41 <comments></comments> 42 42 <memberName>OSCmenu_Utilities</memberName> 43 <f name>OSCmenu_Utilities</fname>43 <fName>OSCmenu_Utilities</fName> 44 44 </OSCmenu_Utilities> 45 45 <alexUtilities> … … 47 47 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 48 48 <memberName>alexUtilities</memberName> 49 <f name>alexUtilities</fname>49 <fName>alexUtilities</fName> 50 50 </alexUtilities> 51 51 <convert_Lingo_2_CSS_Html> … … 53 53 <comments>~/Documents/Scripts/lingo/convert_Lingo_2_CSS_Html.ls</comments> 54 54 <memberName>convert_Lingo_2_CSS_Html</memberName> 55 <f name>convert_Lingo_2_CSS_Html</fname>55 <fName>convert_Lingo_2_CSS_Html</fName> 56 56 </convert_Lingo_2_CSS_Html> 57 57 <OSCmenu_Handlers> … … 59 59 <comments></comments> 60 60 <memberName>OSCmenu_Handlers</memberName> 61 <f name>OSCmenu_Handlers</fname>61 <fName>OSCmenu_Handlers</fName> 62 62 </OSCmenu_Handlers> 63 63 <pastefeld> … … 65 65 <comments></comments> 66 66 <memberName>pastefeld</memberName> 67 <f name>pastefeld</fname>67 <fName>pastefeld</fName> 68 68 </pastefeld> 69 69 <oldclipboard> … … 71 71 <comments></comments> 72 72 <memberName>oldclipboard</memberName> 73 <f name>oldclipboard</fname>73 <fName>oldclipboard</fName> 74 74 </oldclipboard> 75 75 <searchword> … … 77 77 <comments></comments> 78 78 <memberName>searchword</memberName> 79 <f name>searchword</fname>79 <fName>searchword</fName> 80 80 </searchword> 81 81 <resizewindowfs> … … 83 83 <comments></comments> 84 84 <memberName>resizewindowfs</memberName> 85 <f name>resizewindowfs</fname>85 <fName>resizewindowfs</fName> 86 86 </resizewindowfs> 87 87 <showHideHelp> … … 89 89 <comments></comments> 90 90 <memberName>showHideHelp</memberName> 91 <f name>showHideHelp</fname>91 <fName>showHideHelp</fName> 92 92 </showHideHelp> 93 93 <helptext> … … 98 98 rtf</comments> 99 99 <memberName>helptext</memberName> 100 <f name>helptext</fname>100 <fName>helptext</fName> 101 101 </helptext> 102 102 <texthyperlinkBehavior> … … 104 104 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/texthyperlinkBehavior.ls</comments> 105 105 <memberName>texthyperlinkBehavior</memberName> 106 <f name>texthyperlinkBehavior</fname>106 <fName>texthyperlinkBehavior</fName> 107 107 </texthyperlinkBehavior> 108 108 <statusOutput> … … 113 113 rtf</comments> 114 114 <memberName>statusOutput</memberName> 115 <f name>statusOutput</fname>115 <fName>statusOutput</fName> 116 116 </statusOutput> 117 117 <bbedit_Utilities> … … 119 119 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 120 120 <memberName>bbedit_Utilities</memberName> 121 <f name>bbedit_Utilities</fname>121 <fName>bbedit_Utilities</fName> 122 122 </bbedit_Utilities> 123 123 <svn_Utilities> … … 125 125 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 126 126 <memberName>svn_Utilities</memberName> 127 <f name>svn_Utilities</fname>127 <fName>svn_Utilities</fName> 128 128 </svn_Utilities> 129 129 <custom_Utilities> … … 131 131 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 132 132 <memberName>custom_Utilities</memberName> 133 <f name>custom_Utilities</fname>133 <fName>custom_Utilities</fName> 134 134 </custom_Utilities> 135 135 </Untitled> -
trunk/lingosource/castlib2/memberInfo.xml
r150 r153 5 5 <comments>~/Documents/Scripts/lingo/commonMovieScript.ls</comments> 6 6 <memberName>commonMovieScript</memberName> 7 <f name>commonMovieScript</fname>7 <fName>commonMovieScript</fName> 8 8 </commonmoviescript> 9 9 <FileIOFunktionen> … … 11 11 <comments>~/Documents/Scripts/lingo/FileIOFunktionen.ls</comments> 12 12 <memberName>FileIOFunktionen</memberName> 13 <f name>FileIOFunktionen</fname>13 <fName>FileIOFunktionen</fName> 14 14 </FileIOFunktionen> 15 15 <GetSetPrefs> … … 17 17 <comments>~/Documents/Scripts/lingo/GetSetPrefs.ls</comments> 18 18 <memberName>GetSetPrefs</memberName> 19 <f name>GetSetPrefs</fname>19 <fName>GetSetPrefs</fName> 20 20 </GetSetPrefs> 21 21 <aleXtrasMovieScript> … … 23 23 <comments>~/Documents/Scripts/lingo/aleXtrasMovieScript.ls</comments> 24 24 <memberName>aleXtrasMovieScript</memberName> 25 <f name>aleXtrasMovieScript</fname>25 <fName>aleXtrasMovieScript</fName> 26 26 </aleXtrasMovieScript> 27 27 <PseudoXMLPS> … … 29 29 <comments>~/Documents/Scripts/lingo/PseudoXMLPS.ls</comments> 30 30 <memberName>PseudoXMLPS</memberName> 31 <f name>PseudoXMLPS</fname>31 <fName>PseudoXMLPS</fName> 32 32 </PseudoXMLPS> 33 33 <simpleGoToAction> … … 35 35 <comments>/Users/alex/Documents/ALIEN/myLinkedScripts/simpleGoToAction.ls</comments> 36 36 <memberName>simpleGoToAction</memberName> 37 <f name>simpleGoToAction</fname>37 <fName>simpleGoToAction</fName> 38 38 </simpleGoToAction> 39 39 <SpriteNameBeaver> … … 41 41 <comments>~/Documents/Scripts/lingo/SpriteNameBeaver.ls</comments> 42 42 <memberName>SpriteNameBeaver</memberName> 43 <f name>SpriteNameBeaver</fname>43 <fName>SpriteNameBeaver</fName> 44 44 </SpriteNameBeaver> 45 45 </Untitled>
Note: See TracChangeset
for help on using the changeset viewer.
