Re: what does this error mean?
Re: what does this error mean?
- Subject: Re: what does this error mean?
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 16 Jul 2010 16:34:48 -0400
Or just use "log", which in 10.6 osascript sends to stderr (and in SE
of course to the event log).
On Friday, July 16, 2010, Axel Luttgens <email@hidden> wrote:
>
> Le 15 juil. 2010 à 17:09:03, tom wible a écrit :
>
>>
>> On Jul 15, 2010, at 10:13 AM, axel wrote:
>>
>>> Where exactly does that "The variable rec is not defined" error occur?
>>
>> that's the problem: i can't seem to get anything out that localizes it:-( and running in s.e. doesn't show the problem:-(
>
> Hello Tom,
>
> A quick and dirty way could be to define a handler like this one:
>
> on LogMessage(Msg)
> do shell script "/usr/bin/logger -t TomsScripts " & quoted form of Msg
> end LogMessage
>
> and to call it from various relevant places so as to get some kind of trace in system.log.
>
> For example, guessing the overall organization of your code, you should face something like this:
>
> on initRecList()
> -- various statements
> -- possibly calls to other handlers
> end initRecList
>
> on NewRec()
> script rec
> on toList(n)
> -- various statements
> -- possibly calls to other handlers
> end toList
> -- other handlers
> end script
> end NewRec
>
> on listTDL()
> -- various statements, with possible calls to:
> initRecList()
> rec's toList(n)
> end listTDL
>
> You might then begin with:
>
> on initRecList()
> LogMessage("Entering initRecList()")
> -- various statements
> -- possibly calls to other handlers
> LogMessage("Leaving initRecList()")
> end initRecList
>
> on NewRec()
> script rec
> on toList(n)
> LogMessage("Entering rec's toList()")
> -- various statements
> -- possibly calls to other handlers
> end toList
> -- other handlers
> LogMessage("Leaving rec's toList()")
> end script
> end NewRec
>
> on listTDL()
> LogMessage("Entering listTDL()")
> -- various statements, with possible calls to:
> initRecList()
> rec's toList(n)
> LogMessage("Leaving listTDL()")
> end listTDL
>
> and look at the last message written to system.log before the error occurs.
> And so on, adding calls to LogMessage() where relevant for narrowing the location of the problematic code.
>
> HTH,
> Axel
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden