code works in debug mode, but not in run mode?
Josh Mellicker
josh at dvcreators.net
Fri Apr 21 15:07:27 EDT 2006
I am experienced a weird problem I thought someone could shed some
light on.
This is from my stack script:
ON startup
local tExternals = ""
put sys_appPath(true) & "/externals/EnhancedQT.bundle" & cr &
sys_appPath(true) & "/externals/EnhancedQT.dll" into tExternals
put tExternals into message
set the externals of this stack to tExternals
pass startup
END startup
FUNCTION sys_appPath pGetBundleFolder
local tPath = ""
put address into tPath
IF pGetBundleFolder = true AND platform() contains "Mac" AND
systemVersion() >= 10 THEN
get offset(".app/Contents/MacOS/", tPath)
IF it > 0 THEN -- 2.4.3 or later
delete char it to length(tPath) of tPath
END IF
ELSE IF platform() contains "Win" THEN
--?
END IF
set itemDel to slash
delete item -1 of tPath
set itemDel to ":"
delete item 1 of tPath
return tPath
END sys_appPath
______________________________________________________
If I go to the message box and type "startup", I get:
Message execution error:
Error description: Chunk: can't find card
(from "put tExternals into message")
______________________________________________________
Yet if I put a breakpoint in:
ON startup
breakpoint
local tExternals = ""
put sys_appPath(true) & "/externals/EnhancedQT.bundle" & cr &
sys_appPath(true) & "/externals/EnhancedQT.dll" into tExternals
put tExternals into message
set the externals of this stack to tExternals
pass startup
END startup
and step through it, I get the correct result:
/Applications/Revolution Enterprise/2.7.0-gm-1/externals/
EnhancedQT.bundle
/Applications/Revolution Enterprise/2.7.0-gm-1/externals/EnhancedQT.dll
______________________________________________________
Is this weird that this would work in debug mode but not in regular
run mode?
Sorry if this is something obvious, I am a beginner :-)
Josh
More information about the use-livecode
mailing list