Long URL in a field
Jeff Massung
massung at gmail.com
Sun Jun 13 22:03:52 EDT 2010
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.reichelt at gmail.com>wrote:
> On Mon, Jun 14, 2010 at 6:33 AM, Emmett Gray <film2 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list