Correct Syntax???!!!

David Burgun dburgun at dsl.pipex.com
Sun Mar 26 13:25:02 EST 2006


On 26 Mar 2006, at 18:41, J. Landman Gay wrote:

> David Burgun wrote:
>
> > I think we are talking about two similar things here and they are
> > getting muddled!
>
> Very possible. :) You know, the best thing would be if you would  
> create a demo stack and post it to RevOnline or somewhere else  
> where people could look at it. That would do a lot to clear up any  
> misunderstandings and would make your technique much easier to  
> follow than a text description on the list.

Yes, I am intending on doing just that! The problem is that I have  
some changes I just have to make to ISM before it is fit for use by  
anyone else! You know stuff that I am aware of but haven't gotton  
around to changing yet. Also I am sure that the way it is coded in no  
where near optimum and so is slower than it need be. I think I could  
make good use of the "@" keyword.

For instance I have a function that is internal to ISM:

function ISMGetMessageArray
   local myArrayName
   local myArray

   put "cpISM_MessaageArray_" into myArrayName
   put customProperties[myArrayName] of me into myArray

   return myArray
end ISMGetMessageArray

Does this copy all the whole array each time it is called? If so, is  
there a way I can just return a reference to the array so that if I  
do this:

put ISMGetMessageArray() into myMessageArray
put <something> into myMessageArray[key] into myMessageArray

Affects the array in the  custom property, not the local copy?

Right now I am doing this:

put ISMGetMessageArray() into myMessageArray
put <something> into myMessageArray[key] into myMessageArray
get  ISMSetMessageArray(myMessageArray)

Which AFAIK means that the whole array is being copied twice!

I was going to change the code so that it references "customProperties 
[myArrayName] of me" directly which I'm sure would be faster but  
makes the code less readable.

Any ideas???
>
> > I wasn't really aiming that remark at you personally or anyone  
> on  this
> > list. I was actually a bit hacked off with the attitude of   
> someone I
> > work with who won't even look at anything unless it's coded  in C+ 
> +! I
> > had just gotton off the phone with him when I wrote it and  I  
> suppose it
> > bubbled over into this discussion. Please accept my  sincere  
> apologies
> > if I caused offense. You have been of great help to  me in on the  
> list
> > in the past and I would like to take this  opportunely to say  
> "THANKS A
> > LOT".
>
> No problem, and you are very welcome. I want to pay forward, as  
> they say. Lots of people helped me when I was learning, and I feel  
> I owe something back.
>
> I have a deep, long-standing love of xtalk and anything we can do  
> to promote it is good. Tell your co-worker they are all wet. ;)  
> Someone else on the list had a similar situation and took up a  
> project that would have taken a C programmer months to complete. He  
> finished it in 2 weeks. The boss was convinced. You could try the  
> same, if there is an opportunity. Watch their jaw drop. Smirking in  
> response is allowed.

I've actually done this 3 times now! I finished a project a little  
while back. When I first started we have a day long meeting with the  
product manager and agreed the initial GUI. I said I would code it  
and let him have an initial offering ASAP.

I sent the 99% finished GUI back to him 3 days later and the product  
manager was totally gob-smacked! He said he was used to dealing with  
a C++ programmer that would take over a month to produce what I had  
done in RunRev in 3 days!

In that project I wrote a couple of External commands in C/C++ to  
handle some intense image processing tasks and added them to the  
RunRev app after the GUI was frozen. They were really happy with the  
results!

All the Best
Dave




More information about the use-livecode mailing list