Changeset 23 for trunk/lingosource
- Timestamp:
- 09/14/07 12:16:07 (5 years ago)
- Location:
- trunk/lingosource/castlib1
- Files:
-
- 2 edited
-
OSCmenu_Utilities.ls (modified) (1 diff)
-
alexUtilities.ls (modified) (68 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib1/OSCmenu_Utilities.ls
r21 r23 294 294 295 295 glob[#copy2ClipBoard] = 0 296 glob[#theTargetInstance] = new(script "alexUtilities") 296 297 alexUtilities = new(script "alexUtilities") 298 alexUtilities.setaprop(#pHandlerMenuWindowName, (the activewindow).name) 299 glob[#theTargetInstance] = alexUtilities 297 300 298 301 if cmdli.word.count then -
trunk/lingosource/castlib1/alexUtilities.ls
r21 r23 3 3 4 4 property ancestor 5 6 7 -- since this script runs in "stage scope" we just set the name off the handlerMenu window 8 -- so that this script can "tell" something to the window, where it originates from => the tool miaw window 9 -- this is used for the "mDisplayWaitStatusText" and "mSwitchToStatusMode" handler at the moment 10 property pHandlerMenuWindowName 11 property pStatusMode -- are we in "show status" mode => maximized 12 5 13 6 14 on new me … … 73 81 dertext = mGetTextFromFile(me, pfad) 74 82 if length(dertext) > 0 then 83 mSwitchToStatusMode me, 1 75 84 theResult = mGetListFromXMLString(me, dertext) 85 mSwitchToStatusMode me, 0 76 86 end if 77 87 return theResult … … 477 487 if thePath = 0 then exit 478 488 489 479 490 mp = the moviepath 480 491 if length(mp) < 1 then mp = the applicationpath 492 493 481 494 482 495 theType = string(theType) … … 495 508 496 509 if not(["jpg", "png", "bmp", "pct"].getPos(theType)) then exit 510 511 mSwitchToStatusMode me, 1 497 512 498 513 useMemberName = (the last char of thePath = the last char of mp) … … 522 537 end repeat 523 538 end repeat 539 540 mSwitchToStatusMode me, 0 541 524 542 end 525 543 … … 816 834 -- put mFindInGPDL("") 817 835 on mFindInGPDL me, str -- durchsucht alle behavior initializers in diesem movie nach <str> 836 837 mSwitchToStatusMode me, 1 838 818 839 letzterframe = the lastframe 819 840 letzterkanal = the lastChannel … … 835 856 end repeat 836 857 end repeat 858 859 mSwitchToStatusMode me, 0 860 837 861 return retlist 838 862 end … … 979 1003 980 1004 on mListallPuts me 1005 1006 mSwitchToStatusMode me, 1 1007 1008 mDisplayWaitStatusText me, "See the message window for results of search" 1009 981 1010 cnum = the number of castlibs 982 1011 repeat with l = 1 to cnum … … 1028 1057 if not(linWOQuote contains " after ") then 1029 1058 if not(linWOQuote contains " before ") then 1059 1060 mDisplayWaitStatusText me, theLine 1061 1030 1062 put "-----------" 1031 1063 le = length(st.line[1 .. r-1]) … … 1042 1074 end repeat 1043 1075 end repeat 1076 1077 mSwitchToStatusMode me, 0 1078 1044 1079 end 1045 1080 … … 1969 2004 exit 1970 2005 end if 2006 2007 mSwitchToStatusMode me, 1 1971 2008 1972 2009 -- loop through all castlibs: … … 2041 2078 fx = 0 2042 2079 fio = 0 2080 2081 mSwitchToStatusMode me, 0 2082 2043 2083 end 2044 2084 … … 3192 3232 end if 3193 3233 3194 shell_cmd(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E)3234 theResult = shell_cmd_list(bbdiffpath & " --ignore-curly-quotes --ignore-spaces --wait --resume " "E& tempSrcPath "E&"E& comm "E && "2>&1") 3195 3235 3196 3236 -- since we used the --wait and the --resume switch, we will only come to this line AFTER the diff process in bbedit is finished 3197 3237 3198 3199 -------- now write the results of the BBEdit diff back into the script members 3200 scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 3201 3202 3203 if convertLineBreaksToUnix = 1 then 3204 ------------------------------------------ trac subversion support works better with unix linebreaks... 3205 if mCheckForXtra(me, "Pregex") = 1 then 3206 3207 scrTextLi = [scrText] 3208 if the platform contains "mac" then 3209 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 3210 else 3211 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 3212 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 3213 end if 3214 scrText = scrTextLi[1] 3215 3216 else 3217 3218 if the platform contains "mac" then 3238 if count(theResult) > 0 then 3239 alert "No differences found" 3240 3241 else 3242 3243 -------- now write the results of the BBEdit diff back into the script members 3244 scrText = mGetTextFromTempFile(me, tempSrcHFSPath) 3245 3246 3247 if convertLineBreaksToUnix = 1 then 3248 ------------------------------------------ trac subversion support works better with unix linebreaks... 3249 if mCheckForXtra(me, "Pregex") = 1 then 3219 3250 3220 -- first convert windows to mac 3221 fndStr = numToChar(13) & numToChar(10) 3222 offs = offset(fndStr, scrText) 3223 repeat while offs > 0 3224 put numToChar(13) into char offs to offs+1 of scrText 3225 offs = offset(fndStr, scrText) 3226 end repeat 3227 3228 -- now convert unix to mac 3229 fndStr = numToChar(10) 3230 offs = offset(fndStr, scrText) 3231 repeat while offs > 0 3232 put numToChar(13) into char offs of scrText 3233 offs = offset(fndStr, scrText) 3234 end repeat 3251 scrTextLi = [scrText] 3252 if the platform contains "mac" then 3253 pregex_replace(scrTextLi, "\x0D?\x0A", "g", "\x0D") 3254 else 3255 pregex_replace(scrTextLi, "\x0D([^\x0A])", "g", "\x0D\x0A\1") 3256 pregex_replace(scrTextLi, "([^\x0D])\x0A", "g", "\1\x0D\x0A") 3257 end if 3258 scrText = scrTextLi[1] 3235 3259 3236 3260 else 3237 3261 3238 fndStr = numToChar(13) & numToChar(10)3239 offs = offset(fndStr, scrText)3240 repeat while offs > 03241 put "ÀÀÀ" into char offs+1 of scrText3262 if the platform contains "mac" then 3263 3264 -- first convert windows to mac 3265 fndStr = numToChar(13) & numToChar(10) 3242 3266 offs = offset(fndStr, scrText) 3243 end repeat3244 3245 3246 fndStr = numToChar(10)3247 offs = offset(fndStr, scrText)3248 repeat while offs > 03249 put numToChar(13) & numToChar(10) into char offs of scrText3267 repeat while offs > 0 3268 put numToChar(13) into char offs to offs+1 of scrText 3269 offs = offset(fndStr, scrText) 3270 end repeat 3271 3272 -- now convert unix to mac 3273 fndStr = numToChar(10) 3250 3274 offs = offset(fndStr, scrText) 3251 end repeat3252 3253 3254 3255 fndStr = numToChar(13) & "ÀÀÀ"3256 offs = offset(fndStr, scrText)3257 repeat while offs > 03258 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText3275 repeat while offs > 0 3276 put numToChar(13) into char offs of scrText 3277 offs = offset(fndStr, scrText) 3278 end repeat 3279 3280 else 3281 3282 fndStr = numToChar(13) & numToChar(10) 3259 3283 offs = offset(fndStr, scrText) 3260 end repeat 3261 3262 3263 3264 fndStr = "ÀÀÀ" 3265 offs = offset(fndStr, scrText) 3266 repeat while offs > 0 3267 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 3284 repeat while offs > 0 3285 put "ÀÀÀ" into char offs+1 of scrText 3286 offs = offset(fndStr, scrText) 3287 end repeat 3288 3289 3290 fndStr = numToChar(10) 3268 3291 offs = offset(fndStr, scrText) 3269 end repeat 3292 repeat while offs > 0 3293 put numToChar(13) & numToChar(10) into char offs of scrText 3294 offs = offset(fndStr, scrText) 3295 end repeat 3296 3297 3298 3299 fndStr = numToChar(13) & "ÀÀÀ" 3300 offs = offset(fndStr, scrText) 3301 repeat while offs > 0 3302 put numToChar(13) & numToChar(10) into char offs to offs+3 of scrText 3303 offs = offset(fndStr, scrText) 3304 end repeat 3305 3306 3307 3308 fndStr = "ÀÀÀ" 3309 offs = offset(fndStr, scrText) 3310 repeat while offs > 0 3311 put numToChar(13) & numToChar(10) into char offs to offs+2 of scrText 3312 offs = offset(fndStr, scrText) 3313 end repeat 3314 3315 end if 3270 3316 3271 3317 end if 3272 3318 ----------------------------------------- 3273 3319 end if 3274 ----------------------------------------- 3320 3321 3322 memref.scripttext = scrText 3323 3275 3324 end if 3276 3325 3277 3278 memref.scripttext = scrText 3279 3280 end if 3326 exit -- we only proceed one script member 3327 3328 3329 end if 3330 3281 3331 3282 3332 end repeat 3283 3333 end repeat 3284 3285 3286 3287 3288 3289 3334 3290 3335 … … 3362 3407 3363 3408 theFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, 0, workingCopies, "No working copy is specified for this movies scripttext. Please select a working copy for the scripttext now.") 3409 -- put "mFindWorkingCopyCounterpart: theFolder:" && theFolder 3364 3410 3365 3411 if length(theFolder) < 1 then return "" … … 3381 3427 if theFoldername <> "castlib" & m then 3382 3428 3383 newPath = theFolder & "castlib" & m 3429 newPath = theFolder & "castlib" & m & delim 3384 3430 3385 3431 if baFolderExists(newPath) = 0 then … … 3396 3442 else 3397 3443 3398 theFolder = newPath 3444 if count(infolist) < 1 then 3445 3446 alert "The specified folder doesn't seem to contain info for this castlib: file memberInfo.xml missing." 3447 return "" 3448 3449 else 3450 theFolder = newPath 3451 end if 3399 3452 3400 3453 end if … … 3430 3483 repeat with l = 1 to cnt 3431 3484 li = infolist[l] 3485 -- put "memberName:" && li.getaprop(#memberName) 3432 3486 if li.getaprop(#memberName) = memref.name then 3433 3487 … … 3436 3490 fpath = theFolder & fname & ".ls" 3437 3491 3492 -- put "path:" && fpath 3493 3438 3494 if baFileExists(fpath) then return fpath 3439 3495 … … 3450 3506 3451 3507 on mExportScriptsToFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, chooseNewPath 3508 3452 3509 mExportAllScriptsToDiskWithFolder me, skipIcons, selectionOnly, convertLineBreaksToUnix, void, chooseNewPath 3510 3453 3511 end 3454 3512 … … 3502 3560 3503 3561 3562 mSwitchToStatusMode me, 1 3504 3563 3505 3564 repeat with m = firstCastNum to lastCastNum … … 3510 3569 if err <> 1 then 3511 3570 alert "Failed to create directory:" && thisFolder 3571 mSwitchToStatusMode me, 0 3512 3572 exit 3513 3573 end if … … 3538 3598 3539 3599 memname = memref.name 3600 3601 3602 mDisplayWaitStatusText me, "Processing member:" && memname 3603 3540 3604 3541 3605 scrText = memref.scripttext … … 3733 3797 end repeat 3734 3798 3799 mSwitchToStatusMode me, 0 3800 3735 3801 end 3736 3802 … … 3807 3873 3808 3874 if mCheckForXtra(me, "budapi") then 3875 3876 mSwitchToStatusMode me, 1 3809 3877 3810 3878 if baFileExists(thePath & "memberInfo.xml") then … … 3821 3889 end if 3822 3890 3891 mSwitchToStatusMode me, 0 3892 3823 3893 else 3824 3894 … … 4011 4081 spath = thePath 4012 4082 end if 4083 4084 4085 mDisplayWaitStatusText me, "Importing file:" && spath 4086 4013 4087 4014 4088 scrtext = mGetTextFromFile(me, spath) … … 4226 4300 fio = 0 4227 4301 4302 4303 mDisplayWaitStatusText me, "Imported file:" && spath && "into member" && scr 4304 4305 4228 4306 return 1 4229 4307 … … 4254 4332 end if 4255 4333 4334 mSwitchToStatusMode me, 1 4335 mDisplayWaitStatusText me, "Updating folder:" && workingFolder 4336 4256 4337 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 4338 4339 mSwitchToStatusMode me, 0 4257 4340 4258 4341 if count(theresult) > 0 then … … 4466 4549 theResult = mSVN_Commit_CurrentMovie_Binaries(me, chooseNewPath, commitMsg, 1) 4467 4550 4551 4468 4552 end 4469 4553 … … 4482 4566 end if 4483 4567 4568 4484 4569 theResult = mSVN_Commit_CurrentScripts_ScriptText(me, castlib(the activecastlib), chooseNewPath, commitMsg, 1, selectionList) 4485 4570 4486 4571 theResult = mSVN_Commit_SelectedCastlib(me, chooseNewPath, commitMsg, 1, 0, selectionList) 4572 4487 4573 4488 4574 end … … 4536 4622 end if 4537 4623 4624 4625 4538 4626 put "Committing castlibs:" && castlibList 4539 4627 … … 4591 4679 4592 4680 4681 mSwitchToStatusMode me, 1 4682 mDisplayWaitStatusText me, "Committing castlibs:" && castlibList 4683 4593 4684 4594 4685 … … 4616 4707 if offs <> 1 then 4617 4708 alert "Castlib" && castlib(actCL) && "is not within your current moviepath. This is not supported." 4709 mSwitchToStatusMode me, 0 4618 4710 return 0 4619 4711 end if … … 4633 4725 4634 4726 -- must be something REALLY wrong, as the filename should ALWAYS be of any length (internal castlibs ) 4727 mSwitchToStatusMode me, 0 4635 4728 return 0 4636 4729 … … 4677 4770 -- repeat with cl in castlibList 4678 4771 --------------------------------------- 4772 4773 mDisplayWaitStatusText me, "SVN update of:" && castlibList[r][3] 4774 4679 4775 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & castlibList[r][3] & QUOTE) 4680 4776 … … 4687 4783 end if 4688 4784 alert "Can't proceed svn error while trying to update:" && theError 4785 mSwitchToStatusMode me, 0 4689 4786 return 0 4690 4787 end if … … 4706 4803 if isChanged = 0 then 4707 4804 alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 4805 mSwitchToStatusMode me, 0 4708 4806 return 0 4709 4807 end if … … 4716 4814 end repeat 4717 4815 4816 4817 mDisplayWaitStatusText me, "SVN commit for:" && pathStr 4818 4718 4819 theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE & pathStr) 4719 4820 … … 4732 4833 4733 4834 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 4835 4836 mSwitchToStatusMode me, 0 4734 4837 4735 4838 return 1 … … 4775 4878 end if 4776 4879 4880 mSwitchToStatusMode me, 1 4881 4882 mDisplayWaitStatusText me, "Saving movie..." 4883 4777 4884 saveMovie() 4885 4886 else 4887 4888 mSwitchToStatusMode me, 1 4889 4778 4890 end if 4779 4891 ---------------------------------------- … … 4786 4898 if erg <> 0 then 4787 4899 alert "An error occurred during copying the movie:" && erg 4900 mSwitchToStatusMode me, 0 4788 4901 return 0 4789 4902 end if … … 4801 4914 if offs <> 1 then 4802 4915 alert "Castlib" && castlib(n) && "is not within your current moviepath. This is not supported." 4916 mSwitchToStatusMode me, 0 4803 4917 return 0 4804 4918 end if … … 4831 4945 4832 4946 --------------------------------------- 4947 mDisplayWaitStatusText me, "SVN update for:" && workingFolder 4948 4833 4949 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolder & QUOTE) 4834 4950 … … 4841 4957 end if 4842 4958 alert "Can't proceed svn error while trying to update:" && theError 4959 mSwitchToStatusMode me, 0 4843 4960 return 0 4844 4961 end if … … 4858 4975 if cnt < 1 then 4859 4976 alert "Apparently there are no changes to the most recent version in the svn repository: svn status is empty" 4977 mSwitchToStatusMode me, 0 4860 4978 return 0 4861 4979 end if … … 4873 4991 -- we only put a message, so the user is made aware of this fact 4874 4992 put "Missing file!" && answ && "is missing here, but present in the repository" 4993 mDisplayWaitStatusText me, "Missing file!" && answ && "is missing here, but present in the repository" 4875 4994 4876 4995 "?": -- newly added file … … 4878 4997 4879 4998 put "Added file" && answ && "to the repository" 4999 mDisplayWaitStatusText me, "Added file" && answ && "to the repository" 4880 5000 4881 5001 "m": 4882 5002 -- just log the changes: 4883 5003 put "Update file:" && answ 5004 mDisplayWaitStatusText me, "Update file:" && answ 4884 5005 4885 5006 end case 4886 5007 4887 5008 end repeat 5009 5010 mDisplayWaitStatusText me, "SVN commit of:" && workingFolder 4888 5011 4889 5012 theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE && QUOTE & workingFolder & QUOTE) … … 4903 5026 4904 5027 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 5028 5029 mSwitchToStatusMode me, 0 4905 5030 4906 5031 return 1 … … 4971 5096 4972 5097 5098 mSwitchToStatusMode me, 1 5099 4973 5100 4974 5101 doReturnToOldMovie = 0 4975 5102 4976 5103 if (onlyUpdate_SVN_WorkingFolder <> 1) or (the moviepath contains workingFolder) then 5104 5105 mDisplayWaitStatusText me, "Temporary switch to new movie in order to replace files" 4977 5106 4978 5107 ------------------------------ … … 4999 5128 5000 5129 5130 mDisplayWaitStatusText me, "SVN update:" && newpathUnix 5131 5001 5132 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & newpathUnix & QUOTE) 5002 5133 … … 5049 5180 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 5050 5181 5182 mSwitchToStatusMode me, 0 5183 5051 5184 end 5052 5185 … … 5063 5196 workingFolder = mGetWorkingCopyPath(me, the moviepath & the moviename, chooseNewPath, workingCopies, "No working copy is specified for this movies binaries (director files). Please select a working copy of the director files.") 5064 5197 if length(workingFolder) < 1 then exit 5198 5199 5200 mSwitchToStatusMode me, 1 5201 5065 5202 5066 5203 if the platform contains "mac" then … … 5080 5217 if (onlyUpdate_SVN_WorkingFolder <> 1) or (the moviepath contains workingFolder) then 5081 5218 5219 5220 mDisplayWaitStatusText me, "Temporary switch to new movie in order to replace files" 5221 5082 5222 ------------------------------ 5083 5223 -- close this movie by issuing a "new movie..." command … … 5090 5230 end if 5091 5231 5232 mDisplayWaitStatusText me, "SVN update:" && workingFolderUnix 5233 5092 5234 theresult = shell_cmd_list(svnBinary && "update" && QUOTE & workingFolderUnix & QUOTE) 5093 5235 … … 5130 5272 5131 5273 setPref("svn_wCopies_paths_Binary.txt", string(workingCopies)) 5274 5275 5276 mSwitchToStatusMode me, 0 5132 5277 5133 5278 end … … 5216 5361 5217 5362 5363 statusSwitched = mSwitchToStatusMode(me, 1) 5218 5364 5219 5365 clibfolder = "" … … 5270 5416 if count(castlibList) < 1 then 5271 5417 alert "No castlib selected. The parameter didn't yiled a valid list. Make sure, that you provide a linear list with integers, specifying a number of a castlib each." 5418 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 5272 5419 return 0 5273 5420 end if 5274 5421 5422 5423 5424 mDisplayWaitStatusText me, "Commiting scripttext for castlibs:" && castlibList 5275 5425 5276 5426 put "Commiting scripttext for castlibs:" && castlibList … … 5285 5435 5286 5436 selected_Members_Only = castlib(castlibList[n]) 5437 5438 mDisplayWaitStatusText me, "Saving castlib:" && selected_Members_Only 5287 5439 5288 5440 selected_Members_Only.save() … … 5311 5463 else -- treat all: 5312 5464 5465 mDisplayWaitStatusText me, "Saving movie..." 5466 5313 5467 saveMovie() 5314 5468 5315 5469 mExportAllScriptsToDiskWithFolder me, 1, selected_Members_Only, 1, workingFolder 5316 5470 5317 castlibList = []5471 castlibList = 0 5318 5472 5319 5473 end if … … 5324 5478 5325 5479 -------- if we work on only one castlib: 5326 if length(clibfolder) then workingFolder = clibfolder5480 if length(clibfolder) > 0 then workingFolder = clibfolder 5327 5481 -------- 5328 5482 … … 5334 5488 if the last char of workingFolder = the last char of the applicationpath then delete the last char of workingFolder 5335 5489 end if 5490 5336 5491 5337 5492 workingFolder = " " & QUOTE & workingFolder & QUOTE … … 5357 5512 5358 5513 put " " & QUOTE & castlibList[n][3] & QUOTE after workingFolder 5514 5359 5515 end repeat 5360 5516 5361 5517 end if 5518 5519 5520 mDisplayWaitStatusText me, "SVN update of:" && workingFolder 5362 5521 5363 5522 … … 5373 5532 end if 5374 5533 alert "Can't proceed svn error while trying to update:" && theError 5534 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 5375 5535 return 0 5376 5536 end if … … 5381 5541 if cnt < 1 then 5382 5542 alert "Apparently there are no changes to the scripts of the most recent version in the svn repository: svn status is empty" 5543 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 5383 5544 return 0 5384 5545 end if … … 5397 5558 put "Missing file!" && answ && "is missing here, but present in the repository" 5398 5559 5560 mDisplayWaitStatusText me, "Missing file!" && answ && "is missing here, but present in the repository" 5561 5562 5399 5563 "?": -- newly added file 5400 5564 shell_cmd_list(svnBinary && "add" && QUOTE & answ & QUOTE) 5401 5565 5402 5566 put "Added file" && answ && "to the repository" 5567 5568 mDisplayWaitStatusText me, "Added file" && answ && "to the repository" 5403 5569 5404 5570 "m": … … 5406 5572 put "Update file:" && answ 5407 5573 5574 mDisplayWaitStatusText me, "Update file:" && answ 5575 5408 5576 end case 5409 5577 5410 5578 end repeat 5411 5579 5412 5580 mDisplayWaitStatusText me, "SVN commit:" && workingFolder 5413 5581 5414 5582 theresult = shell_cmd_list(svnBinary && "ci --message" && QUOTE & msg & QUOTE & workingFolder) … … 5432 5600 setPref("svn_workingCopies_paths.txt", string(workingCopies)) 5433 5601 5602 5603 if statusSwitched = 1 then statusSwitched = mSwitchToStatusMode(me, 0) 5434 5604 5435 5605 return 1 … … 5644 5814 5645 5815 5816 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5817 5818 on mSwitchToStatusMode me, On_Off 5819 5820 retval = 0 5821 5822 if pStatusMode = On_Off then return retval 5823 pStatusMode = 0 5824 5825 pHandlerMenuWindowName = string(pHandlerMenuWindowName) 5826 if length(pHandlerMenuWindowName) < 1 then return retval 5827 w = window(pHandlerMenuWindowName) 5828 5829 if ilk(w) <> #window then return retval 5830 5831 retval = 1 5832 5833 pStatusMode = On_Off 5834 5835 r = w.rect 5836 5837 tell w 5838 5839 spr = sprite(xscr().mGetkanal(#helpTextSprite)) 5840 5841 if On_Off = 1 then 5842 5843 member("statusOutput").text = "The following operation may take some time..." 5844 spr.member = member("statusOutput") 5845 5846 newRect = rect(r.left, r.top, r.right, r.top + spr.rect.bottom) 5847 5848 if (label("withSearch") <> marker(0)) then 5849 go "withSearch" 5850 end if 5851 5852 else 5853 5854 spr.member = member("helptext") 5855 5856 newRect = rect(r.left, r.top, r.right, r.top + spr.rect.top) 5857 5858 if (label("withoutSearch") <> marker(0)) then go "withoutSearch" 5859 5860 end if 5861 5862 updatestage 5863 end tell 5864 5865 w.rect = newRect 5866 5867 return retval 5868 5869 end 5870 5871 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 5872 5873 on mDisplayWaitStatusText me, str 5874 5875 if pStatusMode = 0 then exit 5876 5877 pHandlerMenuWindowName = string(pHandlerMenuWindowName) 5878 if length(pHandlerMenuWindowName) < 1 then exit 5879 w = window(pHandlerMenuWindowName) 5880 5881 if ilk(w) <> #window then exit 5882 5883 tell w 5884 member("statusOutput").setContentsAfter(RETURN & str) 5885 updatestage 5886 5887 end tell 5888 5889 end 5890 5891 5646 5892 5647 5893 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note: See TracChangeset
for help on using the changeset viewer.
