Farbflash projects: Imaging lingo table | 3-D scene list | Find all | Handler menu | Lingo message window

Ignore:
Timestamp:
04/06/08 11:11:43 (4 years ago)
Author:
alex
Message:

now with version checking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lingosource/castlib2/commonMovieScript.ls

    r150 r163  
    9191    pGList = [:] 
    9292    scr = mGetXScript(#regisx) 
    93     if not voidP(scr) then 
     93    if not listP(scr) then 
    9494      if mCheckForXtra(me, "BudAPI") = 1 then call(#regisb, scr) 
    9595      if mCheckForXtra(me, "vList") = 1 then call(#regisv, scr) 
     
    496496on mGetThisMovieName me 
    497497  glob = mGetGlobalList(me) 
    498   return string(glob.getaprop(#movieIdentifier)) 
     498  str = string(glob.getaprop(#movieIdentifier)) 
     499  if length(str) > 0 then return str 
     500  str = mSplitPath(me, the moviename).basename 
     501  mSetThisMovieName me, str 
     502  return str 
    499503end 
    500504 
     
    11961200-- xxxxxxxxxxxxxxxxxx stored script instances: 
    11971201 
    1198 on mGetInstance me, instName 
     1202on mGetInstance me, instName, useRawNew 
     1203   
    11991204  theGlobs = mGetGlobalList(me) 
    12001205  gParentScriptInstances = theGlobs.getaprop(#gParentScriptInstances) 
     
    12091214   
    12101215  if mGetMemType(me, member(instName)) = #script then 
    1211     saveScr = new(script instName) 
     1216    if useRawNew = 1 then saveScr = rawnew(script instName) 
     1217    else saveScr = new(script instName) 
    12121218    gParentScriptInstances.setaprop(instName, saveScr) 
    12131219    return saveScr 
    12141220  end if 
    12151221   
    1216    
     1222  if saveScr = -1 then return 0 
     1223  gParentScriptInstances.setaprop(instName, -1) 
    12171224  inst = mGetXScript(symbol(instName)) 
    1218   if objectP(inst) then 
    1219     saveScr = new(inst) 
     1225  if not(listP(inst)) then 
     1226    if ilk(inst) = #instance then inst = inst.script 
     1227    if useRawNew = 1 then saveScr = rawnew(inst) 
     1228    else saveScr = new(inst) 
    12201229    gParentScriptInstances.setaprop(instName, saveScr) 
    12211230    return saveScr 
     
    13561365    delim =  the last char of the moviepath 
    13571366    if length(delim) < 1 then 
    1358       delim = the last char of the applicationpath 
     1367       
     1368      if the runmode contains "plug" then 
     1369        delim = "/" 
     1370      else 
     1371        delim = the last char of the applicationpath 
     1372      end if 
     1373       
     1374       
    13591375      if length(delim) < 1 then delim = "/" 
    13601376    end if 
     
    13961412    mp = the moviepath 
    13971413    if length(mp) < 1 then 
     1414      if the runmode contains "plug" then 
     1415        mp = "" 
     1416      else 
    13981417      mp = the applicationpath 
     1418      end if 
    13991419      if length(mp) < 1 then 
    14001420        mp = "@/" 
     
    14121432    delim =  the last char of the moviepath 
    14131433    if length(delim) < 1 then 
    1414       delim = the last char of the applicationpath 
     1434       
     1435      if the runmode contains "plug" then 
     1436        mp = "" 
     1437      else 
     1438        delim = the last char of the applicationpath 
     1439      end if 
     1440       
     1441       
    14151442      if length(delim) < 1 then delim = "/" 
    14161443    end if 
     
    14821509    delim = the last char of the moviepath 
    14831510    if length(delim) < 1 then 
    1484       delim = the last char of the applicationpath 
     1511      if not(the runmode contains "plug") then 
     1512        delim = the last char of the applicationpath 
     1513      end if 
    14851514      if length(delim) < 1 then delim = "/" 
    14861515    end if 
Note: See TracChangeset for help on using the changeset viewer.