Suggestion for correcting the IDE's script editor

Jon jbondy at sover.net
Fri Jul 1 09:27:59 EDT 2005


Eric:

Excellent post.  This points out, specifically, how the two keys (<tab> 
and <return>) behave differently, which is part of what has been 
frustrating me.  The closer these two keys function, the better off we 
all will be, I think.

Thanks!

Jon


Eric Chatonet wrote:

> Hi Jon,
>
> I tested the following:
>
> on toto
>   if there is a fld "toto" then
>     go to cd 1
>   end if
>
> end toto
>
> 1. I typed "on toto" and press return: "end toto" has been  
> automatically set and the insertion point blinked at the right place  
> (with the right indentation)
> 2. I typed "if there is a fld toto then" and press return: the  
> indentation level was increased as expected but, accordingly to  
> Xtalks habits, the "end toto" should have been moved 1 indent to  
> reflect the "end if" absence. But it did not. I pressed the tabKey  
> and then the end control structure moved.
> 3. The rest was correct.
>
> So, it appears that return and tab keys do not act exactly in the  
> same way and the end control structure indentation  (or another one)  
> is not managed as it it should be when pressing the return key.
> I agree your point of view and consider this dysfunction as severe  
> since a correct behaviour (i.e. reliable) would be very helpful for  
> beginners and... others when, for instance some nested if structures  
> should request an
>
> if then
>   statements
> end if
>
> before an another else at the beginning of the following line and not:
>
> if then statements
>
> In such a case the engine is confused (it is right :-), revError  
> tells there is something wrong but indentation appears correct when  
> in fact, it should reflect that there is a problem with a control  
> structure and visually indicate which of them is at issue.
> HyperCard did it perfectly and when I began many years ago it has  
> been very helpful for me even if now I have generally no more  
> problems :-)
>
> Le 1 juil. 05 à 13:01, Jon a écrit :
>
>> "The Revolution script editor automatically pretty-prints the  
>> current  handler when you place the insertion point somewhere in  the 
>> handler  and press Return or Tab."
>>
>> I agree that <tab> works in this way, but I use <return> all of the  
>> time, and the formatting is often incorrect.  Am I missing  
>> something, or is the above sentence either partly or entirely wrong  
>> (as regards <return>).
>>
>> Jon
>>
>>
>> Eric Chatonet wrote:
>>
>>
>>> Hi Bob,
>>>
>>> As usual with Rev docs, it's somewhere but you are rarely able to   
>>> find it...
>>> I'm finishing a plugin that finds the following when you enter   
>>> "indent" as a search keyword:
>>> Might be useful ;-)
>>>
>>> From the Docs FAQs:
>>> How do I pretty print a script?
>>> Pretty printing is the use of indenting to show the structure of  a  
>>> handler. When pretty printed, the contents of control  structures  
>>> (such as if/then/else conditionals and repeat loops)  are indented.  
>>> Nested control structures are indented more, to  show the level of  
>>> nesting.
>>> The Revolution script editor automatically pretty-prints the  
>>> current  handler when you place the insertion point somewhere in  
>>> the handler  and press Return or Tab. You can also choose Script  
>>> menu Format to  pretty print the current handler.
>>> To turn off automatic pretty printing, choose Edit menu  
>>> Preferences,  then uncheck the box labeled "Auto-indent to show  
>>> structure" in the  "Script Editor" pane.
>>>
>>> Le 1 juil. 05 à 11:20, Bob Warren a écrit :
>>>
>>>
>>>> In addition, perhaps the switch for turning auto-formatting on  
>>>> and  off could
>>>> be put in a more convenient place Also, descriptions of auto-  
>>>> formatting and
>>>> the (non-standard) use of the TAB key could be more prominently   
>>>> displayed in
>>>> the Help.
>>>
>
> Best Regards from Paris,
>
> Eric Chatonet.
> ----------------------------------------------------------------
> So Smart Software
>
> For institutions, companies and associations
> Built-to-order applications: management, multimedia, internet, etc.
> Windows, Mac OS and Linux... With the French touch
>
> Free plugins and tutorials on my website
> ----------------------------------------------------------------
> Web site        http://www.sosmartsoftware.com/
> Email        eric.chatonet at sosmartsoftware.com/
> Phone        33 (0)1 43 31 77 62
> Mobile        33 (0)6 20 74 50 86
> ----------------------------------------------------------------
>
> _______________________________________________
> 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