IDE Script Editor question...

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

IDE Script Editor question...

Paul Dupuis
I find myself periodically working with stacks where the individuals
handlers come from a number of sources.

Some of these sources have their script editor set to the default 3
space indent. Some to 2 spaces, some to 4 spaces, etc.

Is there any easy way to tell the script editor to RE-indent all the
handlers in the current script using the current preference for indents?

If not, can one of you coding wizards out there add this to the IDE? :-)


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Peter Bogdanoff
Does pressing the tab key fix it for you?

> On Sep 22, 2016, at 12:52 PM, Paul Dupuis <[hidden email]> wrote:
>
> I find myself periodically working with stacks where the individuals
> handlers come from a number of sources.
>
> Some of these sources have their script editor set to the default 3
> space indent. Some to 2 spaces, some to 4 spaces, etc.
>
> Is there any easy way to tell the script editor to RE-indent all the
> handlers in the current script using the current preference for indents?
>
> If not, can one of you coding wizards out there add this to the IDE? :-)
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Paul Dupuis
Ah ha. The insertion point must be INSIDE a handler and only re-indents
that handler when you press TAB

If the insertion point is between handlers or outside of any handler,
nothing happens. Ok, tab is useful, but something that reformatted ALL
handlers in a script would be even better.

Not perfect, but a step better than nothing. Thanks for the tip!


On 9/22/2016 4:17 PM, Peter Bogdanoff wrote:

> Does pressing the tab key fix it for you?
>
>> On Sep 22, 2016, at 12:52 PM, Paul Dupuis <[hidden email]> wrote:
>>
>> I find myself periodically working with stacks where the individuals
>> handlers come from a number of sources.
>>
>> Some of these sources have their script editor set to the default 3
>> space indent. Some to 2 spaces, some to 4 spaces, etc.
>>
>> Is there any easy way to tell the script editor to RE-indent all the
>> handlers in the current script using the current preference for indents?
>>
>> If not, can one of you coding wizards out there add this to the IDE? :-)
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Mark Talluto-3

> On Sep 22, 2016, at 2:08 PM, Paul Dupuis <[hidden email]> wrote:
>
> Ah ha. The insertion point must be INSIDE a handler and only re-indents
> that handler when you press TAB
>
> If the insertion point is between handlers or outside of any handler,
> nothing happens. Ok, tab is useful, but something that reformatted ALL
> handlers in a script would be even better.
>
> Not perfect, but a step better than nothing. Thanks for the tip!

Here is the code we use here to indent a whole script.

command cdt_FastIndent
     local tHandlerList, tOffset, tProgressSoFar
     
     if not(exists(fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1")) then exit cdt_FastIndent
     
     lock screen
     put the text of fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1" into tHandlerList
     filter tHandlerList with "end *"
     filter tHandlerList without "* switch" //IGNORE NON-HANDLER KEYWORDS
     filter tHandlerList without "* repeat" //IGNORE NON-HANDLER KEYWORDS
     filter tHandlerList without "* try" //IGNORE NON-HANDLER KEYWORDS
     filter tHandlerList without "* if" //IGNORE NON-HANDLER KEYWORDS
     
     put 0 into tProgressSoFar
     
     set the wholeMatches to true
     repeat for each line thisLine in tHandlerList
          put lineOffset(thisLine, fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1", tProgressSoFar) into tOffset
          select before line tOffset+tProgressSoFar of \
                fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
          dispatch "tabKey" to fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
          add tOffset to tProgressSoFar
     end repeat
     unlock screen
end cdt_FastIndent


Best regards,

Mark Talluto
livecloud.io
canelasoftware.com




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Richard Gaskin
If memory serves, I believe indenting is handled in the IDE similarly to
colorization, with a call to _internal.

Perhaps if used in conjunction with the info provided in
revAvailableHandlers, we may be able to format large scripts even
faster, maybe even in the blink of an eye.

--
  Richard Gaskin


Mark Talluto wrote:

>> On Sep 22, 2016, at 2:08 PM, Paul Dupuis <paul at researchware.com> wrote:
>>
>> Ah ha. The insertion point must be INSIDE a handler and only re-indents
>> that handler when you press TAB
>>
>> If the insertion point is between handlers or outside of any handler,
>> nothing happens. Ok, tab is useful, but something that reformatted ALL
>> handlers in a script would be even better.
>>
>> Not perfect, but a step better than nothing. Thanks for the tip!
>
> Here is the code we use here to indent a whole script.
>
> command cdt_FastIndent
>      local tHandlerList, tOffset, tProgressSoFar
>
>      if not(exists(fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1")) then exit cdt_FastIndent
>
>      lock screen
>      put the text of fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1" into tHandlerList
>      filter tHandlerList with "end *"
>      filter tHandlerList without "* switch" //IGNORE NON-HANDLER KEYWORDS
>      filter tHandlerList without "* repeat" //IGNORE NON-HANDLER KEYWORDS
>      filter tHandlerList without "* try" //IGNORE NON-HANDLER KEYWORDS
>      filter tHandlerList without "* if" //IGNORE NON-HANDLER KEYWORDS
>
>      put 0 into tProgressSoFar
>
>      set the wholeMatches to true
>      repeat for each line thisLine in tHandlerList
>           put lineOffset(thisLine, fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1", tProgressSoFar) into tOffset
>           select before line tOffset+tProgressSoFar of \
>                 fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
>           dispatch "tabKey" to fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
>           add tOffset to tProgressSoFar
>      end repeat
>      unlock screen
> end cdt_FastIndent


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Monte Goulding-2
No it's scripted

Sent from my iPhone

> On 24 Sep 2016, at 7:42 AM, Richard Gaskin <[hidden email]> wrote:
>
> with a call to _internal


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Richard Gaskin
Monte Goulding wrote:
 > No it's scripted
 >
 > Sent from my iPhone
 >
 >> On 24 Sep 2016, at 7:42 AM, Richard Gaskin wrote:
 >>
 >> with a call to _internal

Good to know, thanks.

Either way, the full-script-reformat routine Mark posted would have
little opportunity to speed that end of things up much, since it
triggers calls to whatever the SE uses (which turns out to be a script).

It would still seem, though, that by changing the algo to use the line
offsets obtainable from revAvailableHandlers to successively trigger the
SE's formatting routine directly would likely speed things up at list a
bit over iteratively selecting text from offsets that had to be
calculated, no?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Monte Goulding-2
Yes, presuming there's no difference between the content of the script editor and the compiled script.

Sent from my iPhone

> On 24 Sep 2016, at 9:17 AM, Richard Gaskin <[hidden email]> wrote:
>
> It would still seem, though, that by changing the algo to use the line offsets obtainable from revAvailableHandlers to successively trigger the SE's formatting routine directly would likely speed things up at list a bit over iteratively selecting text from offsets that had to be calculated, no?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Richard Gaskin
Poking around in the SE I found an even simpler solution - replace line
3108 of "revSEEditorBehavior"

       scriptFormat "handler"

...with:

       if the shiftKey is "down" then
          scriptFormat "script"
       else
          scriptFormat "handler"
       end if

Apparently the scriptFormat handler already supports both forms (if
memory serves it used to only do whole scripts), but somewhere along the
way the UI to trigger the "script" option got lost".

I suppose any modifier key would be good there, but I like Shift because
it's often used to extend selections, is a physically large key, and we
have them on both sides of our keyboard.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

J. Landman Gay
On 9/23/16 7:13 PM, Richard Gaskin wrote:

> Poking around in the SE I found an even simpler solution - replace line
> 3108 of "revSEEditorBehavior"
>
>       scriptFormat "handler"
>
> ...with:
>
>       if the shiftKey is "down" then
>          scriptFormat "script"
>       else
>          scriptFormat "handler"
>       end if
>
> Apparently the scriptFormat handler already supports both forms (if
> memory serves it used to only do whole scripts), but somewhere along the
> way the UI to trigger the "script" option got lost".
>
> I suppose any modifier key would be good there, but I like Shift because
> it's often used to extend selections, is a physically large key, and we
> have them on both sides of our keyboard.
>

Feel like putting in a feature request for this? I would use it often,
and if it's in the IDE then we don't have to edit every version update.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Monte Goulding-2
A feature request is a good idea. A pull request is a great one...

Sent from my iPhone

> On 24 Sep 2016, at 12:01 PM, J. Landman Gay <[hidden email]> wrote:
>
> Feel like putting in a feature request for this? I would use it often, and if it's in the IDE then we don't have to edit every version update.


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

pmbrig
In reply to this post by Mark Talluto-3

> On Sep 23, 2016, at 1:05 PM, Mark Talluto <[hidden email]> wrote:
>
>
>> On Sep 22, 2016, at 2:08 PM, Paul Dupuis <[hidden email]> wrote:
>>
>> Ah ha. The insertion point must be INSIDE a handler and only re-indents
>> that handler when you press TAB
>>
>> If the insertion point is between handlers or outside of any handler,
>> nothing happens. Ok, tab is useful, but something that reformatted ALL
>> handlers in a script would be even better.
>>
>> Not perfect, but a step better than nothing. Thanks for the tip!
>
> Here is the code we use here to indent a whole script.
>
> command cdt_FastIndent
>     local tHandlerList, tOffset, tProgressSoFar
>
>     if not(exists(fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1")) then exit cdt_FastIndent
>
>     lock screen
>     put the text of fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1" into tHandlerList
>     filter tHandlerList with "end *"
>     filter tHandlerList without "* switch" //IGNORE NON-HANDLER KEYWORDS
>     filter tHandlerList without "* repeat" //IGNORE NON-HANDLER KEYWORDS
>     filter tHandlerList without "* try" //IGNORE NON-HANDLER KEYWORDS
>     filter tHandlerList without "* if" //IGNORE NON-HANDLER KEYWORDS

An alternative way of accomplishing the above is
   put the revAvailableHandlers of <objRef> into tHandlerList
and then adjust the line below:

>     put 0 into tProgressSoFar
>
>     set the wholeMatches to true
>     repeat for each line thisLine in tHandlerList
>          put lineOffset(thisLine, fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1", tProgressSoFar) into tOffset

   put lineOffset(word 2 of thisLine, fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1", tProgressSoFar) into tOffset

>          select before line tOffset+tProgressSoFar of \
>                fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
>          dispatch "tabKey" to fld "script" of grp "editor" of cd "main" of stack "revNewScriptEditor 1"
>          add tOffset to tProgressSoFar
>     end repeat
>     unlock screen
> end cdt_FastIndent

— Peter

Peter M. Brigham
[hidden email]



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Bob Sneidar-2
In reply to this post by Paul Dupuis
Which is a change in prior behavior. It surprised me the first time I saw it. Used to be the whole script reformatted with the tab key. Or am I crazy?

Bob S


> On Sep 22, 2016, at 14:08 , Paul Dupuis <[hidden email]> wrote:
>
> Ah ha. The insertion point must be INSIDE a handler and only re-indents
> that handler when you press TAB
>
> If the insertion point is between handlers or outside of any handler,
> nothing happens. Ok, tab is useful, but something that reformatted ALL
> handlers in a script would be even better.
>
> Not perfect, but a step better than nothing. Thanks for the tip!
>
>
> On 9/22/2016 4:17 PM, Peter Bogdanoff wrote:
>> Does pressing the tab key fix it for you?
>>
>>> On Sep 22, 2016, at 12:52 PM, Paul Dupuis <[hidden email]> wrote:
>>>
>>> I find myself periodically working with stacks where the individuals
>>> handlers come from a number of sources.
>>>
>>> Some of these sources have their script editor set to the default 3
>>> space indent. Some to 2 spaces, some to 4 spaces, etc.
>>>
>>> Is there any easy way to tell the script editor to RE-indent all the
>>> handlers in the current script using the current preference for indents?
>>>
>>> If not, can one of you coding wizards out there add this to the IDE? :-)
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Bob Sneidar-2
In reply to this post by Richard Gaskin
Will this change be wiped next time I update LC? Id so, then this is why I don't like to make changes like this. It would make a nice feature addition though.

Bob S


On Sep 23, 2016, at 17:13 , Richard Gaskin <[hidden email]<mailto:[hidden email]>> wrote:

Poking around in the SE I found an even simpler solution - replace line 3108 of "revSEEditorBehavior"

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Peter Bogdanoff
In reply to this post by Bob Sneidar-2
Right. I think it was Hypercard that used to reformat the whole script, and maybe earlier LC, but LC6 did only the single handler.

This became a big problem for me as I had the default text size set differently on different computers and LC didn’t automatically account for that, so the formatting was always off as I moved my work from machine to machine. I couldn’t take the time to go through and reformat everything.

HOWEVER, LC 8 seems to have fixed the issue with the scripts displaying incorrectly, so going through once seems to fix it forever.

Peter

On Oct 17, 2016, at 9:40 AM, Bob Sneidar <[hidden email]> wrote:

> Which is a change in prior behavior. It surprised me the first time I saw it. Used to be the whole script reformatted with the tab key. Or am I crazy?
>
> Bob S
>
>
>> On Sep 22, 2016, at 14:08 , Paul Dupuis <[hidden email]> wrote:
>>
>> Ah ha. The insertion point must be INSIDE a handler and only re-indents
>> that handler when you press TAB
>>
>> If the insertion point is between handlers or outside of any handler,
>> nothing happens. Ok, tab is useful, but something that reformatted ALL
>> handlers in a script would be even better.
>>
>> Not perfect, but a step better than nothing. Thanks for the tip!
>>
>>
>> On 9/22/2016 4:17 PM, Peter Bogdanoff wrote:
>>> Does pressing the tab key fix it for you?
>>>
>>>> On Sep 22, 2016, at 12:52 PM, Paul Dupuis <[hidden email]> wrote:
>>>>
>>>> I find myself periodically working with stacks where the individuals
>>>> handlers come from a number of sources.
>>>>
>>>> Some of these sources have their script editor set to the default 3
>>>> space indent. Some to 2 spaces, some to 4 spaces, etc.
>>>>
>>>> Is there any easy way to tell the script editor to RE-indent all the
>>>> handlers in the current script using the current preference for indents?
>>>>
>>>> If not, can one of you coding wizards out there add this to the IDE? :-)
>>>>
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Mike Kerner
In reply to this post by Bob Sneidar-2
Bob,
You could always make a plugin with a front script, or my favorite, the
patch script.


On Mon, Oct 17, 2016 at 12:43 PM, Bob Sneidar <[hidden email]>
wrote:

> Will this change be wiped next time I update LC? Id so, then this is why I
> don't like to make changes like this. It would make a nice feature addition
> though.
>
> Bob S
>
>
> On Sep 23, 2016, at 17:13 , Richard Gaskin <[hidden email]<
> mailto:[hidden email]>> wrote:
>
> Poking around in the SE I found an even simpler solution - replace line
> 3108 of "revSEEditorBehavior"
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Bob Sneidar-2
In reply to this post by J. Landman Gay
Odd... line 3108 of the revSEEditorBehavior is blank and is in a handler called private command selectFromCurrentToLineStart.

I found the scriptFormat in about 10 places in that behavior, and am reticent to change any oen of them as I do not know what they would do.

I wonder if you are using a utility that re-sorts your handlers to be alphabetic (like glx2 can do)?

Bob S


On Sep 23, 2016, at 19:01 , J. Landman Gay <[hidden email]<mailto:[hidden email]>> wrote:

Poking around in the SE I found an even simpler solution - replace line
3108 of "revSEEditorBehavior"

     scriptFormat "handler"

...with:

     if the shiftKey is "down" then
        scriptFormat "script"
     else
        scriptFormat "handler"
     end if

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Bob Sneidar-2
NVM it is line 3509 in the tabKey handler.

Bob S

On Oct 17, 2016, at 13:54 , Bob Sneidar <[hidden email]<mailto:[hidden email]>> wrote:

Odd... line 3108 of the revSEEditorBehavior is blank and is in a handler called private command selectFromCurrentToLineStart.

I found the scriptFormat in about 10 places in that behavior, and am reticent to change any oen of them as I do not know what they would do.

I wonder if you are using a utility that re-sorts your handlers to be alphabetic (like glx2 can do)?

Bob S

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Bob Sneidar-2
Now when I try to save my changes I get a dialog:

Can't save stack revSEEditorBehavior due to an error: can't open stack script file.

Bob S


> On Oct 17, 2016, at 14:58 , Bob Sneidar <[hidden email]> wrote:
>
> NVM it is line 3509 in the tabKey handler.
>
> Bob S
>
> On Oct 17, 2016, at 13:54 , Bob Sneidar <[hidden email]<mailto:[hidden email]>> wrote:
>
> Odd... line 3108 of the revSEEditorBehavior is blank and is in a handler called private command selectFromCurrentToLineStart.
>
> I found the scriptFormat in about 10 places in that behavior, and am reticent to change any oen of them as I do not know what they would do.
>
> I wonder if you are using a utility that re-sorts your handlers to be alphabetic (like glx2 can do)?
>
> Bob S
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: IDE Script Editor question...

Trevor DeVore
In reply to this post by Richard Gaskin
On Fri, Sep 23, 2016 at 7:13 PM, Richard Gaskin <[hidden email]>
wrote:

> Poking around in the SE I found an even simpler solution - replace line
> 3108 of "revSEEditorBehavior"
>
>       scriptFormat "handler"
>
> ...with:
>
>       if the shiftKey is "down" then
>          scriptFormat "script"
>       else
>          scriptFormat "handler"
>       end if
>

Monte pointed me to this thread as I was looking for a way to format the
entire script. I submitted a PR for this:

https://github.com/livecode/livecode-ide/pull/1494

Thanks Richard.

--
Trevor DeVore
ScreenSteps
www.screensteps.com    -    www.clarify-it.com
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12