Search found 1970 matches

by [-hh]
Sat May 25, 2019 3:14 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Field number in a group
Replies: 23
Views: 544

Re: Field number in a group

Assume you have a group "main" containing a group "test" that contains fld id 1101 (layer 1), fld id 1012 (layer 2), btn a (layer 3), fld id 1001 (layer 4). Now use the single function function getFldNumberInGroup pNr return 1 - (the number of fld 1 of the owner of fld id pNr) \ + (the number of fld...
by [-hh]
Sat May 25, 2019 2:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: calculate the area of an irregular polygon given latitude and longitude coordinates
Replies: 1
Views: 89

Re: calculate the area of an irregular polygon given latitude and longitude coordinates

You could use the answer from here
https://stackoverflow.com/questions/478 ... -longitude

This is Java (SphericalUtil.ComputeSignedArea method from Google's Maps Utils) or C# and is easily translated to LC.
by [-hh]
Thu May 23, 2019 8:23 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Did the AltKey change from Version 9.0.1 to 9.0.4?
Replies: 11
Views: 335

Re: Did the AltKey change from Version 9.0.1 to 9.0.4?

this is documented
Not quite true. Just try:

Code: Select all

on idle
  put the keysDown
end idle
Modifier keys are reported, so the dictionary is partially wrong with
The keycodes returned by the keysDown function are the same as those passed as parameters with the rawKeyDown and rawKeyUp messages.
by [-hh]
Sat May 11, 2019 3:03 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Array: 0 and empty values
Replies: 11
Views: 318

Re: Array: 0 and empty values

Empty is... an empty string, and 0 is an integer In LC everything is a string. There are situations where empty is evaluated as zero. For example 1*empty yields zero and 1+empty yields one. Also empty parameters of a handler/function are handled as zero: function testIt x return x is zero end testI...
by [-hh]
Sun May 05, 2019 5:56 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Easier way to do this? Find variables in text
Replies: 17
Views: 551

Re: Easier way to do this? Find variables in text

Hermann's actually didn't work until I changed the lineDelimiter. Maybe can't have 2 characters as a delimiter? Just try with a LC version > 6, linedelimiter, itemdelimiter etc. can be multiple chars: Starting with LC 7. And my solution doesn't implicitly assume that "@{...}" is surrounded by space...
by [-hh]
Sun May 05, 2019 1:51 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Easier way to do this? Find variables in text
Replies: 17
Views: 551

Re: Easier way to do this? Find variables in text

Yet another option. -- str is your long text function getVariables str set linedel to "@{" set itemdel to "}" delete line 1 of str repeat for each line L in str put item 1 of L & cr after sout end repeat return sout end getVariables Do you intend to fill in the variables into your long text later on...
by [-hh]
Thu Apr 25, 2019 10:24 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Use images of a stack in another stack
Replies: 19
Views: 534

Re: Use images of a stack in another stack

You say you have a few images only. So copy the images from card x of stack A to card y of stack B and you are done. jmburnod (Jean-Marc) already described above a way to do this by script. You could also simply select the needed images on the source card (of stack A), copy, go to the destination ca...
by [-hh]
Tue Apr 23, 2019 11:34 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Rotating Widgets Resizing
Replies: 9
Views: 329

Re: Rotating Widgets Resizing

To summarize several threads about rotating the SVG widget. The widget does NEVER resize if you change the angle of the widget. This is NOT implemented. You can see this by looking at the LCB code or, simpler, by changing the angle from the property inspector in pointer mode. But if you have the bou...
by [-hh]
Tue Apr 23, 2019 11:03 am
Forum: Rich Media
Topic: Rotating an image within a graphic
Replies: 9
Views: 507

Re: Rotating an image within a graphic

You could try the following. set the ink of the (filled/opaque) graphic to "blendDstOut". put the image layered *on TOP* of the graphic. set the ink of the image to "blendDstOver" (or "blendDstAtop"). Then don't rotate the image but set its angle (and may be its loc) and set its lockloc to false . A...
by [-hh]
Tue Apr 23, 2019 10:49 am
Forum: Linux
Topic: 64 bit browser not working
Replies: 3
Views: 775

Re: 64 bit browser not working

Max is right with this shell script (but only with LC8).
He also pointed out that using this shell script helps to have the browser widget running (at least running better) with LC 8/9 on 32bit.
(See viewtopic.php?p=153351#p153351 for more detailed instructions.)
by [-hh]
Tue Apr 23, 2019 10:37 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: how can I load a website url into an image control
Replies: 11
Views: 537

Re: how can I load a website url into an image control

This is very simple with LiveCode
= use javascriptHandlers for scrolling the page,
= export snapshot for generating the corresponding image part,
= build the image from the image parts.

See
viewtopic.php?p=174346#p174346
by [-hh]
Sat Apr 20, 2019 9:03 am
Forum: Talking LiveCode
Topic: Dismissing answer dialogs after xxx seconds automatically
Replies: 8
Views: 1006

Re: Dismissing answer dialogs after xxx seconds automatically

You could also have a look on AlertBuilder, works in LC 6/7/8/9.
See the description here
viewtopic.php?p=143920#p143920
and/or download from
http://livecodeshare.runrev.com/stack/8 ... uilder-v2a
by [-hh]
Wed Apr 17, 2019 10:56 am
Forum: HTML5
Topic: How to load a text file on same domain?
Replies: 9
Views: 2074

Re: How to load a text file on same domain?

This has nothing to do with the LC HTML5 standalone builder. But you can do it in JavaScript using fetch ( see for example https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API ). If the file is on the same domain or if you would like to insert a time stamp only then you could also use SSI ( ht...

Go to advanced search