line without space problem

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

line without space problem

Post by jmburnod » Thu Apr 29, 2010 9:17 pm

Hi All,

I have a scrolling fld with a vertical scroll

focusable, autohilite = true
others properties = false

If i type a line without space, the text dont go to the next "visible" line.
I always have a line which moves towards the left

Is there a way to avoid it ?

Jean-Marc
https://alternatic.ch

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: line without space problem

Post by bn » Thu Apr 29, 2010 11:05 pm

Jean-Marc,
I am afraid this is the way it is. Rev does not know how to wrap a line if there is no space in it. You might consider this a bug.
You probably could insert a space or a return if the formattedwidth is larger then the width of the field + margins, I assume.
regards
Bernd

Curry
Posts: 111
Joined: Mon Oct 15, 2007 11:34 pm
Contact:

Re: line without space problem

Post by Curry » Fri Apr 30, 2010 1:24 am

Yes, this would be an excellent, ideal time to make note of this issue and hear voices in support, in case it can be fixed soon, because having the unspaced wrap behavior would be really useful sometimes. I've mentioned it in one venue, but the more the better, please everyone speak up now if this is important to you! I haven't checked to see if it's in the bug/feature request database.
Best wishes,

Curry Kenworthy

LiveCode Development, Training & Consulting
http://livecodeconsulting.com/

WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: line without space problem

Post by dunbarx » Fri Apr 30, 2010 3:15 pm

Interestingly, HC has no problem handling text in what we might consider the "correct" way.

It does not matter that the style of the field is "scrolling". Wrap without spaces is not supported in Rev at all.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: line without space problem

Post by jmburnod » Fri Apr 30, 2010 7:40 pm

Hi All,
Thank for your opinion
I just wanted to verify that I did not forget anything, but i can live with that.

Best

Jean-Marc
https://alternatic.ch

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: line without space problem

Post by bn » Fri Apr 30, 2010 9:15 pm

@ Dunbarx
Craig,
here is an example that uses the formattedWidth (not the formattedText) of the text of a line to insert a return if the text runs over the right edge of the field without breaking because there are no spaces in the line.

It might have to be a little tweaked for the width of the field and it is an ugly workaround I would not suggest to use generally. But in defined situations it can be helpful.
This is just a rough sketch but seems to work. No guaranties though.

It is attached as a stack below.
regards
Bernd
Attachments
wrapTextWithoutSpace.rev.zip
(1.45 KiB) Downloaded 287 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: line without space problem

Post by dunbarx » Fri Apr 30, 2010 10:57 pm

Bernd.

Nice.

You have to love Revolution.

Craig

Post Reply