[opensource-dev] Review Request: Allow scripts to be saved/loaded to/from files.

Kadah Coba kadah.coba at gmail.com
Wed Nov 23 14:33:41 PST 2011



> On Nov. 20, 2011, 6:53 a.m., Lance Corrimal wrote:
> > found another glitch:
> > I'm developing scripts in eclipse with lslforge. When I "compile" a script in eclipse and then load it using this patch, tabstops are converted into IDunnoWhat (it shows as little squares in the script editor).
> >
> 
> Ima Mechanique wrote:
>     I'm not familiar with lslforge, but I'll look into it. Are you sure they're valid tabs? I ask because it handles tabs from LSL Editor without a problem.
> 
> Ima Mechanique wrote:
>     Looks like this is a bug I've introduced recently, as it is also affecting my LSL Editor created files now. :-(
>     Trying to track it down, as soon as I can work out how to go back to a specific revision in Hg.
> 
> Ima Mechanique wrote:
>     Damn.  SL's text editing windows do not like tabs. When copy/pasting the tabs are converted to spaces, but not when inserting text. I'll look at finding a way around this.
> 
> Kadah Coba wrote:
>     I don't remember any in-viewer text input ever liking \t particulary. It might be best, or at least easier or safer, to just convert them to spaces on import.
> 
> Cron Stardust wrote:
>     I use an external editor now for all my scripting (TextWrangler) and I have set it to use only tabs for all indentation.  The viewer accepts it just fine, and will even regurgitate the tabs when I open the same script in the external editor sometime later.  However, if I try to edit the text using the in-world editor it will mangle the tabs every time.  So my suggestion is this: don't worry about tabs when saving or loading scripts - leave the text as-is.  If it's too annoying (which I think it is) than a JIRA entry should be made, unless there is one already, to request that the SL text editor support real tabs (\t) in the text.  That's where the real problem domain is, not here, IMHO.
> 
> Ima Mechanique wrote:
>     @Kadah, @Cron. Guys, tabs are now handled as noted it the last diff (below). Are you suggesting I should remove the conversion?
>     Personally I like using tabs in my external editors, but hate the boxes in SL's editor.
>     
>     @Cron. What editor is that? I've only tried live editing externally with LSL Editor, set to use UTF-8 and only indent with tabs, but the tabs only show as boxes in SL which I find defeats the purpose of clear indentation (and ugly too).

I had the mistaken impression from my experience that part of that issue was at least the fault of more than just the UI text editor controls. I was only making the point cause the tab issue and the fact that most external editors use \t for tabs, is likely going to lead to "I uploaded a script and now I can't edit it properly in-viewer, thus the uploader is broken". 
I'd like \t to be preserved on the uploads and simple have a jira regarding the text editor's poor handling of \t linked to STORM-1708, then get that fixed separately.


- Kadah


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/516/#review1082
-----------------------------------------------------------


On Nov. 22, 2011, 5:17 p.m., Ima Mechanique wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/516/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2011, 5:17 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> Changes to allow opened script window to save/load to/from files on the users computer.
> 
> 
> This addresses bug https://jira.secondlife.com/browse/storm-1708.
>     http://jira.secondlife.com/browse/https://jira.secondlife.com/browse/storm-1708
> 
> 
> Diffs
> -----
> 
>   doc/contributions.txt a1319d553db9 
>   indra/llui/lltexteditor.h a1319d553db9 
>   indra/llui/lltexteditor.cpp a1319d553db9 
>   indra/newview/llfilepicker.h a1319d553db9 
>   indra/newview/llfilepicker.cpp a1319d553db9 
>   indra/newview/llfloaternamedesc.h a1319d553db9 
>   indra/newview/llfloaternamedesc.cpp a1319d553db9 
>   indra/newview/llpreviewscript.h a1319d553db9 
>   indra/newview/llpreviewscript.cpp a1319d553db9 
>   indra/newview/llviewerfloaterreg.cpp a1319d553db9 
>   indra/newview/skins/default/xui/en/panel_script_ed.xml a1319d553db9 
> 
> Diff: http://codereview.secondlife.com/r/516/diff
> 
> 
> Testing
> -------
> 
> Successfully opened and saved scripts from/to local files.
> 
> 
> Thanks,
> 
> Ima
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20111123/717c5f76/attachment-0001.htm 


More information about the opensource-dev mailing list