Changeset 228 for trunk/lingosource/castlib2/commonMovieScript.ls
- Timestamp:
- 03/20/09 18:08:22 (3 years ago)
- File:
-
- 1 edited
-
trunk/lingosource/castlib2/commonMovieScript.ls (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lingosource/castlib2/commonMovieScript.ls
r215 r228 387 387 -- ACTION: Create/Get timeout object 388 388 -- This handler works the same with the old player <10 and the new player >=10 389 -- INPUT: || ÊtheName || string || name for new timeout object||390 -- || ÊtheDuration || integer || timeout perios in milliseconds||389 -- INPUT: || theName || string || name for new timeout object|| 390 -- || theDuration || integer || timeout perios in milliseconds|| 391 391 -- || theHandler || symbol || handler to be called on each timepout event|| 392 392 -- || theTarget || object || object to be sent the timeout event <theHandler>|| … … 1705 1705 -- dummy handler for translate function 1706 1706 1707 on mTranslate me, aString 1707 on mTranslate me, aString, variablesList 1708 1708 theGlobs = mGetGlobalList(me) 1709 1709 uebersetzungsListe = theGlobs.getaprop(#gUebersetzung) … … 1711 1711 uebersetzung = uebersetzungsListe.getaprop(aString) 1712 1712 if voidP(uebersetzung) then 1713 if listP(variablesList) then return mReplacePlaceHoldersInString(me, aString, variablesList) 1713 1714 return aString 1714 1715 else … … 1725 1726 end 1726 1727 1728 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1729 1730 on mReplacePlaceHoldersInString me, aString, variablesList 1731 if ilk(variablesList) = #proplist then 1732 cnt = count(variablesList) 1733 if cnt > 0 then 1734 repeat with n = 1 to cnt 1735 str = string(variablesList[n]) 1736 prop = variablesList.getPropAt(n) 1737 srchStr = "%%" & prop & "%%" 1738 len = length(srchStr) - 1 1739 offs = offset(srchStr, aString) 1740 repeat while offs > 0 1741 put str into char offs to offs + len of aString 1742 offs = offset(srchStr, aString) 1743 end repeat 1744 end repeat 1745 end if 1746 else if ilk(variablesList) = #list then -- printf like replacement 1747 if count(variablesList) > 0 then 1748 offs = offset("%s", aString) 1749 str = string(variablesList[1]) 1750 repeat while offs > 0 1751 put str into char offs to offs + 1 of aString 1752 if count(variablesList) > 1 then variablesList.deleteAt(1) 1753 offs = offset("%s", aString) 1754 end repeat 1755 end if 1756 end if 1757 return aString 1758 end 1727 1759 1728 1760 -- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Note: See TracChangeset
for help on using the changeset viewer.
