Search found 6931 matches

by dunbarx
Tue Sep 29, 2020 10:20 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to create a new label field programmatically?
Replies: 24
Views: 3141

Re: How to create a new label field programmatically?

Hi. Not sure what you mean by: My issue is that I need all these fields to be there as soon the module is installed, so adding them via the interface isn't an option. Wouldn't you have, say, a card with all twenty or so fields already resident? Do you need to add or delete fields depending on the pa...
by dunbarx
Tue Sep 29, 2020 5:17 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Rounding to the nearest 1/16
Replies: 7
Views: 246

Re: Rounding to the nearest 1/16

Paul. I just copied your original code into a button to test, but now I see how adding the "var mod" would fix the issue. Aha. Yep, I had posted the one liner, and then realized I had not considered what was required for exact sixteenth values, so I added that other line with a comment. The ceiling ...
by dunbarx
Tue Sep 29, 2020 2:41 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Best strategy for building complex software?
Replies: 15
Views: 368

Re: Best strategy for building complex software?

It’s amazing how fast I otherwise tend to forget how my own code was supposed to work and the great solutions I thought I could just store in my head until next time
You and I must be related.

Craig
by dunbarx
Tue Sep 29, 2020 2:32 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Rounding to the nearest 1/16
Replies: 7
Views: 246

Re: Rounding to the nearest 1/16

Craig here. P.S. I just tried Craig's solution, I thought of doing this initially, but if you input 4.375 it returns 4.4375 so you would need to change the line It does not for me. By inputting "4.375" I get the very same "4.375". How did you work it to get the extra sixteenth? This holds for any "p...
by dunbarx
Tue Sep 29, 2020 5:08 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Best strategy for building complex software?
Replies: 15
Views: 368

Re: Best strategy for building complex software?

Right. Good stuff, good advice, and others are likely glued to their sets.

One thing I might have glossed over in my puritanical (blinkered?) outlook is that external files may be required as adjuncts to "pure" LC if the dataSets are large.

Craig
by dunbarx
Tue Sep 29, 2020 4:57 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Rounding to the nearest 1/16
Replies: 7
Views: 246

Re: Rounding to the nearest 1/16

Hi. You have to fool LC into thinking out of the box. On a new card make a button and two fields. Put your decimal value into field 1. This can be any number at all. Put this into the button script: on mouseUp put roundOfSixteen(fld 1) into fld 2 end mouseUp function roundOfSixteen var if var mod 0....
by dunbarx
Mon Sep 28, 2020 6:45 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Best strategy for building complex software?
Replies: 15
Views: 368

Re: Best strategy for building complex software?

No idea of the scope of your project, nor the size(s) of the data. But I am old-fashioned, and generally believe that stacks and/or subStacks can do anything imaginable. Give us a broad outline of the project. Script-only stacks and dataGrids are (generally) not required for functionality, and it so...
by dunbarx
Sat Sep 26, 2020 3:24 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: [SOLVED] I need to split up a line into an array. Got all but the last part - any help?
Replies: 15
Views: 449

Re: I need to split up a line into an array. Got all but the last part - any help?

Hi.

Data would be nice, but if your script is internally incomplete I am not sure we can answer effectively.

Craig
by dunbarx
Sat Sep 26, 2020 2:23 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: [SOLVED] I need to split up a line into an array. Got all but the last part - any help?
Replies: 15
Views: 449

Re: I need to split up a line into an array. Got all but the last part - any help?

Hi.

Hard to know what is going on without much more context.

What is in "anything", or was that some catchall experimental term? What is in "newLine"?

Why are you setting the itemDel so often, when you never actually do anything with items?

Craig
by dunbarx
Sat Sep 26, 2020 2:13 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Whole numbers
Replies: 30
Views: 1323

Re: Whole numbers

Hi. I thought that both HC and LC "failed" at about 17 digits, not 16. But I could be wrong. Around that level, the internal representation of numbers reaches its limit. Hermann had made, a few years ago, functions that allowed the addition, multiplication, etc, of numbers of arbitrary length by bre...
by dunbarx
Thu Sep 24, 2020 9:45 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to set the font size and line spacing of menu items?
Replies: 9
Views: 2028

Re: How to set the font size and line spacing of menu items?

Hi. Try this, five minutes. On a new card make a button and a listField. Turn off the vertical scrollbar in the field, and place it somewhere just below the button. Explicitly set the textHeight of the field to 13. In the button script: on mouseDown runKludge end mouseDown on runKludge show fld 1 se...
by dunbarx
Thu Sep 24, 2020 9:10 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to set the font size and line spacing of menu items?
Replies: 9
Views: 2028

Re: How to set the font size and line spacing of menu items?

Mike. Again, I am only fairly sure about the fact that the menuItems are controlled by the OS, though the label of the menuButton itself is controlled by you. Nobody corrected me, so maybe that is in fact true. I had suggested that it would be a snap to roll your own, in which you can control all as...
by dunbarx
Tue Sep 22, 2020 7:35 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Whole numbers
Replies: 30
Views: 1323

Re: Whole numbers

PlaidFlannel. HC and LC work exactly the same in all respects. Any, er, integer with leading zeros and/or trailing ones after a decimal point are seen as integers in both. What does your function do that function isInt n return n is an integer end isInt does not? Most of the above thread is about wh...
by dunbarx
Sat Sep 19, 2020 6:54 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Reindex Datagrid / Access to Index
Replies: 2
Views: 193

Re: Reindex Datagrid / Access to Index

Hi. Q1: How can I reindex the DataGrid after the sorting I never do. I massage everything in either the dgText or the dgData and reload. Much more comfortable for me than to fool around with the data grid API. Q2: How can I read out the keys from the Index of a DataGrid (e.g. 5,2,4,3,1) , is there a...
by dunbarx
Thu Sep 17, 2020 3:26 pm
Forum: Talking LiveCode
Topic: Peculiar white lines in SE selection
Replies: 0
Views: 69

Peculiar white lines in SE selection

This started a while ago. LC 9.5.1. Mac OS 10.13.4 If click and drag in the SE to create a large selection, I get a series of spurious thin horizontal white lines, spaced according to the vertical drag rate. In other words, if I drag slowly, these lines appear at the lineHeight spacing. If I increas...

Go to advanced search