Re: Long URL in a field

2010-06-14 Thread Emmett Gray

At 4:37 AM -0500 6/14/10, Sarah Reichelt sarah.reich...@gmail.com wrote:


No, wrapping on Rev only works with white space.
So I wrote a routine to space out a long URL to fit a specific field:


Thanks to all who responded, but a) a URL may be long because it has 
multiple foo=bar elements rather than slashes, and then b) whether 
I'm grabbing them by scripting or selecting manually, any alteration 
is counterproductive. I'll live with them spilling off out of sight.

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Long URL in a field

2010-06-14 Thread Mark Schonewille

Hi Emett,

You could also shorten the URLs with http://qurl.tk :-)

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

Subscribe to the Economy-x-Talk newsletter at http://qurl.tk/cj
Download Clipboard Link http://clipboardlink.economy-x-talk.com and  
share the clipboard of your computer over the local network.


On 14 jun 2010, at 15:56, Emmett Gray wrote:


Thanks to all who responded, but a) a URL may be long because it has  
multiple foo=bar elements rather than slashes, and then b)  
whether I'm grabbing them by scripting or selecting manually, any  
alteration is counterproductive. I'll live with them spilling off  
out of sight.



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Long URL in a field

2010-06-13 Thread Emmett Gray
In the HC version of a stack I've converted, I have a notes text 
field. The field has a vertical scroll bar, but not a horizontal one 
(and that's what I want). In HC, a long URL will wrap so you can see 
the whole thing on multiple lines. In Rev, it doesn't wrap so you 
can't see it all (although you can still select it by dragging to the 
right). Can this behavior be changed to be like in HC (i.e. force a 
line with no spaces to wrap)?

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Long URL in a field

2010-06-13 Thread Sarah Reichelt
On Mon, Jun 14, 2010 at 6:33 AM, Emmett Gray fi...@handheldfilm.com wrote:
 In the HC version of a stack I've converted, I have a notes text field.
 The field has a vertical scroll bar, but not a horizontal one (and that's
 what I want). In HC, a long URL will wrap so you can see the whole thing on
 multiple lines. In Rev, it doesn't wrap so you can't see it all (although
 you can still select it by dragging to the right). Can this behavior be
 changed to be like in HC (i.e. force a line with no spaces to wrap)?

No, wrapping on Rev only works with white space.
So I wrote a routine to space out a long URL to fit a specific field:

command formatFolderPath pFieldName
 repeat while the formattedWidth of fld pFieldName = the width of
fld pFieldName
  -- find the last slash  replace with slash  cr
  put the text of fld pFieldName into tFolder
  repeat with x = the number of chars in tFolder down to 1
   if char x of tFolder = slash and char x+1 of tFolder  cr then
put cr after char x of tFolder
put tFolder into fld pFieldName
exit repeat
   end if
  end repeat
 end repeat
end formatFolderPath

Then when using the file path, you just need to make sure you replace
cr with empty and you get back to the original.
There are obvious improvements that could be made, but for a quick
fix, it works OK.

-- 
Cheers,
Sarah

Rodeo discussion:
http://rodeoapps.com/rodeo-discuss-among-yourselves
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Long URL in a field

2010-06-13 Thread Jeff Massung
Just to throw out another idea...

For my RSS app I wrote a routine that would truncate a link with ... when
it would extend beyond the length of a field and set the linkText of the
chunk to the full URL so it'd still work.

Jeff M.

On Sun, Jun 13, 2010 at 6:51 PM, Sarah Reichelt sarah.reich...@gmail.comwrote:

 On Mon, Jun 14, 2010 at 6:33 AM, Emmett Gray fi...@handheldfilm.com
 wrote:
  In the HC version of a stack I've converted, I have a notes text field.
  The field has a vertical scroll bar, but not a horizontal one (and that's
  what I want). In HC, a long URL will wrap so you can see the whole thing
 on
  multiple lines. In Rev, it doesn't wrap so you can't see it all (although
  you can still select it by dragging to the right). Can this behavior be
  changed to be like in HC (i.e. force a line with no spaces to wrap)?

 No, wrapping on Rev only works with white space.
 So I wrote a routine to space out a long URL to fit a specific field:

 command formatFolderPath pFieldName
 repeat while the formattedWidth of fld pFieldName = the width of
 fld pFieldName
  -- find the last slash  replace with slash  cr
  put the text of fld pFieldName into tFolder
  repeat with x = the number of chars in tFolder down to 1
   if char x of tFolder = slash and char x+1 of tFolder  cr
 then
put cr after char x of tFolder
put tFolder into fld pFieldName
exit repeat
   end if
  end repeat
 end repeat
 end formatFolderPath

 Then when using the file path, you just need to make sure you replace
 cr with empty and you get back to the original.
 There are obvious improvements that could be made, but for a quick
 fix, it works OK.

 --
 Cheers,
 Sarah

 Rodeo discussion:
 http://rodeoapps.com/rodeo-discuss-among-yourselves
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Long URL in a field

2010-06-13 Thread J. Landman Gay

Emmett Gray wrote:
In the HC version of a stack I've converted, I have a notes text 
field. The field has a vertical scroll bar, but not a horizontal one 
(and that's what I want). In HC, a long URL will wrap so you can see the 
whole thing on multiple lines. In Rev, it doesn't wrap so you can't see 
it all (although you can still select it by dragging to the right). Can 
this behavior be changed to be like in HC (i.e. force a line with no 
spaces to wrap)?


As Sarah said, Rev won't wrap these lines. If your field has no tab 
stops in it, you can use a cheat. Set the tabstops of the field to 1. 
Then use this in your handler:


  replace slash with slashtab in fld 1

Visually it looks almost right, you have to really squint to see those 
1-character tabs. This way the engine will wrap the line automatically. 
If you only want to wrap a single line in the field, just use something 
like:


  replace slash with slashtab in line x of fld 1

If you need to use the URL for something, be sure to replace tab with 
empty in the field contents before using it for anything:


  get line x of fld 1
  replace tab with empty in it
  launch url it -- or whatever

If you need real, hard-coded carriage returns or you can't set the 
tabstops to 1, this handler works on longer URLs that need to wrap over 
more than 2 lines. (Sarah's works fine on 2-line wraps.)


on wrapField pFld -- pass name or number
  set the itemdel to slash
  put the width of fld pFld - (the leftmargin of fld pFld) - (the \
 rightmargin of fld pFld) into tWidth
  put 1 into x
  repeat until the formattedwidth of fld pFld = tWidth
if the formattedwidth of item 1 to x of fld pFld  tWidth then
  put item 1 to x-1 of fld pFld  slash  cr after tText
  delete item 1 to x-1 of fld pFld
  put 1 into x
else
  add 1 to x
end if
  end repeat
  put tText  fld pFld into fld pFld
end wrapField


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Long URL in a field

2010-06-13 Thread J. Landman Gay

J. Landman Gay wrote:

If you need real, hard-coded carriage returns or you can't set the 
tabstops to 1, this handler works on longer URLs that need to wrap over 
more than 2 lines.


Well, I gave you an old handler for that -- and I just found a note to 
myself that it was deprecated. Here's a better way to add hard carriage 
returns, it's all built-in:


on wrapField pFld
  replace slash with slashspace in fld pFld
  put the formattedText of fld pFld into fld pFld
  replace space with empty in fld pFld
end wrapField

I should have double-checked before writing.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution