Confusing Errors

Dan Friedman dan at clearvisiontech.com
Tue Mar 16 11:39:04 EDT 2010


Mark (and others),

Thanks for the info.   Here's some more...

The stack is not password protected.  I did use normal quotes (it wouldn't compile if I hadn't), the debugger presents quotes as single-quotes in it's errors.  And, currentTarget is a valid pointer to a field.  The stack wouldn't have opened if it wasn't.  Here is the snippet:

on mouseUp
  global activeRCMStudentIDNum
  global currentReportIDNum
  global currentTarget
  global GlobalModeOption
  global gStudentXML
  global pMode
  
  set cursor to watch
  lock screen
  
  put the IDNumber of currentTarget into fPane  --this is where it's tripping
  .
  .
  .

As you can see, it's the first [evaluated] line in the script.  If it matters, this is a modal dialog.  Also noteworthy, is that I can't repeat this error.  These reports are coming from users.  Also, they are coming from <1% of my users.  So for more than 99% of my clients, this isn't failing!

Are you as confused as me yet?   :)

-Dan



> Hi Dan,
> 
> The Line Num may be zero because your stack is protected by a  
> password. Sometimes the debugging tools just don't work properly and  
> can't find the offending line. It also happens that the actual error  
> occurs in a Revolution script library, which the debugger can't figure  
> out.
> 
> Looking at the error message, I wonder whether you really put single  
> quotes about stack names. If so, this is probably a cause of errors.
> 
> Something might be wrong with the variable currentTarget. Perhaps, you  
> need to include something like:
> 
> if there is a currentTarget then
>    -- your script
> else
>    beep
>    answer error "Error: can't find" && currentTarget with "OK"
> end if
> 
> It might help if you posted your script.
> 
> --
> Best regards,
> 
> Mark Schonewille

> >  -----------------------------------------------------------------------------------------
> >
> > Executing at 5:44:49 PM on Monday, March 15, 2010
> > Type: Object: does not have this property
> > Object: button 'Save' of card 'card id 1002' of stack 'EditComment'
> > Line: put the IDNumber of currentTarget into fPane
> > Line Num: 0
> > Hint: field id 1104880 of group id 1104445 of card id 1002 of stack
> > 'ReportWindow'
> >
>  -----------------------------------------------------------------------------------------



More information about the use-livecode mailing list