Search found 117 matches

by danielrr
Wed Apr 26, 2017 8:01 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Fastest way to know the contents of the latest line of a doc
Replies: 9
Views: 1780

Re: Fastest way to know the contents of the latest line of a

Mr. Coollion's method seems pretty straightforward. But just curious; what kind of document are you thinking of? The text portion of the Encyclopedia Britannica is only 100MB or so (my estimate). That is not even close to the memory limits of the usual computers these days. Craig Newman Craig, I th...
by danielrr
Wed Apr 26, 2017 7:55 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Fastest way to know the contents of the latest line of a doc
Replies: 9
Views: 1780

Re: Fastest way to know the contents of the latest line of a

Code: Select all

get the last line of URL ("file:" & tDocumentPathAndName) 
Woah! Thanks. That's even better that I had expected.
The only problem with this kind of Wunder answers is that they make me wonder how much I'm still missing. By the way, how does *that* works?

best,

Daniel
by danielrr
Wed Apr 26, 2017 2:40 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Fastest way to know the contents of the latest line of a doc
Replies: 9
Views: 1780

Re: Fastest way to know the contents of the latest line of a

I mentioned "long" document to point to the case where the contents of the file are too long to be copied in memory. Of course you can just read the whole file and return the last line or the nth line. But in cases when such procedure is not advisable due to memory limitations, what's the fastest wa...
by danielrr
Wed Apr 26, 2017 2:22 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Fastest way to know the contents of the latest line of a doc
Replies: 9
Views: 1780

Fastest way to know the contents of the latest line of a doc

Hi all,

The subject of the message says almost all: What's the fastest way in LiveCode to know the contents of the latest line of a very long text document? And not just the last line, but the nth line?

best,

Daniel
by danielrr
Mon Nov 07, 2016 12:16 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Intersecting polygons
Replies: 6
Views: 2014

Re: Intersecting polygons

Thanks again [-hh] (can't imagine how to spell that) for the Sutherland–Hodgman tip! And for those living the last year under a rock like my own, the RB Pi stacks reference is a pointer to http://forums.livecode.com/viewtopic.php?f=76&t=19248
by danielrr
Sun Nov 06, 2016 9:35 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Intersecting polygons
Replies: 6
Views: 2014

Re: Intersecting polygons

Sure. Probably I explained myself poorly. I am sending a screenshoot of my project. You'll see three graphs encompassing different points. Together they include all the points in the map (i's a semantic map, by the way). Graphs are drawn as per your algorythm. As you can see, the blue polygon inters...
by danielrr
Sun Nov 06, 2016 1:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Intersecting polygons
Replies: 6
Views: 2014

Intersecting polygons

I am still enjoying [-hh's] answer to my previous post about creating a polygon around a set of points (aka creating a convex hull of a set of points, a matter I'm still reading about). Now the question arises, and by posting it I'm probably only exhibiting my ignorance, (a) How do I know what's the...
by danielrr
Sat Nov 05, 2016 10:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: drawing a polygon around objects
Replies: 4
Views: 1582

Re: drawing a polygon around objects

:D :D Thanks, again. I had arrived at a similar, less elegant solution: on mouseUp put fld "filiaciones" into filiaciones repeat with x = 1 to the number of lines of filiaciones put line x of filiaciones into lalin put "" into losRects repeat for each item elit in lalin put the rectangle of fld (eli...
by danielrr
Sat Nov 05, 2016 9:53 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: drawing a polygon around objects
Replies: 4
Views: 1582

Re: drawing a polygon around objects

:shock: :D :D Once again , I stand in awe at the solution. Thanks so much hh!. It's pretty late here, so I'll spend the first hours of the day of tomorrow enjoying your code. However, as it stands, the code is not flawless: I implemented it thusly: on mouseUp put fld "myFields" into myFields --each ...
by danielrr
Fri Nov 04, 2016 6:31 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: drawing a polygon around objects
Replies: 4
Views: 1582

drawing a polygon around objects

Hi all, I need to build a polygon around an irregullarly distributed group of fields (any number of fields), and make this polygon as fit as possible. I know this is a beautiful exercise in coding, but before giving it the time it really deserves I'll dare to ask: Is there already an algorithm to do...
by danielrr
Thu Jul 28, 2016 5:50 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: UNIX linebreaks in Mac OS
Replies: 6
Views: 1406

Re: UNIX linebreaks in Mac OS

Thanks Klaus, FourthWorld; you both made my day. Both ways work like a charm. Alas, for very large files (I mean a monster of 700MB) the option of opening in binary and use the read/write is much faster that using the url binfile option, so I used the former. Thanks again.
by danielrr
Thu Jul 28, 2016 4:58 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: UNIX linebreaks in Mac OS
Replies: 6
Views: 1406

Re: UNIX linebreaks in Mac OS

Thanks. I am using the old open file, write to file, close file method. Is that important?
by danielrr
Thu Jul 28, 2016 4:48 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: UNIX linebreaks in Mac OS
Replies: 6
Views: 1406

UNIX linebreaks in Mac OS

Hi everyone! How can I write to a file im MacOs with unix line-breaks? I see that there's no use in using replace numToChar(13) with numToChar(10) in container or replace numToChar(13) with linefeed in container before exporting it to a file, because LC will translate it into mac linebreaks. I need ...
by danielrr
Thu Jun 23, 2016 6:14 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Scrolling card
Replies: 3
Views: 1043

Re: Scrolling card

Thanks you both very much. You gave me the solution.
by danielrr
Thu Jun 23, 2016 1:02 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Scrolling card
Replies: 3
Views: 1043

Scrolling card

Hi, I have a stack with just one card. This card contains many objects and the user can create more of these. The objects in the card are groups of fields and graphics (think of a mind-mapper app). At some point there's more objects in the card that can fit the screen of a laptop mac, so I need to c...

Go to advanced search