Enhancement requests

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Enhancement requests

Postby _ » Sun Mar 25, 2012 9:31 pm

Hi.

Some enhancement requests:
- Allow to set the language other than the default locale.
- Allow to enable/disable the undoable edits.

Best regards.
_
 

Re: Enhancement requests

Postby robert » Tue Mar 27, 2012 2:45 am

_ wrote:- Allow to set the language other than the default locale.


As a workaround, does this meet your needs?

java code:

Locale orig = Locale.getDefault();
Locale.setDefault(new Locale("fr"));
RSyntaxTextArea textArea = new RSyntaxTextArea(25, 70);
Locale.setDefault(orig);


- Allow to enable/disable the undoable edits.


For this one, what are you trying to accomplish? If you just want to clear the undo stack at a given time (such as loading a new file), you can call textArea.discardAllEdits(). Or are you genuinely trying to allow the user to edit the document but not undo/redo?
User avatar
robert
 
Posts: 796
Joined: Sat May 10, 2008 5:16 pm

Re: Enhancement requests

Postby _ » Tue Mar 27, 2012 2:48 pm

Hi.

robert wrote:
_ wrote:- Allow to set the language other than the default locale.


As a workaround, does this meet your needs?

Code: Select all
Locale orig = Locale.getDefault();
Locale.setDefault(new Locale("fr"));
RSyntaxTextArea textArea = new RSyntaxTextArea(25, 70);
Locale.setDefault(orig);

Currently I have changed the RSTA to allow to set a locale (added a class variable in RTA), this way I set it once and every time a RSTA is created it has the correct locale set. Thanks for the workaround, anyway.


robert wrote:
- Allow to enable/disable the undoable edits.


For this one, what are you trying to accomplish? If you just want to clear the undo stack at a given time (such as loading a new file), you can call textArea.discardAllEdits(). Or are you genuinely trying to allow the user to edit the document but not undo/redo?
I have a RSTA (more than one, actually) that is not editable but I change the text over time, currently I'm calling the method discardAllEdits every time I set a new text. What I want is to not have to call the method discardAllEdits each time I change the text and, more important, as I know that I will not need any undoable edit it's better to have some way to not even save them, that's why I asked for an option to enable/disable them.


Best regards.
_
 

Re: Enhancement requests

Postby _ _ » Thu Aug 16, 2012 6:42 pm

Hi.

Is there any way I can contribute to have the first enhancement request, allow set a locale, in the trunk? (if it's of interest)

Best regards.
_ _
 

Re: Enhancement requests

Postby robert » Sat Aug 18, 2012 2:32 pm

I haven't had any requests from others for this feature, so I am hesitant to add it into the trunk. If there was more interest, I would consider it.
User avatar
robert
 
Posts: 796
Joined: Sat May 10, 2008 5:16 pm

Re: Enhancement requests

Postby _ _ » Sat Aug 18, 2012 3:00 pm

Hi.

OK, thanks.

Best regards.
_ _
 


Return to Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron