posting scripts

Here's where to post questions and suggestions regarding forum use. Requests for new forum topics should be posted here as well.

posting scripts

Postby S. Leys » Thu Mar 05, 2009 1:42 am

One of the reasons why I tend to prefer discussions on the list is that, in this forum, when posting a script, we need to put them into a code tag to have it indented. The maximum height of the resulting field is rather small, which makes reading the script quite painful.
Wouldn't it be possible to have a size box in these fields ?
After all, the field where I'm writing this has a size box.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: posting scripts

Postby Scott » Thu Mar 05, 2009 9:06 am

Actually... the "size box" is a feature in Safari that is automatically created on certain form elements. In the case of what you see in the thread, well... I think it is 'designed' to not take up a bunch of screen real estate within the post. Instead it has a select link to allow you to copy code tagged elements to the clipboard without the possibility of browser encoding errors.

While there is no setting in the admin controls to adjust this, I can look into it. But that begs the question "how big should it be?"
User avatar
Scott
Site Admin
 
Posts: 1214
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: posting scripts

Postby S. Leys » Thu Mar 05, 2009 11:48 am

supercardus wrote:But that begs the question "how big should it be?"


I would tend to say as big as the script. When the script is smaller, the field is smaller too, so, there is something adapting the size of the field to the size of the script. I would plead for having no limit. After all, we can scroll the window and people are not usually abusing, nobody posts very long scripts.
Or you could set the limit to the height of a MY screen : 1200 pixels ;-)

     Another option would be to do that the editor doesn't remove the indentation when pasting an indented script with no tag. Why are leading spaces removed from each line ? I tested with this line, I had to put opt-spaces, normal spaces are removed. I tested this with FireFox , same thing, so it's not a Safari thing.

S.
User avatar
S. Leys
 
Posts: 628
Joined: Sun Jul 06, 2008 11:03 am

Re: posting scripts

Postby Scott » Thu Mar 05, 2009 12:10 pm

Stephane Leys wrote:Why are leading spaces removed from each line ?


That is just how html is parsed. Multiple white space is simply ignored unless it is something like a non-breaking space or a <br>. These kinds of parsing issues are precisely why the code tags exist.
User avatar
Scott
Site Admin
 
Posts: 1214
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada

Re: posting scripts

Postby Lisa » Mon Mar 09, 2009 4:55 pm

Stephane Leys wrote:The maximum height of the resulting field is rather small, which makes reading the script quite painful.

I agree. Scott, you might take a look at the MacScripter forums, which has a feature for posting applescript code that shows up in a box whose height is scaled to fit the actual text, no scrolling necessary.
iMac 24" 3.06 GHz Intel Core 2 Duo, 4 GB RAM, Mac OS X 10.6.8, SC 4.7.3
User avatar
Lisa
 
Posts: 303
Joined: Sun Jul 06, 2008 12:33 pm
Location: San Diego, CA

Re: posting scripts

Postby bmartin » Mon Mar 09, 2009 7:00 pm

Personally I like the ability to skip over blocks of script while reading the forums. So the smaller size is nice, but if others like full scripts that's fine.
Bruce Martin

Mac Os 10.6.3
2.8 Ghz Intel Core 2 Duo
4GB 1067 MHz DDR3
User avatar
bmartin
 
Posts: 149
Joined: Mon Jul 07, 2008 7:26 am
Location: Stroudsburg, PA

Re: posting scripts

Postby Scott » Sat Mar 28, 2009 4:14 pm

I do too Bruce. Seems simple enough to use the select all link, copy and paste it into TextEdit (or the editor of your choice) to examine the script. I am not much of a php head so, considering what it would take to change it, I think we'll leave it as it is.
User avatar
Scott
Site Admin
 
Posts: 1214
Joined: Sat Jul 05, 2008 1:37 pm
Location: Northern Sierra Nevada


Return to Site News, Questions, and Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron