Call vs Send

Dennis Brown see3d at writeme.com
Thu Jun 9 22:39:52 EDT 2005


On Jun 9, 2005, at 9:23 PM, Richard Gaskin wrote:

> Using "the long id of the target" will provide an absolute  
> reference to the specific object, but I'm not sure why simply "the  
> target" doesn't return the same value.  Hmmm....  makes "the  
> target" rather less useful, unless there's a benefit to the  
> truncated descriptor it returns that I'm just not seeing.

I found that "the long name of the target" is what was required to  
get me what I needed.

> But to be honest, it's very rare that I use either "call" or  
> "send". Both are up there with "do" in terms of a modest amount of  
> additional overhead needed to handle them relative to calls  
> natively in the message path.

Speaking of "do".  That is another on that should be combined with  
these call/send in a tutorial.  I try to avoid it, but I have to use  
it often because I don't know any other way to reference a variable  
or a custom property who's name is in a variable --though for speed  
reasons, I never do this inside a critical loop.  Very useful when  
making complex one card stacks that would be a memory and support  
killer with many cards.

> Could there be another way to handle that using the native message  
> path, maybe a common handler in the master group or card script?

Yes that is what worked.  I put the common scripts in my card script  
now and use the native message path.

> Also, what sort of simulation are you working on?

It simulates the stock markets (every stock) for the past ten years,  
looking for algorithmic and statistical relationships in the  
performance.  There is a lot of data, which is why I have been  
pushing the speed thing in large arrays.  I have worked on similar,  
but less aggressive simulations many years ago in HyperCard, then  
SuperCard, and I was just considering a switch to MetaCard (for speed  
reasons) when the previous project was dropped.  I haven't done  
anything in programming for the last 5 years, until this project came  
up --so everything is new again.

Dennis


More information about the use-livecode mailing list