Search found 57 matches

by monki
Sat Aug 08, 2020 12:50 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Regex to capture punctuation or space *Solved*
Replies: 4
Views: 3030

Re: Regex to capture punctuation or space

Instead of the word chunk, you can use trueWord. That parses according to the natural language rules in the IBM Unicode library, which are generally pretty good. The issue was that I kept parsing out the space character I was trying to find and replace :oops: Throwing it into an array by word would...
by monki
Sat Aug 08, 2020 12:32 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Regex to capture punctuation or space *Solved*
Replies: 4
Views: 3030

Re: Regex to capture punctuation or space

Ok, I've figured out the problem. In order to run a filter on the words of a text field, I "set the itemDel to space", which removed the space characters. So that was my issue. I'll have to look for a different solution, maybe an array, to filter the words. So, I'm trying to grab "word**." or some p...
by monki
Sat Aug 08, 2020 12:15 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Regex to capture punctuation or space *Solved*
Replies: 4
Views: 3030

Regex to capture punctuation or space *Solved*

So, I'm trying to grab "word**." or some punctuation or a space character, and not "some**word " I'm using "\S\*\*\W" as a search pattern to do this, which should work. In Livecode "\S\*\*\W" will grab "years**." ending in period . It will grab "mean**," ending in comma . But it will not grab "someo...
by monki
Sun Aug 02, 2020 5:36 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

I rarely use long text fields and mostly don't even use scrolling fields, so selectedLoc and vScroll I don't know much of anything about. So I couldn't make the association that she was trying to point me towards. A made a more complicated one that didn't work as well 8)
by monki
Sun Aug 02, 2020 12:36 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

SparkOut wrote:
Sat Aug 01, 2020 6:41 pm
Try this in the field script
Yeah, that nailed it. :D Handles changes to text size and leading too. Excellent.
Thanks for all your help guys.
by monki
Sat Aug 01, 2020 3:21 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

Maybe the typewriter metaphor was a bit confusing. What I'm trying to do is scroll lock the cursor to, more or less, the center of the field--for most of the doc at least. This should create the effect of the paragraphs scrolling up to meet the cursor position. And because it does this, edits, retur...
by monki
Sat Aug 01, 2020 5:25 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

Hmm, my test field has 2166 words and I'm getting a scroll towards the middle effect, field width of 871 by a height of 950. It's not so pronounced if the cursor's already towards the middle.
by monki
Sat Aug 01, 2020 3:26 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

Added the "local tScrollCompensation = 250" var to cause the "scroll to" point to be a few characters above the cursor. That pushes the scroll point down the field. That seems to bring it more into place. I think I need a better compensation factor that will account for changing the distance between...
by monki
Fri Jul 31, 2020 11:42 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

If you still want to pursue this let me know. The action seems to do what you want, but it also has complications. I just like to play with LC. Craig on returnInField centerCursor(the selectedChunk) pass returnInField end returnInField on arrowKey aKey if aKey is "up" or aKey is "down" then centerC...
by monki
Mon Jul 27, 2020 4:28 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

Thanks, Craig. I might dig back into it after I get some other stuff done.
by monki
Sun Jul 26, 2020 11:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

None of the solutions quite had the effect. I think part of the issue is that I'm dealing with long paragraphs of text rather than short lines. It's not that big of an issue, just thought it would be a nice thing to add. Thanks for the ideas tho.
by monki
Sun Jul 26, 2020 4:08 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Re: Vertically Centering Cursor in Field

No, I'm looking for a way to keep the line being typed into centered-ish in its field. The way a typewriter always keeps its current line in one location. Thanks for the ideas, guys. I'll dig into them tomorrow when I have more of a brain working.
by monki
Fri Jul 24, 2020 11:41 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Vertically Centering Cursor in Field *Solved*
Replies: 22
Views: 9120

Vertically Centering Cursor in Field *Solved*

Is there a way to vertically center the cursor to create a typewriter-like effect in a text field? So when the cursor moves down inside the text the field scrolls up, etc. Is this possible? This solution by jacque and coded by SparkOut works well. I moved it to the first post to make it easier to fi...
by monki
Sun Jun 10, 2018 7:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: showing the outerglow effect
Replies: 4
Views: 3025

Re: showing the outerglow effect

Ah, ok, that worked. Thanks for your help :)
by monki
Sun Jun 10, 2018 7:20 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: showing the outerglow effect
Replies: 4
Views: 3025

Re: showing the outerglow effect

1. yeah, I did that.
2. I did that, too.

Looking at the interface, it actually shows the radio as checked (active), but still doesn't show the outer glow... :?

Maybe I need to reinstall livecode, or something :|

Go to advanced search