Lorenzo Donati | 3 May 2011 08:25
Picon
Favicon

Closing SciTE discarding unsaved changes without asking

Hi all!

The problem:

I generate text data on the fly and pipe it into a SciTE session in 
order to display them. Now this data can be regenerated quickly and I 
don't want to save it, so I'd like to close SciTE without being forced 
to answer whether I want to save the data every time.

Is there an option/trick to suppress the "are you sure" dialog even when 
there is unsaved data in a buffer and the data must be discarded by default.

The option "are.you.sure" only handles the case of saving by default.

I work on Windows XP - a non-cross-platform solution would be acceptable.

Note: saving in a temp file is not an option - I don't want anything to 
be saved anywhere, even if temporarily.

Thanks in advance for any suggestion.

-- 
Lorenzo

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

(Continue reading)

Philippe Lhoste | 3 May 2011 11:32
Picon

Re: Closing SciTE discarding unsaved changes without asking

On 03/05/2011 08:25, Lorenzo Donati wrote:
> Is there an option/trick to suppress the "are you sure" dialog even when there is unsaved
> data in a buffer and the data must be discarded by default.

Make a Lua function doing only:

editor:SetSavePoint()

Associate a keyboard shortcut to it.
If you don't want any intervention, you might try to put it in one of the OnXxx events, 
eg. OnBeforeSave, with are.you.sure=0 (auto save, but won't save? to try...).

-- 
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Robin | 3 May 2011 14:10
Picon

Re: Closing SciTE discarding unsaved changes without asking

That was on my how-to list and it works. Thanks. You can add the close
if desired.

	editor:SetSavePoint()
	scite.MenuCommand(IDM_CLOSE)

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Andreas Tscharner | 3 May 2011 15:18
Picon

Write a lexer: Confused about interface

Hello World,

I am evaluating scintilla for use within our product and I wanted to 
write a lexer for the language that it will be used with (DMIS). But now 
I am confused what I need to do.
In http://www.scintilla.org/Lexer.txt is described how to write a lexer 
using a static function "ColouriseXYZDoc".
But at http://www.scintilla.org/ScintillaDoc.html#LexerObjects I read 
about two interface classes for lexing.

Which one do I have to use? If it's ILexer/IDocument: is there somewhere 
a little bit more information what the methods are supposed to do?

TIA and best regards
	Andreas Tscharner
-- 
Andreas Tscharner                             <sternenfeuer <at> gmail.com>
----------------------------------------------------------------------
"Intruder on level one. All Aliens please proceed to level one."
                                       -- Call in "Alien: Resurrection"

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

hguser | 3 May 2011 15:15
Picon

Auto-indentation problem using Scite.

I am learning Ruby and use the Scite editor, but I found there is something I can not configure.

  1. When I type "def sayXXX" and then I press the Enter key, and then I type "end", now the "end" keyword is indented, so it is not aligned to the "def", how to make it?
Example:
def sayHello
  #do something
  end

Now,the "end" is indented,I want it auto aligned to the "def" keyword,is this possible?
  1. Any way to make scite provide some Ruby related API content assistance?

--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.
Philippe Lhoste | 3 May 2011 17:58
Picon

Re: Write a lexer: Confused about interface

On 03/05/2011 15:18, Andreas Tscharner wrote:
> I am evaluating scintilla for use within our product and I wanted to write a lexer for the
> language that it will be used with (DMIS). But now I am confused what I need to do.
> In http://www.scintilla.org/Lexer.txt is described how to write a lexer using a static
> function "ColouriseXYZDoc".
> But at http://www.scintilla.org/ScintillaDoc.html#LexerObjects I read about two interface
> classes for lexing.
>
> Which one do I have to use? If it's ILexer/IDocument: is there somewhere a little bit more
> information what the methods are supposed to do?

This is more a question for the Scintilla-interest list, but we will answer anyway.
The static function is the old interface, still used in lot of lexers. It works fine and 
is quite simple for simple languages.
The interface (lexer objects) is recent, with a demo implementation in LexCPP, and some 
lexers migrating to it. It is more powerful, allowing for example to handle C's 
pre-processor nesting and such.

-- 
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Robin | 3 May 2011 18:52
Picon

Tab bar contrast and/or colored tabs and/or tab glyphs

Is there a way to change the colors of the tabs in the tab bar? I have
trouble visually finding the current tab without looking carefully. Or
at least make the current tab more recognizable? More contrast would
be fine. How about adding an icon/glyph for the file type? I am mostly
interested in this for Windows, though I have recently set up Scite
and my Lua code on Ubuntu Linux. In Delphi for Windows, I had to
create a new tabbar class based on the existing tabbar component and
override and re-implement the draw method to get color. I am not sure
what is involved in Windows using C++. If it is not possible or too
much work, I am ok with it as it is. Thanks.

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Neil Hodgson | 3 May 2011 23:58
Picon

Re: Tab bar contrast and/or colored tabs and/or tab glyphs

Robin:

> Is there a way to change the colors of the tabs in the tab bar? I have
> trouble visually finding the current tab without looking carefully. Or
> at least make the current tab more recognizable? More contrast would
> be fine. How about adding an icon/glyph for the file type? I am mostly
> interested in this for Windows, though I have recently set up Scite
> and my Lua code on Ubuntu Linux. In Delphi for Windows, I had to
> create a new tabbar class based on the existing tabbar component and
> override and re-implement the draw method to get color. I am not sure
> what is involved in Windows using C++. If it is not possible or too
> much work, I am ok with it as it is. Thanks.

    Tabs are themed by the platform and are often not simple colours
but more complex designs with gradients or bitmaps used. They differ
depending on which theme engine and settings are chosen. It is better
to make these choices in the appropriate theming controls since they
are more likely to work well. Incorporating a custom tab bar will look
out-of-place when used with themes other than that which it was
designed for.

   On Ubuntu, you may prefer the Clearlooks theme which draws a
coloured bar on the selected tab.

   Adding a file type icon uses up space and can look ugly.

   Neil

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Andreas Tscharner | 4 May 2011 07:33
Picon

Re: Write a lexer: Confused about interface

On 03.05.2011 17:58, Philippe Lhoste wrote:
> On 03/05/2011 15:18, Andreas Tscharner wrote:

[snip]
> This is more a question for the Scintilla-interest list, but we will
> answer anyway.

Sorry, I didn't know there was another group.
> The static function is the old interface, still used in lot of lexers.
> It works fine and is quite simple for simple languages.
> The interface (lexer objects) is recent, with a demo implementation in
> LexCPP, and some lexers migrating to it. It is more powerful, allowing
> for example to handle C's pre-processor nesting and such.
>
Is there a tutorial or any other examples except LexCPP?

TIA and best regards
	Andreas
-- 
Andreas Tscharner                             <sternenfeuer <at> gmail.com>
----------------------------------------------------------------------
"Intruder on level one. All Aliens please proceed to level one."
                                       -- Call in "Alien: Resurrection"

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.

Lorenzo Donati | 4 May 2011 08:08
Picon
Favicon

Bug in HTML documentation?

Hi Neil,

I think I found a small bug in the docs for SciTE 2.25 (Windows).

The links in the top of SciTEDoc.html to the FAQ and to the Scripting 
facilities point to the web version and not to the local copy.

Since the third link (regexes) points to the local version, I assume 
this is a bug and not an intended behaviour.

Best Regards

-- 
Lorenzo

--

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To post to this group, send email to scite-interest <at> googlegroups.com.
To unsubscribe from this group, send email to scite-interest+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/scite-interest?hl=en.


Gmane