Constructing and calling a handler as "do"

Randall Lee Reetz randall at randallreetz.com
Tue Jan 15 21:49:46 EST 2008


Wow, i hate it when people like my ideas as much as i do... Makes you suspect.  Anyway, ya there are lots of pitfalls that may happen when one falls off the path.  The problem with live code (scripts your scripts modify on the fly) are that none of us quite know exactly how any particular runtime interpreter works.  But if all you re doing is conastructing messages... You will usually be fine.  Of course the rest of your code might need to keep aware of your current dels (or get in the habit of deliborately resetting your dels to the defaults right after your use is complete)... The other thing i to remember not to choose dels that may be present already in the source parts you will be linking up.  Like others hve said, little niceties like double clicking to select a handler in the script editor may not work.  Also, maybe someone else kows the char length limit for var, costume prop, and handler names.

Have fun,

randall 

-----Original Message-----
From: "Kay C Lan" <lan.kc.macmail at gmail.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: 1/15/2008 6:14 PM
Subject: Re: Constructing and calling a handler as "do"

On Jan 14, 2008 8:18 AM, Randall Lee Reetz <randall at randallreetz.com> wrote:

> I use delimeters so that i can auto deconstruct (this is much slower if
> one has to filter for cap letters).
>

This is lightning bolt brilliant!

I've had the odd occasion where I've needed to be able to 'interpret' and
'manipulate' an bunch of object names and have usually resorted to coming up
with some kind of naming convention that forces a prefix and/or suffix to be
a fixed number of char long so I can search for 'char 1 to 3' (or 4 or 5
or.....because looking for the offset of the char whose charToNum fell
between the range of 65 to 90 seemed more difficult to me that just going
with fixed length prefix/suffix) which typically resulted in names that
weren't as self evident as I'd like. To use an underscore, change the
itemDelimiter and search by item is so staring you in the face Rev chunk
obvious I can't believe I've spent so much time renaming things to fit my
ever-changing fixed width prefix/suffix system.

I'd like to try and blame Richard, for his excellent 'script style' bible,
but midWord capitalization for me dates back to the origin of HyperCard so
it's a habit that clearly blinded me to the advantages that could be
afforded by using a naming convention which ALSO incorporated taking
advantage of chunk expressions.

Randall, any tips, tricks or pitfalls to using this approach?
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list