sorting algorithms

2017-06-29 Thread Mark Wieder via use-livecode
Fascinating youtube video demonstrating 15 sorting algorithms visually and sonically. https://boingboing.net/2017/06/28/15-sorting-algorithms-visualiz.html -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list

Re: Shell - c Full Example

2017-06-29 Thread JB via use-livecode
Thanks for the code tip, Mark. JB > On Jun 29, 2017, at 8:20 PM, Mark Wieder via use-livecode > wrote: > > On 06/29/2017 07:40 PM, JB via use-livecode wrote: > >> char* getReverse(char const str[]){ >> static int i=0; >> static char rev[MAX]; >>

Re: Shell - c Full Example

2017-06-29 Thread Mark Wieder via use-livecode
On 06/29/2017 07:40 PM, JB via use-livecode wrote: char* getReverse(char const str[]){ static int i=0; static char rev[MAX]; if(*str){ getReverse(str+1); rev[i++] = *str; } return rev; } Nice use of recursion, but note that you're

Shell - c Full Example

2017-06-29 Thread JB via use-livecode
The following shows you how to compile c code from the terminal and run it in Livecode. 1. Open a text editor and paste the following c code; #include #define MAX 100 char* getReverse(char const []); int main(int argc, const char * argv[]) { char *rev; char const *str = argv[1];

Google Static Maps Problem

2017-06-29 Thread William Prothero via use-livecode
Folks: I’ve found a way to display an image of a google static map, in my app. It’s quite easy and well-documented. However, I need to get the lat and lon values of the corners of the map, at the displayed zoom level. There is a simple-looking javascript example for doing this at:

Re: Levure wiki / documentation

2017-06-29 Thread Andre Garzia via use-livecode
It is talking longer than I wanted because I am building the whole system and that takes time :-) I should have just signed up for a teachable account but I wanted to own the system, so, right now I am finishing the content and infrastructure. On Thu, Jun 29, 2017 at 7:41 PM, Andre Garzia

Re: Levure wiki / documentation

2017-06-29 Thread Andre Garzia via use-livecode
Hi Lagi, Actually, I am reworking the material into an online course, should launch as a beta shortly. Doing it online allows me to iterate the material and offer more compelling content than using the old system. :D On Tue, Jun 27, 2017 at 8:50 AM, Lagi Pittas via use-livecode <

Re: synonyms

2017-06-29 Thread Bob Sneidar via use-livecode
Wait I think that is what the Tree View (however imperfectly) works. Bob S > On Jun 29, 2017, at 13:44 , Bob Sneidar via use-livecode > wrote: > > I thought it was about making the engine do it. Still, I take your point that > many arguments will require a

Re: synonyms

2017-06-29 Thread Bob Sneidar via use-livecode
I thought it was about making the engine do it. Still, I take your point that many arguments will require a lot more typing. If it's that much of a chore, how about an array building pallet stack, where you type an array name, a series of keyname/value/hit enter sequences and it builds the code

Re: Table Fields "and all"

2017-06-29 Thread Bob Sneidar via use-livecode
Which is to say, "I think. Therefore... I have no idea what the hell that means." ;-) Bob S > On Jun 29, 2017, at 12:51 , Richmond Mathewson via use-livecode > wrote: > > Um: > > http://www.bbc.com/news/health-39518580 > > "So the prevailing idea was that

Re: synonyms

2017-06-29 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > On Jun 29, 2017, at 10:33 , Richard Gaskin wrote: >> >> > put "chart" into tType >> > put "100" into tSize >> > doSomething tType, tSize >> >> That's not a one-liner. That's three lines. :) >> >> The call itself is indeed only one line, but to prep the args for the >> call

Release 9.0.0 DP7 / SVG / The book of the film of the poem

2017-06-29 Thread Alejandro Tejada via use-livecode
Hi Franz, I found a temporal solution for a limitation that you found in the SVG MultiColor widget. Looks like every vector path rendered in this SVG MultiColor widget could have a fill or a stroke, but not both. If a path have a fill color, the stroke is not rendered. The workaround for this

Re: Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
Um: http://www.bbc.com/news/health-39518580 "So the prevailing idea was that memories are formed in the hippocampus and then moved to the cortex where they are "banked". The team at the Riken-MIT Center for Neural Circuit Genetics have done something mind-bogglingly advanced to show this is

Re: Printing a Widget Browser

2017-06-29 Thread Jonathan Lynch via use-livecode
Also, have you tried this: Do "window.print()" in widget "my widget" Sent from my iPhone > On Jun 29, 2017, at 3:37 PM, jonathandly...@gmail.com wrote: > > Could you export to a file, launch that in the user's standard browser, and > print from there? > > Sent from my iPhone > >> On Jun 29,

Re: Table Fields "and all"

2017-06-29 Thread Tore Nilsen via use-livecode
> 29. jun. 2017 kl. 21:29 skrev Richard Gaskin via use-livecode > : > > hh wrote: > >> RG wrote: > >> The human mind can generally hold between three and seven things in > >> conscious memory at any given time. > > > > How did you measure that? > > Good

aborting on wait with messages?

2017-06-29 Thread Dr. Hawkins via use-livecode
In my startup routines (which, admittedly are complex and modify stacks), I have a routine which gets called, puts empty into a pair of global arrays it is about to build or rebuild, and then a "wait 0 with messages" It stops at the wait with "button "src_mcp": execution error at line 1535 (wait:

Re: Printing a Widget Browser

2017-06-29 Thread Jonathan Lynch via use-livecode
Could you export to a file, launch that in the user's standard browser, and print from there? Sent from my iPhone > On Jun 29, 2017, at 2:04 PM, Terence Heaford via use-livecode > wrote: > > > Not posted for a long time but still keeping an eye on progress. >

Re: Table Fields "and all"

2017-06-29 Thread Richard Gaskin via use-livecode
hh wrote: >> RG wrote: >> The human mind can generally hold between three and seven things in >> conscious memory at any given time. > > How did you measure that? Good question. It's been so long since I took that cog psy class back in college that I'd have to dig up my old text books to

Re: synonyms

2017-06-29 Thread Mark Wieder via use-livecode
On 06/29/2017 09:57 AM, Alex Tweedly via use-livecode wrote: Mark, are you trying to allow mixing of positional and named actual parameters ? Exactly. In your example, is "This is a chart" the actual parameter for the first or second positional parameter ? Would it not be less confusing

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
On 29/06/2017 19:11, Bob Sneidar via use-livecode wrote: That's possible in R, Python, CSS, and others, but not natively in LC. I suppose lots of things are possible in other languages. Are we trying to be just like all the other languages? No. What we should be trying to do is pick out

Re: Table Fields "and all"

2017-06-29 Thread Bob Sneidar via use-livecode
He doesn't remember. He has 8 other things on his mind. Bob S > On Jun 29, 2017, at 10:49 , hh via use-livecode > wrote: > >> RG wrote: >> The human mind can generally hold between three and seven things in >> conscious memory at any given time. > > How did

Re: Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
Personally I always take a ruler to bed to: 1. measure how long I sleep. 2. To find out what a night of passion with a crowned head is like. Richmond. On 6/29/17 8:49 pm, hh via use-livecode wrote: RG wrote: The human mind can generally hold between three and seven things in conscious memory

Re: synonyms

2017-06-29 Thread Bob Sneidar via use-livecode
put "chart" into tType ; put "100" into tSize ; doSomething tType, tSize That is a one liner too. So what? Are we averse to carriage returns? If it's that big a deal someone could write a function that takes > doSomething type="chart" size="100" and converts it to: > doSomething put "chart"

Printing a Widget Browser

2017-06-29 Thread Terence Heaford via use-livecode
Not posted for a long time but still keeping an eye on progress. Is there any chance of printing a Browser Widget any time soon? This code just gives a grey printout. I am waiting patiently for this so that I can use for example amCharts within LiveCode. I have implemented a print routine by

Re: Table Fields "and all"

2017-06-29 Thread hh via use-livecode
> RG wrote: > The human mind can generally hold between three and seven things in > conscious memory at any given time. How did you measure that? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe,

Re: synonyms

2017-06-29 Thread Richard Gaskin via use-livecode
Bob Sneidar wrote: > Sorry, I simply do not see any advantage to this, other than making a > one liner to pass data to a command or function. > > put "chart" into tType > put "100" into tSize > doSomething tType, tSize That's not a one-liner. That's three lines. :) The call itself is indeed

Re: Table Fields "and all"

2017-06-29 Thread Richard Gaskin via use-livecode
Richmond Mathewson wrote: > On 6/29/17 11:13 am, Lagi Pittas wrote: >> I had the same problem when I started using Tables and after I >> found the TAB delimiter "trick" as per Hermann, it was obvious >> (20/20 Hind sight). >> The Aha! moment came when using commas messed it up by putting them >>

Re: How to get the number of lines of a fld referenced by long ID in a variable.

2017-06-29 Thread Richard Gaskin via use-livecode
Sannyasin Brahmanathaswami wrote: > But that it would be nice not be "stuck" with only finding out the > properties of the variable as a variable. > > i.e. pField is a variable with 1 line… > > but to be able to address the properties of the object referred to by > a variable containing the

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
Mark, are you trying to allow mixing of positional and named actual parameters ? In your example, is "This is a chart" the actual parameter for the first or second positional parameter ? Would it not be less confusing to expect (as Python does) that non-named parameters must come first in

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
On 29/06/2017 17:43, Mike Bonner via use-livecode wrote: yeah, that was kinda my point. It bipasses the need to jump through all the hoops of building up the proper string, then having to break it into parts on the other end. My earlier example (way over simplified) ended up using split

Re: Sharp as a pound (was Array assignment...)

2017-06-29 Thread Bob Sneidar via use-livecode
Point taken. When communicating, we never really listen to what is being said, but rather to what is likely meant. This can cause confusion sometimes, but the obvious advantage is that we get on with minimal fuss. Computer languages don't tolerate such things, unless you program them to. Hence

Re: synonyms

2017-06-29 Thread Mike Bonner via use-livecode
yeah, that was kinda my point. It bipasses the need to jump through all the hoops of building up the proper string, then having to break it into parts on the other end. My earlier example (way over simplified) ended up using split create an array out of name value pairs.. It just makes more

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
On 29/06/2017 17:17, Mike Bonner via use-livecode wrote: The thing about passing in as an array is.. its just a different form of name value pairs, so it sidesteps the whole issue. alue pairs. Not quite - there's a crucial difference. Using an array for name/value pairs, you can pass in an

Re: synonyms

2017-06-29 Thread Mark Wieder via use-livecode
On 06/28/2017 08:55 AM, Richard Gaskin via use-livecode wrote: > Even better. > > You solution illustrate more so than mine how easy it is to make > handler and functions that use name/value pairs if someone prefers > that model. The xtalk language really doesn't need any extensions > or

Re: synonyms

2017-06-29 Thread Mike Bonner via use-livecode
The thing about passing in as an array is.. its just a different form of name value pairs, so it sidesteps the whole issue. On Thu, Jun 29, 2017 at 10:11 AM, Alex Tweedly via use-livecode < use-livecode@lists.runrev.com> wrote: > No, what I meant was Richard's fourth method, described in > >

Re: Array assignment / initialization [was Re: synonyms]

2017-06-29 Thread Mark Wieder via use-livecode
On 06/28/2017 03:32 PM, Alex Tweedly via use-livecode wrote: Yes, it would be nice if we had an easier (terser) way to assign to an array. Maybe something like Python / Perl use to assign to a dictionary. ...and ruby. Let's not forget ruby. Ruby allows for DoSomething name: "my chart",

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
No, what I meant was Richard's fourth method, described in More with-the-grain would be this fourth option, passing in an array as we see with some existing LC commands and functions, but that requires a LOT more typing: put "my chart" into tA["name"] put 100 into tA["width"] put

Re: synonyms

2017-06-29 Thread Bob Sneidar via use-livecode
Sorry, I simply do not see any advantage to this, other than making a one liner to pass data to a command or function. put "chart" into tType put "100" into tSize doSomething tType, tSize What is the big deal? This can become: put "chart" into tType ; put "100" into tSize ; doSomething tType,

Re: synonyms

2017-06-29 Thread Bob Sneidar via use-livecode
I'm not sure what you mean by "pass by parameters" but I pass arrays by parameters all the time. If you mean: function getSomeInfo @aMyArray -- do some stuff return true end getSomeInfo That works fine. Bob S > On Jun 28, 2017, at 15:14 , Alex Tweedly via use-livecode >

Re: synonyms

2017-06-29 Thread Alex Tweedly via use-livecode
Yeah, so do I - that's why it's important to me :-). But you can't do that using the "parameters as strings" techniques described by Mike Bpnner and Paul Dupuis - i.e. DoSomething "type=chart", "size=100" or DoSomething "type=chart, size=100" Also, you can use the technique of using

Re: Table Fields "and all"

2017-06-29 Thread Bob Sneidar via use-livecode
First of all, tell me the bits of information are delimited by tabs or commas, otherwise I am going to go back and ask the source of that information to please provide it to me in a form I can use. If the only delimiter is spaces, and one of the bits of information has several words, then that

Re: Table Fields "and all"

2017-06-29 Thread Bob Sneidar via use-livecode
The data grid was created *precicely* because of this very thing. I for one was constantly begging for a table object of some sort, imagining that it would work like an Excel Spreadsheet, but as many pointed out, there would be problems when the data put into a table object was too much for

Re: synonyms

2017-06-29 Thread Mike Kerner via use-livecode
Alex, I don't understand. I pass arrays as parameters all the time, and I use the pass by reference "@", too. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription

Re: Array assignment / initialization [was Re: synonyms]

2017-06-29 Thread Alex Tweedly via use-livecode
On 28/06/2017 23:32, Alex Tweedly via use-livecode wrote: Yes, it would be nice if we had an easier (terser) way to assign to an array. Maybe something like Python / Perl use to assign to a dictionary. put { "name": "my chart", "width": 100, "label": "This is a chart", "anarray": sAMine }

Re: synonyms

2017-06-29 Thread Mike Kerner via use-livecode
ick. On Wed, Jun 28, 2017 at 10:14 AM, Mike Bonner via use-livecode < use-livecode@lists.runrev.com> wrote: > Even easier would be to just pass a single string like so.. > > myhandler "type=blue,name=fred,something=234" > > And use split > > split pVar by comma and "=" > > ending up with an

Disallowing overscroll/bounce in the browser widget on iOS

2017-06-29 Thread Jonathan Lynch via use-livecode
Has anyone managed to block that annoying bounce effect? It looks terrible in an app. I tried all sorts of CSS and JS, but no luck. I am going to explore editing the plist, since this is related to a UIWebView setting, but if anyone has already done this, it would be most helpful. Sent from

Re: Sharp as a pound (was Array assignment...)

2017-06-29 Thread james--- via use-livecode
Craig wrote: > So do we in the US, though sometimes the word "hash" has been seen to creep > about. Now you mention it I use this too. Seems we can internally hold multiple synonyms without even realizing that is what we are doing. ___ use-livecode

Re: Table Fields "and all"

2017-06-29 Thread hh via use-livecode
Hi all, closely connected to that, not this much advanced as Bernd's jewel modTableField, another 'jewel'-stack by Scott: http://forums.livecode.com/viewtopic.php?p=129767=fbca74cc652e7760ce1f837e482dc57a#p129767 H. ___ use-livecode mailing list

Re: How to get the number of lines of a fld referenced by long ID in a variable.

2017-06-29 Thread hh via use-livecode
> BR wrote: > but to be able to address the properties of the object referred > to by a variable containing the long ID of an object/ > How do we do that? I think the "rule" is [assume objID is the long id of an object] get|set of objID --- works for *properties* of the object the number of

Re: Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
One of the reasons you may not be alone is because the documentation is not much good when it comes to table fields. I have my suspicions that they have been overlooked; possibly in the mad rush towards datagrids. Richmond. On 6/29/17 11:13 am, Lagi Pittas via use-livecode wrote: I had the

Re: Table Fields "and all"

2017-06-29 Thread Lagi Pittas via use-livecode
I had the same problem when I started using Tables and after I found the TAB delimiter "trick" as per Hermann, it was obvious (20/20 Hind sight). The Aha! moment came when using commas messed it up by putting them all in 1 column with the commas intact. I just assumed everybody knew and I was a

Re: Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
Clever stuff. Thanks an awful lot for what seemed like a knotty problem. Also good because this: settheitemDelimitertotab put"Biscuits" intoitem 3 ofline 7 offld "TF" put"Cheese" intoitem 5 ofline 7 offld "TF" did not delete the "biscuits". Richmond. On 6/29/17 10:54 am, hh via

Re: Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
Imagine the following scenario: A text file containing lines of text a bit like this: Mary Smith 12 Windsor Gardens Slough 45 housewife now getting those lines into a Table Field is going to involve messing around with 'quote' amongst all the "dicing and slicing". I think I'll be a "right

Re: Table Fields "and all"

2017-06-29 Thread hh via use-livecode
> Richmond wrote: > I want to put "cheese" into the third column across of the third line > down of my Table Field "TF" You could try: set the itemdelimiter to tab put "cheese" into item 3 of line 3 of fld "TF" ___ use-livecode mailing list

Table Fields "and all"

2017-06-29 Thread Richmond Mathewson via use-livecode
I want to put "cheese" into the third column across of the third line down of my Table Field "TF" put "cheese" into column 3 of line 3 of fld "TF" did not work, put "cheese" into item 3 of line 3 of fld "TF" put "cheese" into the first column preceded by two commas (default

Re: How to get the number of lines of a fld referenced by long ID in a variable.

2017-06-29 Thread hh via use-livecode
> BR wrote: > but to be able to address the properties of the object referred to by a > variable containing the long ID of an object/ > How do we do that? put the long id of fld 1 into fID put the short name of fID into sID put the number of lines of fld sID