Changeset 76 for trunk/lingosource
- Timestamp:
- 12/07/07 00:24:27 (4 years ago)
- Location:
- trunk/lingosource
- Files:
-
- 12 deleted
- 3 edited
-
castlib1/OSCmenu_Utilities.ls (modified) (1 diff)
-
castlib1/alexUtilities.ls (modified) (2 diffs)
-
castlib1/bbedit_Utilities.ls (modified) (5 diffs)
-
castlib1/convert_Lingo_2_CSS_Html.jpg (deleted)
-
castlib1/helptext.rtf (deleted)
-
castlib1/menu1_button.rtf (deleted)
-
castlib1/menu2_button.rtf (deleted)
-
castlib1/statusOutput.rtf (deleted)
-
castlib1/texthyperlinkBehavior.jpg (deleted)
-
castlib2/FileIOFunktionen.jpg (deleted)
-
castlib2/GetSetPrefs.jpg (deleted)
-
castlib2/PseudoXMLPS.jpg (deleted)
-
castlib2/SpriteNameBeaver.jpg (deleted)
-
castlib2/commonMovieScript.jpg (deleted)
-
castlib2/simpleGoToAction.jpg (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r74 r76 36 36 37 37 subli.add("Edit in BBEdit") 38 pLookUpCommandList.setaprop("Edit in BBEdit", ["mOpen_text_with_BBedit me", "bbedit_Utilities"]) 38 pLookUpCommandList.setaprop("Edit in BBEdit", ["mEdit_text_with_BBedit me", "bbedit_Utilities"]) 39 40 subli.add("Open in BBEdit") 41 pLookUpCommandList.setaprop("Open in BBEdit", ["mOpen_text_with_BBedit me", "bbedit_Utilities"]) 42 43 subli.add("Refresh members edited in BBEdit") 44 pLookUpCommandList.setaprop("Refresh members edited in BBEdit", ["mReImport_text_Opened_In_BBedit me", "bbedit_Utilities"]) 39 45 40 46 subli.add("Open linked script") -
trunk/lingosource/castlib1/alexUtilities.ls
r74 r76 441 441 442 442 -- currently there is a bug in buddy beta with bafilelist, so we hack here... 443 444 retval = [] 445 n = 1 446 this = getnthfilenameinfolder(folderpath, n) 447 repeat while length(this) > 0 448 if length(getnthfilenameinfolder(folderpath & this, 1)) = 0 then retval.add(this) 449 n = n + 1 443 if mGetFloatVersionNumber(me, the productversion) < 11 then 444 445 -- -- budApi version: 446 retval = baFileList(folderpath, "*.*") 447 448 else 449 450 retval = [] 451 n = 1 450 452 this = getnthfilenameinfolder(folderpath, n) 451 end repeat 452 453 -- -- budApi version: 454 -- retval = baFileList(folderpath, "*.*") 453 repeat while length(this) > 0 454 if length(getnthfilenameinfolder(folderpath & this, 1)) = 0 then retval.add(this) 455 n = n + 1 456 this = getnthfilenameinfolder(folderpath, n) 457 end repeat 458 459 end if 460 455 461 456 462 else if mCheckForXtra(me, "FileXtra4") = 1 then -- if not buddy then try filextra … … 2526 2532 end if 2527 2533 end 2534 2535 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2536 2537 on mGetFloatVersionNumber me, prodVers 2538 offs = offset(".", prodVers) 2539 if offs > 0 then 2540 intVers = char 1 to offs of prodVers 2541 delete char 1 to offs of prodVers 2542 else 2543 intVers = "" 2544 end if 2545 cnt = length(prodVers) 2546 repeat with n = 1 to cnt 2547 c = prodVers.char[n] 2548 if integerP(integer(c)) then 2549 put c after intVers 2550 else if c <> "." then 2551 exit repeat 2552 end if 2553 end repeat 2554 2555 return value(intVers) 2556 end -
trunk/lingosource/castlib1/bbedit_Utilities.ls
r74 r76 51 51 end 52 52 53 54 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 55 56 on mOpen_text_with_BBedit me 53 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 54 55 on mEdit_text_with_BBedit me 56 mOpen_text_with_BBedit me, 1 57 end 58 59 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 60 61 on mOpen_text_with_BBedit me, doLiveEdit 57 62 58 63 if not(the platform contains "mac") then … … 89 94 if length(theText) > 0 then 90 95 91 --------------------- 92 -- create a temporary file from scripttext: 93 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBEdit_file.ls") 94 -- tempSrcPath = tempSrcPath[1] 95 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 96 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 97 tempSrcHFSPath = tempSrcHFSPath[1] 98 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 99 --------------------- 100 101 mDoShellCmd(me, "bbedit --wait --resume " & tempSrcPath) 102 103 theText = mGetTextFromFile(me, tempSrcHFSPath) 104 105 if theType = #script then 106 memref.scripttext = theText 107 else if theType = #text then 108 memref.html = theText 109 else if theType = #field then 110 memref.text = theText 96 97 if doLiveEdit then 98 --------------------- 99 -- create a temporary file from scripttext: 100 -- tempSrcPath = shell_cmd_list("mktemp -t temp_BBEdit_file.ls") 101 -- tempSrcPath = tempSrcPath[1] 102 tempSrcPath = "/tmp/temp_BBEdit_file.ls" 103 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 104 tempSrcHFSPath = tempSrcHFSPath[1] 105 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 106 --------------------- 107 108 mDoShellCmd(me, "bbedit --wait --resume " & tempSrcPath) 109 110 theText = mGetTextFromFile(me, tempSrcHFSPath) 111 112 if theType = #script then 113 memref.scripttext = theText 114 else if theType = #text then 115 memref.html = theText 116 else if theType = #field then 117 memref.text = theText 118 end if 119 120 121 else 122 123 theName = memref.name 124 if length(theName) < 1 then 125 theName = "member_" & memref.membernum & "_" & memref.castlibnum 126 end if 127 --------------------- 128 -- create a temporary file from scripttext: 129 tempSrcPath = "/tmp/" & theName & ".ls" 130 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 131 tempSrcHFSPath = tempSrcHFSPath[1] 132 theResult = mSaveTextToTempFile(me, theText, tempSrcHFSPath) 133 --------------------- 134 135 mDoShellCmd(me, "bbedit " & tempSrcPath) 136 137 111 138 end if 112 139 … … 128 155 129 156 end if 157 end repeat 158 end repeat 159 160 end 161 162 163 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 164 165 on mReImport_text_Opened_In_BBedit me 166 167 if not(the platform contains "mac") then 168 alert "Sorry, BBEdit is a mac application!" & RETURN & "If you change this handler to match something appropriate for Windows, please drop me a note. alex@farbflash.de" 169 exit 170 end if 171 172 cl = the activecastlib 173 sel = the selection of castlib cl 174 175 repeat with sub in sel 176 repeat with mem = sub[1] to sub[2] 177 178 memref = member(mem,cl) 179 180 181 theName = memref.name 182 if length(theName) < 1 then 183 theName = "member_" & memref.membernum & "_" & memref.castlibnum 184 end if 185 186 delim = the last char of the moviepath 187 olddelim = the itemdelimiter 188 the itemdelimiter = delim 189 hd = item 1 of getosdirectory() 190 191 tempSrcPath = hd & delim & "tmp" & delim & theName & ".ls" 192 the itemdelimiter = olddelim 193 194 theText = mGetTextFromFile(me, tempSrcPath) 195 196 if length(theText) > 0 then 197 198 case memref.type of 199 #script: memref.scripttext = theText 200 #text: memref.html = theText 201 #field: memref.text = theText 202 end case 203 204 end if 205 130 206 end repeat 131 207 end repeat … … 541 617 memref.filename = memref.filename 542 618 else 543 if memref.type = #script then 544 aPath = mGetFilePathFromMemberComments(me, memref, isMac, CurrentOSXUserName) 545 if length(aPath) > 0 then 546 dertext = mGetTextFromFile(me, aPath) 547 if length(dertext) > 0 then 548 put "updating scripttext of member:" memref.name && "(" & memref & ")" 549 memref.scripttext = dertext 619 if memref.type = #script then 620 aPath = mGetFilePathFromMemberComments(me, memref, isMac, CurrentOSXUserName) 621 if length(aPath) > 0 then 622 dertext = mGetTextFromFile(me, aPath) 623 if length(dertext) > 0 then 624 put "updating scripttext of member:" memref.name && "(" & memref & ")" 625 memref.scripttext = dertext 626 end if 550 627 end if 551 628 end if 552 end if553 629 end if 554 630 end repeat … … 913 989 comm = memref.comments 914 990 if comm.length then 915 991 916 992 aPath = mGetFilePathFromMemberComments(me, memref, isMac, CurrentOSXUserName) 917 993 918 994 if length(aPath) > 0 then 919 920 fio = (xtra "fileio").new() 921 if objectP(fio) then 922 fio.openFile(aPath, 0) 923 if fio.status() = 0 then 924 vergText = fio.readFile() 925 fio.closeFile() 926 memscr = memref.scripttext 927 if vergText <> memscr then 928 929 isEqual = 0 930 if mCheckForXtra(me, "Pregex") = 1 then 995 996 fio = (xtra "fileio").new() 997 if objectP(fio) then 998 fio.openFile(aPath, 0) 999 if fio.status() = 0 then 1000 vergText = fio.readFile() 1001 fio.closeFile() 1002 memscr = memref.scripttext 1003 if vergText <> memscr then 931 1004 932 memscrLi = [memscr] 933 pregex_replace(memscrLi, "\s", "ig", "") 934 memscrLi = memscrLi[1] 1005 isEqual = 0 1006 if mCheckForXtra(me, "Pregex") = 1 then 1007 1008 memscrLi = [memscr] 1009 pregex_replace(memscrLi, "\s", "ig", "") 1010 memscrLi = memscrLi[1] 1011 1012 vergTextLi = [vergText] 1013 pregex_replace(vergTextLi, "\s", "ig", "") 1014 vergTextLi = vergTextLi[1] 1015 1016 isEqual = (memscrLi = vergTextLi) 1017 end if 935 1018 936 vergTextLi = [vergText] 937 pregex_replace(vergTextLi, "\s", "ig", "") 938 vergTextLi = vergTextLi[1] 939 940 isEqual = (memscrLi = vergTextLi) 941 end if 942 943 if isEqual = 0 then 944 945 if length(bbdiffpath) < 1 then 1019 if isEqual = 0 then 946 1020 947 948 if not(the platform contains "mac") then 949 put "-------------------------------------------------------" 950 put RETURN&"neuer = new(#field)"&RETURN&"neuer.text = "&memref&".scripttext"&RETURN&"neuer.copyToClipBoard()"&RETURN&"neuer.erase()"&RETURN 951 put RETURN&"shell_cmd(""E&"PBPaste | BBedit ; BBedit "&memref.comments"E&")"&RETURN 952 else 1021 if length(bbdiffpath) < 1 then 953 1022 954 if (mCheckForXtra(me, "Shell") + mCheckForXtra(me, "ff_shell")) = 0 then 1023 1024 if not(the platform contains "mac") then 955 1025 put "-------------------------------------------------------" 956 1026 put RETURN&"neuer = new(#field)"&RETURN&"neuer.text = "&memref&".scripttext"&RETURN&"neuer.copyToClipBoard()"&RETURN&"neuer.erase()"&RETURN 957 1027 put RETURN&"shell_cmd(""E&"PBPaste | BBedit ; BBedit "&memref.comments"E&")"&RETURN 958 959 1028 else 960 1029 961 neuer = new(#field) 962 neuer.text = memscr 963 neuer.copyToClipBoard() 964 neuer.erase() 965 mDoShellCmd(me, "PBPaste | BBedit ; BBedit "&memref.comments) 1030 if (mCheckForXtra(me, "Shell") + mCheckForXtra(me, "ff_shell")) = 0 then 1031 put "-------------------------------------------------------" 1032 put RETURN&"neuer = new(#field)"&RETURN&"neuer.text = "&memref&".scripttext"&RETURN&"neuer.copyToClipBoard()"&RETURN&"neuer.erase()"&RETURN 1033 put RETURN&"shell_cmd(""E&"PBPaste | BBedit ; BBedit "&memref.comments"E&")"&RETURN 1034 1035 else 1036 1037 neuer = new(#field) 1038 neuer.text = memscr 1039 neuer.copyToClipBoard() 1040 neuer.erase() 1041 mDoShellCmd(me, "PBPaste | BBedit ; BBedit "&memref.comments) 1042 1043 end if 966 1044 967 1045 end if 968 1046 1047 else 1048 1049 1050 tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1", 1) 1051 tempSrcPath = tempSrcPath[1] 1052 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1) 1053 tempSrcHFSPath = tempSrcHFSPath[1] 1054 1055 mSaveTextToTempFile(me, memref.scripttext, tempSrcHFSPath) 1056 1057 -- comm = memref.comments 1058 -- if comm.length then 1059 -- if char 1 of comm = "~" then 1060 -- put shell_Cmd("echo -n $HOME") into char 1 of comm 1061 -- end if 1062 -- end if 1063 1064 mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E) 1065 1066 memref.scripttext = mGetTextFromFile(me, tempSrcHFSPath) 1067 969 1068 end if 970 971 else972 973 974 tempSrcPath = mDoShellCmd(me, "mktemp -t temp_BBDiff_file1", 1)975 tempSrcPath = tempSrcPath[1]976 tempSrcHFSPath = mDoShellCmd(me, "osascript -e" && QUOTE & "return POSIX file \" & QUOTE & tempSrcPath & "\" & QUOTE & " as string" & QUOTE, 1)977 tempSrcHFSPath = tempSrcHFSPath[1]978 979 mSaveTextToTempFile(me, memref.scripttext, tempSrcHFSPath)980 981 -- comm = memref.comments982 -- if comm.length then983 -- if char 1 of comm = "~" then984 -- put shell_Cmd("echo -n $HOME") into char 1 of comm985 -- end if986 -- end if987 988 mDoShellCmd(me, bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E)989 990 memref.scripttext = mGetTextFromFile(me, tempSrcHFSPath)991 1069 992 1070 end if 993 1071 1072 994 1073 end if 995 996 1074 997 1075 end if 998 1076 999 1077 end if 1000 1001 end if1002 1078 end if 1003 1079 end if
Note: See TracChangeset
for help on using the changeset viewer.
