Search found 5628 matches

by dunbarx
Wed Nov 21, 2018 7:18 pm
Forum: Talking LiveCode
Topic: PDF printing problem
Replies: 7
Views: 324

Re: PDF printing problem

Richmond. So you are saying that the "save as PDF" calls something in Acrobat, but "Open printing to PDF" calls something in the OS? Rats. My main "bitch" with printing to pdf is that it will NOT print the contents of a field. You mean there is no analog to the "revPrintField" command? Anyone else w...
by dunbarx
Tue Nov 20, 2018 8:49 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Calculating Text baselines in pixels
Replies: 15
Views: 428

Re: Calculating Text baselines in pixels

Hermann.

"measureText"

I am always surprised that there are native gadgets in LC that I have never heard of.

Craig
by dunbarx
Mon Nov 19, 2018 3:47 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: How to wait for completion of a script
Replies: 3
Views: 151

Re: How to wait for completion of a script

All good stuff. I just want also to suggest that you consider the advantages of having all your functionality in a single handler if possible. The times where individual handlers might best be placed in buttons is when the user is expected to click on those buttons. That might be the case with you. ...
by dunbarx
Mon Nov 19, 2018 3:33 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Delete part of text
Replies: 19
Views: 567

Re: Delete part of text

@hpsh

Your thinking is correct; it is much more robust.

I have often chosen "the easy" way in a handler, thinking surely I did not need to deal with anything unexpected. Just as often, I had to go back and rework. Those unexpected things keep popping up.

Craig
by dunbarx
Mon Nov 19, 2018 2:55 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Calculating Text baselines in pixels
Replies: 15
Views: 428

Re: Calculating Text baselines in pixels

Hi.

We are both on line, I see.

Starting with a simple field with margins set to 0, are you able to verify that the baseline of any arbitrary line is at item 4 of the formattedRect?

I have a "mouseMove" handler in the card script that sets the cursor to arrow and reports the mouseLoc.

Craig
by dunbarx
Mon Nov 19, 2018 2:53 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Calculating Text baselines in pixels
Replies: 15
Views: 428

Re: Calculating Text baselines in pixels

Hmmm. As usual, a bit more complicated than first appears. I tested with a field, and the fourth item of the formattedRect of a line is exactly where the baseline should be If I set the hGrid, the baseLine moves. If the margin bottom is not "0", there is yet another displacement. I assume all these ...
by dunbarx
Mon Nov 19, 2018 2:39 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Calculating Text baselines in pixels
Replies: 15
Views: 428

Re: Calculating Text baselines in pixels

Capellan.

But you have answered this yourself. If you have, say, the formattedRect of line 2 of fld "yourField", then the last item of that function is the baseline of that line, no?

Perhaps you have to make sure the bottom margin is "0"?

Craig Newman
by dunbarx
Sun Nov 18, 2018 7:39 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: how can I delete the shadow color of the text
Replies: 15
Views: 333

Re: how can I delete the shadow color of the text

I wrote a complex LC application to determine the ratio of pertinent replies, on-subject, divided by nonsense, however adorable.

The result was 0.00042

Craig

Edit. Uh oh, now it is 0.000042.

Edit. Uh oh ...
by dunbarx
Sun Nov 18, 2018 5:28 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Delete part of text
Replies: 19
Views: 567

Re: Delete part of text

@Klaus.

Oh, that is what you meant. Well, sure. :wink:

@ Jacque.

I thought so. But you can indeed (at least these days) fool around with the index midstream. I will test HC tomorrow. I have a feeling my little handler will not like it there.

Craig
by dunbarx
Sun Nov 18, 2018 3:48 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Delete part of text
Replies: 19
Views: 567

Re: Delete part of text

All. I guess I am just not understanding. Not the first time. In "repeat for each...", the variable instance can be modified as often as desired. It lives apart from the loop construct. What is it that cannot be changed? What is it in the construction that "should" be "read only" @Jacque. It sounded...
by dunbarx
Sat Nov 17, 2018 5:04 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Resetting IDE window
Replies: 2
Views: 120

Re: Resetting IDE window

Hi.

There is a small control that splits that window into the two portions you are speaking about. You must have used it in the past to adjust the heights of those two panes. Is it possible it has somehow become set at the very bottom of the window?

Craig Newman
by dunbarx
Fri Nov 16, 2018 6:47 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Delete part of text
Replies: 19
Views: 567

Re: Delete part of text

Klaus I always treat "repeat for each xxx" as completely read only I wonder if this is just how you are "saying" it. on mouseUp repeat for each item tItem in "1,2,3,4,5" multiply tItem by 10 put tItem & return after temp end repeat answer temp end mouseUp Surely not just "read only". And you surely ...
by dunbarx
Fri Nov 16, 2018 3:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Lists as in []
Replies: 7
Views: 196

Re: Lists as in []

What Klaus is referring to are known as "chunk" expressions, These should become second nature to you, since they provide intrinsic parsing of text down to the character level. A chunk can take several forms, and just as importantly, there are several functions that access them directly. Back to the...
by dunbarx
Fri Nov 16, 2018 3:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Lists as in []
Replies: 7
Views: 196

Re: Lists as in []

Hi. It sounds like you are describing an array variable. Arrays in LC are associative, and my attain any depth. So you might, for a single level array: on mouseUp put "A" into listName["1"] put "B" into listName["2"] put "C" into listName["3"] answer listName["2"] end mouseUp Arrays are special vari...
by dunbarx
Mon Nov 12, 2018 7:11 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: A link conundrum
Replies: 11
Views: 409

Re: A link conundrum

Fair enough. Then is the point that if one has: some words here http://www.liveCode.com some more words here the "clickText" will not include the "http://" portion? Certainly unless a string of text is "grouped" via having its link property set, LC will not see it as a single "word". And similarly "...

Go to advanced search