I am moving a project I created in LC 5.5 to LC 10.0rc1. Some buttons have
their icon set to the id of an image found in a stack “in use.” In some cases,
this still works, but several buttons no longer look right in LC10, I assume
because the icon number exists somewhere else in LC10. How can
On my Mac, some LiveCode (10.0rc1) controls seem to me much too subtle, light
gray where I would like there to be a distinct black line. The “slider”
control looks to me as if it is disabled (although if I actually disable it, it
gets even dimmer). And the circle of the radio button, the roun
I want to use the PDF widget to print a PDF with additional markings added in
LiveCode. Showing a simple PDF tax form in Widget 1 at 100% scale, I tried
this script:
on p1
get the pageRect of widget 1
open printing with dialog
print card from (item 1 to 2 of it) to (item 3 to 4 of it) into i
Let me try to clarify the problem I stated.
I am not trying to remove the button, I am trying to use the “grab” command to
let a user move the button around the window by dragging it.
If I use a script to “set the loc” of a button to somewhere outside that
group’s rectangle
- the group
A group with lockLoc set to false does not resize itself when an object in it
is moved by a “grab” command. Is this a bug? Is there a simple workaround?
Recipe using 10.0.0 dp6 on an intel Mac:
Create a button with this script:
on mouseDown; grab me; end mouseDown.
Group the button. Con
Many thanks to Richard, for his interesting results and for the reminder that
speed testing is pretty easy. I ran a similar test on a slightly different
task--flipping among 50 different groups, or 50 different cards--and got
similar results. Adding a “lock messages” sped up the card option by
Does anyone have practical experience or an understanding of the engine that
would cast light on the relative speed of some alternative ways of doing
things? I want to switch among a number of different groups, each of which may
contain its own fields, graphics, buttons, and images. Possible a
I do not know how my problems accessing the rawClipboardData were overcome,
but I succeeded in reading the array values there. So I was able to address my
original question of how to reconstruct in LiveCode a combination of text and
image copied from another program. Conclusion thus far: no
ck clipboard
> end mouseUp
>
> I tested this in LC 10dp6 and it works. Once you see what keys are
> present with your mixed text and images copied to the clipboard, you can
> choose which clipboard array and keys to work with to get the data.
>
> -- Paul
>
>
>> O
Many thanks to Paul Dupuis and Mark Waddingham. The script below tries to
test their suggestions. Using 10.0.0 dp5 on an Intel Mac, and watching
execution after the breakpoint, I get errors at each "try" in the script.
So it does not seem that I can write the fullClipboardData
or rawClipboardData
To clarify my original question:
I'm not expecting the built-in paste command to handle this task; I'm
wondering if I can script my own paste command to handle it.
Richmond, I can write a script to "paste" an image by itself (by creating
an image and setting its text to clipboardData["image"]).
From a web browser, or from programs like Word or (Apple) Notes, it is possible
to copy to the clipboard a single selection that includes both text and images.
Is there any way to paste all of this information to LiveCode—for example,
placing the text in fields and the imageData in image objects,
How can I redraw objects after the user has resized the stack, but not
continuously during the resize? Releasing the mouse at the end of a resize
does not appear to send a mouseUp message.
David Epstein
___
use-livecode mailing list
use-livecode@lists
problem has something to do with a message that calls a handler
in a stack-in-use.
Best wishes,
David
>
>
> On Thu, Jun 29, 2023 at 8:40?PM David Epstein via use-livecode
> mailto:use-livecode@lists.runrev.com>> wrote:
>>
>> I?ve just started using LiveCode 9.6.
I’ve just started using LiveCode 9.6.9 and 10.0.0 DP 5 on two Intel Macs, and
can do very little without getting this error message:
“There was an error executing a script in stack
com.livecode.library.remotedebugger. No more information is available because
the stack is password protected.”
What is the relation between the widget “PDF” and the external “XPDFViewer”
(both in Pro Features)? The latter offers more direct access to a few
properties (e.g., totalCharacterCount), while the widget syntax is a little
simpler. It does not appear that a PDF widget is a PDF Viewer, at least
My testing attempts, like Bernd’s, show that the important “limits” are not
just what LC can display in a field but what it can display without making
things too slow. I am also wondering if the new polyGrid has different
characteristics, either its absolute limits or its performance when heavi
Thanks to Bernd for this:
> Maximum length of a line in a field:
> 65,536 characters storage
> No more than 32,786 pixels wide for display
This seems to mean we can have a 65k long line only if each character’s width
is around half a pixel.
And that if the character width is 10 pixels the maximu
How many rows or columns or characters can reasonably be displayed in a
LiveCode field? A 1.39 GB text file seems pretty clearly to surpass the limit,
but how much do I need to subdivide it?
David Epstein
___
use-livecode mailing list
use-livecode@lis
I didn’t text the speed, but why not
put fld A into x[1]
put fld B into x[2]
put fld C into x[3]
put fld D into x[4]
combine x by column
return x
>
> I have a set of fields, call them A, B, C, and D. Each has the same
> number of lines. Each field has different text (per line)
>
> I need to co
Using LC 10 dp2, I am trying to script the creation of a chart widget.
My command “create widget myName as chart in group myMain” creates only a small
gray box.
The LC command “New Widget/Chart” creates a line chart, ready to be modified.
What is the LC command doing that I am not?
Or: h
Control “A” has many custom properties that are set by a variety of other
controls. If Control “A” has a "setProp property1” handler, it can react when
property1 gets set. But is there a way to give Control “A” a general handler
that will be triggered whenever any of its custom properties is s
I want to allow selection of some images from my Mac Photos library and show
them as “referenced” images in a LiveCode stack. Is there an efficient way to
do this?
What would be great is to open Photos, drag images from there to my LiveCode
stack, and record in LiveCode the file location of th
Jacqueline Gay’s suggestion is excellent, and by exactly aligning the rect of
the polygon with the rect of the image being “trimmed”, I can avoid having the
image centered or repeated. See script below.
I am still wondering what goes wrong with my alphaChannel approach to showing
irregularly
I am trying to create an image that will appear to have the shape of some
arbitrary polygon. The idea is to set the image's alphaData so that pixels
within the polygon are opaque, and those outside the polygon are transparent.
The scripts below create a rectangular image of whatever is under t
LC’s built in undo does not appear to undo anything done by something I have
scripted.
My approach is to use a global array variable “u” to store information needed
to undo the most recent action. On each action, an “undoInit” puts empty into
u, after (if necessary) cleaning up anything u’s val
My impression is that a LiveCode field scrolls less smoothly than a comparable
field in some other programs, such as MS Word and Scrivener. If I paste about
25,000 words into a word wrapped scrolling field, and then drag the scrolling
thumb up and down there is much more jumpiness than I see wh
I can use a “mouseEnter” handler to update a menu button’s contents just before
the user displays that menu. But if that menu button is part of the stack’s
menubar group on a Mac, the Mac menu does not seem to receive the mouseEnter
message and the menu is not updated. Is there a workaround?
I want to give the user a choice of whether to save changes before closing a
stack. To script this, I will handle the closeStackRequest message, and find a
way to keep track of whether the stack in question has been changed since it
was last saved.
What I am trying to figure out is under what
This is more or less Jacqueline Gay’s suggestion, but with a couple of
wrinkles. You do need to adjust for the horizontal scroll of the field (I’m
not sure about borders or margin). And if I am not mistaken sometimes “the
tabStops” will not have an entry for each tab, if the column width stays
I want to write a function that will read and write to any named global. What
I have below seems to work, but I’m not sure quite why. Usually, “put gName
into oldVal” for a global named gName would put the value, not the name, of
that global into oldVal. But here it does not.
function global
I cannot help with the project of "unlimited" undo/redo, but a simple one-layer
undo for fields is not hard to implement.
Sean Cole's suggestion that we should record the field state whenever a key is
pressed I think does more than is wanted; if you type 10 characters, you don't
want to choos
Jacqueline is correct: if I’m not debugging, the execution contexts is not in
the list of recentCards.
But my palette still does not appear in the list of recentCards. Further
testing reveals: although activating a palette triggers a resumeStack message,
and leaving a palette triggers a resum
Several people gave helpful replies to my question, including pointing out that
this is a case of “resumeStack”, not “openCard”:
Is there some simple way that an openCard handler can branch based on what card
it is coming from?
When a user goes to a different card in a stack, or to a different
Is there some simple way that an openCard handler can branch based on what card
it is coming from?
When a user goes to a different card in a stack, or to a different stack, I use
an “openCard” handler to set things up. But I do not want those actions taken
if the user is merely “returning” to
Has anyone written a LiveCode function that will take a table of 2 or more
independent variables and 1 dependent variable, and return coefficients,
intercept, and standard errors for a multiple regression?
David Epstein
___
use-livecode mailing list
u
I've done a little bit of speed testing showing extremely slight differences,
but wonder if anyone who understands the "engine" can advise on this:
Is there a difference between these two approaches?
(1) put fld 1 into txt; repeat for each line k in txt; etc.
and
(2) repeat for each line k in f
Does anyone else have problems dealing with large files on Windows 10? My main
LiveCode tool is a stack of about 1.5 MB, and I use it to create, save, and
open LiveCode stacks that store text and graphics. These "content" stacks can
be anywhere from a few kilobytes to 50 MB or more. On an iMa
While trying Mike Bonner's suggestion of "manual" measuring, I learned the
answer: a regular polygon whose official length is L and width is W is
inscribed in the oval whose length is L and width is W. So for an equilateral
triangle the area will be 3/4 * 3^.5 * R^2 (where R = L = W).
David E
If a regular polygon has 4 or 8 sides it seems to be inscribed so that all
points touch the square defined by the object’s height and width, which means
that it should be fairly easy to deduce the polygon’s area.
But with 3 sides, the triangle appears slightly smaller than the maximum size
tha
I am importing some text where certain characters do not look right. When I
test their charToNum values I get, for example, 226 and 232. 226 is shown as a
comma, but should be a lower case a with a circumflex, and 232 is shown as an
upper case e with an umlaut but should be a lower case e with
This seems like a problem that I’ve solved before, but I can’t recall how.
With a line hilited in a locked list-behavior-true field, I can use the mouse
to select text in any of a number of unlocked fields without disturbing my
list’s hilite. But if I use the tabKey to move the insertion point
Thanks for the responses on this. I used Bernd’s tool and did some more tests,
and found some things that may be helpful to others.
While the left and right margins of a field are meant literally (a 5 pixel left
margin leaves 5 white pixels to the left of the text), the top margin is more
comp
Is there somewhere an explanation of how a field’s textSize, borderWidth,
margins, and formattedHeight interact?
According to the dictionary entry for “formattedHeight”, a field’s
formattedHeight is calculated “including top and bottom margins”, while the
formattedHeight of a chunk is calcula
I use “the number of words in myString = 0” to test whether a line of text
appears empty, since I want a line with only space characters to be understood
as empty.
But a line of text I pasted from elsewhere contained an invisible character
whose charToNum value is 202, and this was counted as a
To clarify:
For a locked field with autohilite and traversalOn both true, the “built in”
auto scrolling works the same as with an unlocked field. I’m looking for a way
to script this kind of auto scrolling with autohilite and traversalOn both
false.
David Epstein
___
When the mouse drags across text in an unlocked (horizontally and vertically)
scrolling field, the field automatically scrolls at a legible rate to display
the (previously hidden) text that the mouse was dragging toward.
Has anyone scripted a way to reproduce this effect for a locked field?
Many
47 matches
Mail list logo