April White | 2 Oct 2005 16:48
Picon
Favicon

Re: exposing the SciTE 'execute tool' functionality to Lua

Neil Hodgson wrote:

>Neil Hodgson:
>  
>
>>   This does not appear to have taken threading into account. Which
>>thread is it running on? How is this synchronized with other
>>activities including other queued actions? You may need to lock the
>>queue.
>>
I think I understand what you mean now.

When I press a hot-key to activate a tool of type jobExtension, it uses 
the SciTEWin::ExecuteOne() method call to extender->OnExecute(), which 
in turn would add commands back to the queue and call 
SciTEWin::ExecuteOne() again.  If it passed in a jobExtension command, 
it could loop.

I feel your initial suggestion of adding commands to the queue is the 
best way to go, but there are hurdles to overcome first.

April

--

-- 
Why do people with closed minds always open their mouths?
Neil Hodgson | 4 Oct 2005 05:16
Picon

Re: exposing the SciTE 'execute tool' functionality to Lua

April White:

> I have a general question regarding commands.  If I set :
> - tool 1 to run Something.exe as a command line program, and
> - tool 2 to run another.exe as a command line program,
> if the user presses ctrl+1 and ctrl+2 in quick succession, what happens?

   The user interface blocks tool commands while a tool is running.
This is determined by the 'executing' field which is reset when the
tool thread posts a IDM_FINISHEDEXECUTE message back to the UI.

> I feel your initial suggestion of adding commands to the queue
> is the best way to go, but there are hurdles to overcome first.

   Yes, and I'm going to be a bit protective with this feature as it
is easy to get threaded code wrong.

   Neil
Neil Hodgson | 4 Oct 2005 05:27
Picon

Re: Different indent size in PHP file

Istvan:

> Thanks Neil. I've wrote a code in lua and I've put it into function OnChar(ch):
>
> if ch=='\n' then
>      if props['FileExt']=="php" or props['FileExt']=="html" then
>          if editor.StyleAt[editor.CurrentPos] < 117 then
>              props['tabsize']=2
>              props['indent.size']=2

   props is a view of volatile data and changes are not propagated
back to the editor. Set the TabWidth and Indent properties instead.

   Neil
Neil Hodgson | 4 Oct 2005 05:40
Picon

Re: Tools - Compile/Build/Go options disabled for java files only

hIpPy:

> i currently use SciTE 1.66 on XP sp2.
>
> i'm still have this issue where the Compile/Build/Go options for .java
> files do not appear. please see below link. i did not have this issue
> in SciTE 1.64. the Compile/Build/Go options appear for .c files.

   Individual .properties files are limited to 60000 bytes and your
cpp.properties is larger than this. The keywords feature is designed
for use with a small set of language keywords not for large sets of
identifiers such as jdkclass.java used here.

   Neil
Istvan | 4 Oct 2005 06:49
Picon
Favicon

Re: Different indent size in PHP file

Neil Hodgson wrote:
  >    props is a view of volatile data and changes are not propagated
> back to the editor. Set the TabWidth and Indent properties instead.

That's work.

Just one question. In Scite 1.62 when I modified something in the SciTEStartup.lua
and after I saved, it reloaded the SciTEStartup.lua and the new additions to
this file worked in all buffers.
Since I overwrited the new scite.exe and SciLexer.dll (1.66) even I save the
SciTEStartup.lua in the Scite that is not loaded. I need to close and reopen the Scite
to make the effect.
I didn't modified anything in the properties files, I just addded the .exe and the .dll
from the new version. This is the way how it works, or there is something what I need
to change, not to restart Scite on every modification of SciTEStartup.lua .

Thank you.
Istvan.
Neil Hodgson | 4 Oct 2005 14:57
Picon

Re: Different indent size in PHP file

Istvan:

> I didn't modified anything in the properties files, I just addded the .exe and the .dll
> from the new version. This is the way how it works, or there is something what I need
> to change, not to restart Scite on every modification of SciTEStartup.lua .

ext.lua.auto.reload=1
ext.lua.reset=1

   Neil
hIpPy | 4 Oct 2005 21:30
Picon

Re: Scite-interest Digest, Vol 29, Issue 3

Neil:

>    Individual .properties files are limited to 60000 bytes and your
> cpp.properties is larger than this. The keywords feature is designed
> for use with a small set of language keywords not for large sets of
> identifiers such as jdkclass.java used here.
>
>    Neil

Yes. That worked. :)

thanks,
RM.
Peter Wu | 5 Oct 2005 01:18

file not found error in linux

Hello,

I downloaded the latest scite version and compiled in linux.
when I try to run build or run, it always complains that the file not found.

My cpp.properties contains:
  make.command=ch
  command.build.*.c=$(make.command) $(FileNameExt)
  command.go.*.cc=$(run) $(FileNameExt)

it works fine in windows, not sure why the linux cannot find the file.
is it required to add the path for $(FileNameExt)?

Thanks.

Peter
Istvan | 5 Oct 2005 07:16
Picon
Favicon

Re: Different indent size in PHP file

Neil Hodgson wrote:
> Istvan:
> 
>> I didn't modified anything in the properties files, I just addded the .exe and the .dll
>> from the new version. This is the way how it works, or there is something what I need
>> to change, not to restart Scite on every modification of SciTEStartup.lua .
> 
> ext.lua.auto.reload=1
> ext.lua.reset=1

That's the setting I am using now. If I add a new code, eg. for onChar(ch) function I add: print(ch)
and  save, that will show on the output the chars what I am typing, but if I switch to another buffer
the chars will not be displayed. So that's my problem.

Thanks.
Istvan.
Helmut Jarausch | 5 Oct 2005 08:57
Picon
Picon
Favicon

Re: file not found error in linux

On  4 Oct, Peter Wu wrote:
> Hello,
> 
> I downloaded the latest scite version and compiled in linux.
> when I try to run build or run, it always complains that the file not found.
> 
> My cpp.properties contains:
>   make.command=ch
>   command.build.*.c=$(make.command) $(FileNameExt)
>   command.go.*.cc=$(run) $(FileNameExt)
> 
> it works fine in windows, not sure why the linux cannot find the file.
> is it required to add the path for $(FileNameExt)?
> 
Is it sure that the source file cannot be found?
What about $(run).
In my SciTE (cpp.properties) there is no 'run' variable
defined. Perhaps your 'run' variable contains a command
which Linux cannot find. Check your PATH variable.

--

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

Gmane