the script - Further details examples.

K nnoydb at excite.com
Wed Aug 11 08:10:21 CDT 2004


The editScript message is a after the fact process.  I need to munge the script prior to it being set. Since the script with my macros is not necessarily valid and may encounter several if a multitude of errors.  I was wondering if I could place a setProp/getProp handler in the front scripts to intercept the script upon storage and retrieval.  This would allow me to expand/collapse the code.  


setProp script aScript

	local tExpanded
        
        --
        --Munge script and expand macros
        --

        --
        --Now here is the real problem will the call to set the script
        --go to the appropriate object since this is a front script?
        --
        set the script to tExpanded

end script

getProp script
	
      local tCollapsed
      local tScript
	
      --
      --Now here is the real problem will the call to set the script
      --go to the appropriate object since this is a front script?
      --
      put the script into tScript

      --
      --Munge tScript into tCollapsed
      --
	
      return tCollapsed

end script

Kevin

-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Tue 08/10, Dan Shafer < revdan at danshafer.com > wrote:
From: Dan Shafer [mailto: revdan at danshafer.com]
To: nnoydb at excite.com
Date: Tue, 10 Aug 2004 14:45:01 -0700
Subject: Re: the script

Might be possible. Check out using editScript message<br><br>on editScript theObject<br>  -- do some stuff to the script<br>  -- which usually means you put the script into a variable,<br>  -- munge the text in the variable<br>  -- and then set the script of the object to the variable<br>end editScript<br><br>On Aug 10, 2004, at 12:56 PM, K wrote:<br><br>><br>><br>> Actually, I would like to alter "the script" itself before validation  <br>> and it being saved to the object (stack, card or button).  Also modify  <br>> upon retreival.<br>><br>> Basically, I would like to use my own parse tree to validate the code  <br>> and produce a MACRO/Preprocessor for my code.<br>><br>> Kevin<br>><br>><br>> -==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-<br>> Disclaimer:<br>><br>> Any resemblance between the above views and those of my<br>> employer, my terminal, or the view out my window are purely<br>> coincidental.<br>> Any resemblance between the above and my own views is  <br>> non-dete
 rministic.<br>><br>>  The question of the existence of views in the absence of anyone to  <br>> hold<br>> them<br>> is left as an exercise for the reader. The question of the existence of<br>> the reader<br>>  is left as an exercise for the second god coefficient.<br>> (A discussion of non-orthogonal, non-integral polytheism is beyond the<br>> scope of this article.)<br>><br>><br>><br>>  --- On Tue 08/10, Dan Shafer < revdan at danshafer.com > wrote:<br>> From: Dan Shafer [mailto: revdan at danshafer.com]<br>> To: nnoydb at excite.com, use-revolution at lists.runrev.com<br>> Date: Tue, 10 Aug 2004 09:52:43 -0700<br>> Subject: Re: the script<br>><br>> Not clear what you mean here, Kevin. You don't "intercept" properties  <br>> <br>as such. Do you mean you want to override the script or are you  <br>> trying <br>to intercept the editScript message?<br>On Aug 10, 2004, at  <br>> 6:40 AM, K wrote:<br><br>><br>> Is there any way to intercept "the  <br>> script" ptoperty for all objects?<br>>
 <br>> Kevin<br>><br>><br>><br>>  <br>> -==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-<br>>  <br>> Disclaimer:<br>><br>> Any resemblance between the above views and  <br>> those of my<br>> employer, my terminal, or the view out my window are  <br>> purely<br>> coincidental.<br>> Any resemblance between the above and  <br>> my own views is <br>> non-deterministic.<br>><br>>  The question of  <br>> the existence of views in the absence of anyone to <br>> hold<br>>  <br>> them<br>> is left as an exercise for the reader. The question of the  <br>> existence of<br>> the reader<br>>  is left as an exercise for the  <br>> second god coefficient.<br>> (A discussion of non-orthogonal,  <br>> non-integral polytheism is beyond the<br>> scope of this  <br>> article.)<br>><br>><br>><br>>  <br>> _______________________________________________<br>> Join Excite! -  <br>> http://www.excite.com<br>> The most personalized portal on the  <br>> Web!<br>> ____________________________________________
 ___<br>>  <br>> use-revolution mailing list<br>> use-revolution at lists.runrev.com<br>>  <br>> http://lists.runrev.com/mailman/listinfo/use- <br>> revolution<br>><br>><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>D <br>> an Shafer, Revolutionary<br>Author of  "Revolution: Software at the  <br>> Speed of Thought"<br>http://www.revolutionpros.com for more  <br>> info<br>Available at Runtime Revolution Store  <br>> (http://www.runrev.com/RevPress)<br><br><br>><br>> _______________________________________________<br>> Join Excite! - http://www.excite.com<br>> The most personalized portal on the Web!<br>><br><br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


More information about the use-livecode mailing list