Script Editor problems

Ken Ray kray at sonsothunder.com
Thu Nov 27 21:52:52 CST 2008


> Thank you Klaus... I thought it was just me! I cannot step through any lines
> that refer to objects as the mc script editor immediately reports an 'no
> such object' (or similar) error. Is becoming a royal P.I.T.A. and am
> resorting to writing out to .txt debugging files, beeps, msg box put
> statements etc just to work around it.

OK guys, as I'm the "owner" of the VW, I think I have found the problem - it
appears that the "defaultStack" is being set in a handler which doesn't seem
to need it (which for some reason didn't affect the engine <3.0 but does
now).

Try this:

  edit script of cd 1 of stack "Variable Watcher"

Go to the "resetFocus" handler and comment out the line:

  set the defaultStack to tStack

So it looks like this:

on resetFocus
  put the debuggingScript of stack "Script Editor" into tEditorCard
  if tEditorCard is not empty then
    put wordOffset("stack",tEditorCard) into tWord
    if tWord <> 0 then
      put word (tWord+1) of tEditorCard into tStack
      if char 1 of tStack = quote then delete char 1 of tStack
      if char -1 of tStack = quote then delete char -1 of tStack
      if tStack is among the lines of the windows then
        --set the defaultStack to tStack
        if there is a button "Debug" of stack tStack then
          send "mouseDown" to btn "Debug" of stack tStack
        end if
        if there is a field "Editor Field" of stack tStack then
          focus field "Editor Field" of stack tStack
        end if
      end if
    end if
  end if
end resetFocus

Finally, save the VW:

  save stack "Variable Watcher"

Let me know if this works for you; if so, I'll include it with other
3.0-related enhancements I'm making (like support for multi-dimensional
arrays).

Thanks,


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the metacard mailing list