Re: Smile dialogs
Re: Smile dialogs
- Subject: Re: Smile dialogs
- From: "Jason W. Bruce" <email@hidden>
- Date: Sat, 25 Nov 2000 11:45:21 -0600
Hi Paul,
Please don't take this to be a knock against Smile. I'm the biggest fan
of it and Emmanuel's behind you and Peter Fine. To me, however, Smile's
greatest strength is not its debugging features, but its openness,
scriptability, GUI-builder, coercions, and object orientation. These areas
are where it really shines.
The process of debugging in a window in which the scope and persistence
of variables may differ from the scope and persistence of those same
variables in your main script seems to me to be inherently bug prone. The
practice of writing solid code is as much a matter of adhering to safe
procedures during the coding process as it is a matter of knowing the
algorithms and the language. For this reason, I write and debug my scripts
in script windows, and use Text Windows as a diagnostic tool only.
Many things work differently in text windows and script windows which
cannot simply be remedied by prefixing them with "my." When used in a text
window, for example, the terms "me" refers to Smile's Text Window class
script. In a script window, these terms of course refer to the script in
the script window. The run script command will succeed in some instances in
text windows and not in script windows. And certain list referencing
techniques which must be at the top level in a script window will work
within a handler in a text window, as you yourself pointed out to me some
months ago.
One of the goals of object-oriented languages is to achieve efficiency
by permitting the use of the same terms to do different things depending
upon the context. It seems to me to be fundamental that differences in the
treatment of scope and persistence of handlers and variables between text
windows and script windows can have important implications with respect to
this goal.
Remember, I'm a big fan of Smile and find its debugging features to be
quite useful. I just think they should be leveraged carefully.
Jason Bruce
----------
>
Message: 5
>
Date: Fri, 24 Nov 2000 10:51:39 -0800
>
Subject: Re: Smile dialogs
>
From: Paul Berkowitz <email@hidden>
>
To: Applescript-Users <email@hidden>
>
>
On 11/24/00 10:16 AM, "Jason W. Bruce" <email@hidden> wrote:
>
>
> You call Smile dialogs by path name.
>
<snip>
>
>
Jason,
>
>
Your commentary on Smile is very useful, and your discussion of Smile
>
dialogs (which I haven't played with yet myself) particularly instructive.
>
I'm wondering a bit about the following:
>
>
> For me, the biggest problem
>
> with Smile's debugging features is that you debug in text windows as opposed
>
> to script windows. Because variables in text windows have global scope and
>
> persistence, which is what allows you to debug them, you sometimes have to
>
> make changes to the script when transferring it between a text window and a
>
> script window. This means that you're not debugging your actual script, but
>
> rather a copy of a portion of your script.
>
>
I haven't found much of a problem with this, except when trying to use the
>
"enter whole handler" feature. That's where you're meant to be able to to
>
enter an entire handler which is then treated as a single variable when
>
debugging in a main script. The trouble is that if it contains references to
>
global variables or properties, it will have to include the word "my" before
>
any such reference if the global or property is first defined in the main
>
script (or, rather more cumbersome but also quite rare, the "my" will have
>
to be in the main script instead if a global variable is first defined in
>
the handler). But since just leaving in the "my" in the handler, rather than
>
removing it when transferring to a script window, doesn't in fact cause any
>
problems, I'm wondering when and where you ever have to rewrite a script
>
when transferring it to a script window. Can you give an example? I do not
>
recall ever having had to do this, and I have written several hundred
>
scripts in Smile. I'm wondering what you might mean.
>
>
I find the debugging capabilities of Smile excellent, although every word
>
you say about the learning curve and the poor documentation is spot on.
>
People interested in Smile may want to check the review in
>
<http://www.AppleScriptSourcebook.com/index.html> (written by Peter Fine and
>
myself, to declare an interest) where we tried to remedy this to some extent
>
by providing a more detailed, and hopefully clearer, documentation for some
>
of Smile's basic functions than Smile itself offers. One thing not mentioned
>
there, which will eventually be remedied in an update, is that the global
>
persistence of variables is only true in text windows targeted to the same
>
application, or to none. That applies of course also to entire handlers. If
>
you want to avail yourself of Smile's debugging capabilities, you must enter
>
the variable or handler in a text window whose application context is the
>
same as the script you're debugging.
>
>
> And
>
> while the developer of Smile used to participate more frequently on this
>
> list, I haven't seen a post from him in quite awhile.
>
>
>
Emmanuel Levy is guarding his time available to work on Smile (he has been
>
carbonizing Smile for OS X, and is also planning a major update soon to
>
Smile 1.8) by no longer subscribing to this mailing list nor to MacScrpt.
>
But he is every bit as generous with his time to Smile users as he has
>
always been both on Smile's own mailing list:
>
>
email@hidden
>
>
with [SUL] in the subject
>
>
and if you write him privately at the same address, without [SUL] in the
>
subject. I have never known anyone to be so generous - and pleasant and
>
witty to boot - as Emmanuel, in giving help with a product, let alone a free
>
one.
>
>
--
>
Paul Berkowitz