Re: return with ?

2019-05-15 Thread Richard Gaskin via use-livecode

Monte Goulding wrote:

>>  the API reference at the official LiveCode.com site - where the
>> Dictionary seems to have fallen behind:
>>
>> https://livecode.com/resources/api/#livecode_script/return
>
> Seems worthy of a bug report ;-)

Thanks - done:

https://quality.livecode.com/show_bug.cgi?id=22068


>> > The `with` clause is something specifically for libURL which ends
>> > up setting the urlResult.
>>
>> Can it be used in other contexts, or is the engine hard-wired to put
>> the "with" value into the urlResult only?
>
> Yes it puts the `with` value into the urlResult. It is deliberately
> not documented so up for change if necessary so I wouldn’t recommend
> using it.

Seems reasonable. Thanks.

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: return with ?

2019-05-15 Thread Monte Goulding via use-livecode

> 
>  the API reference at the official LiveCode.com  site - 
> where the Dictionary seems to have fallen behind:
> 
> https://livecode.com/resources/api/#livecode_script/return 
> 

Seems worthy of a bug report ;-)
> 
> 
> > The `with` clause is something specifically for libURL which ends up
> > setting the urlResult.
> 
> Can it be used in other contexts, or is the engine hard-wired to put the 
> "with" value into the urlResult only?


Yes it puts the `with` value into the urlResult. It is deliberately not 
documented so up for change if necessary so I wouldn’t recommend using it.

Cheers

Monte

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: play sounds in HTML5

2019-05-15 Thread Pi Digital via use-livecode
Hi again Alain

What you are talking about I think is known as a form of Dynamic HTML. 
Basically you use LiveCode to build your list of audio files (put the files 
into tFileList) and choose one (random or picked by the user via a 
mobilePick...) then replace out the source file pointer ( On 15 May 2019, at 21:44, Alain Vezina via use-livecode 
>  wrote:
> 
> Thanks Sean,
> 
> You did not misunderstand my request.
> 
> You make me go one step forward : now I can call a sound to be played from a 
> folder where there are several other sound.
> 
> Now, how can I played a sound chosen by random your chosen by the user; in 
> other words, how can I replace "piano-melody.wav" by the name of the chosen 
> sound, never knowing wich sound will be chosen by the user or by a random 
> procedure ? How my program can write in an HTML file, considering there is a 
> list of all the soud files including the extention .WAV or .MP3 or another 
> one?
> 
> Regards
> 
> Alain
> 
> 
>> Le 14 mai 2019 à 17:02, Pi Digital via use-livecode 
>>  a écrit :
>> 
>> Hi Alain
>> 
>> The key here is in the line
>> 
>> 
>> 
>> Instead of just piano-melody.wav you would put in the whole path or relative 
>> path to the file. Example, if your file structure has a folder called ‘html’ 
>> containing your html file and then another folder called ‘audio’ which 
>> contains all your audio files including one called piano-melody.wav then the 
>> code would read
>> 
>> 
>> 
>> This points to the file in a relative path to the html file itself. 
>> 
>> Does this help or have I misunderstood your request?
>> 
>> Regards
>> 
>> Sean Cole
>> Pi Digital Prod Ltd
>> 
>>> On 14 May 2019, at 20:52, Alain Vezina via use-livecode 
>>>  wrote:
>>> 
>>> Hi all,
>>> 
>>> Is there somebody who knows how to play one sound after another using the 
>>> path of each sound.
>>> 
>>> I read the lesson [ How do I play sound files in HTML5? ] where I have to 
>>> type the name the sound in the HTML file and to put the sound file into the 
>>> standalone folder.
>>> 
>>> You know, I want to use one of my sounds libraries as I did into a 
>>> standalone for Mac, PC , IOS or Android : you specify once the path of the 
>>> library and the name of the sound you want to be played. The sounds library 
>>> is not in the app and every sound has his proper name. So I can play a 
>>> sound chosen by random  or chosen by the user.
>>> 
>>> Alain Vezina
>>> Logilangue
>>> www.logilangue.com
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: return with ?

2019-05-15 Thread Richard Gaskin via use-livecode

Monte Goulding wrote:

>> On 16 May 2019, at 6:22 am, Richard Gaskin wrote:
>>
>> Line 264 of libURL contains:
>>
>>return empty  with urlResult laLoadedUrls[newUrl]
>>
>> What is that "with" clause?
>>
>> I was familiar with the "for" clause", but when I went to check this
>> in the Dictionary I found neither clause is mentioned. :(
>
> The `for` clause is definitely in the dictionary and has been since it
> was added here https://github.com/livecode/livecode/pull/4164
> 

One of the benefits of being a Linux user choosing LiveCode is it 
teaches self-reliance. :)


Work on Linux issues has slowed without Peter Brett and Fraser Gordon, 
and the Browser widget the Dictionary has become dependent on hasn't 
worked on that platform for a long time (years?).


So we penguin fans roll up our sleeves and bookmark the API reference at 
the official LiveCode.com site - where the Dictionary seems to have 
fallen behind:


https://livecode.com/resources/api/#livecode_script/return


> The `with` clause is something specifically for libURL which ends up
> setting the urlResult.

Can it be used in other contexts, or is the engine hard-wired to put the 
"with" value into the urlResult only?


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return with ?

2019-05-15 Thread Monte Goulding via use-livecode



> On 16 May 2019, at 6:22 am, Richard Gaskin via use-livecode 
>  wrote:
> 
> Line 264 of libURL contains:
> 
>return empty  with urlResult laLoadedUrls[newUrl]
> 
> What is that "with" clause?
> 
> I was familiar with the "for" clause", but when I went to check this in the 
> Dictionary I found neither clause is mentioned. :(

The `for` clause is definitely in the dictionary and has been since it was 
added here https://github.com/livecode/livecode/pull/4164 


The `with` clause is something specifically for libURL which ends up setting 
the urlResult.

Cheers

Monte

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: return with ?

2019-05-15 Thread Alex Tweedly via use-livecode
H - my dictionary (9.0.4 rc2 for Mac COmmunity) does have a 
description of the "for" variant.


And I've now read it 10 times, and I'm not sure I'm much better informed 
:-)  It's a pretty tough read.


I see that  "urlresult" is a reserved / key word, not in the dictionary.

So I think the correct question is

  what is the    "with urlresult"  clause ?

But I have no idea what the answer is :-)

Alex.


On 15/05/2019 21:22, Richard Gaskin via use-livecode wrote:

Line 264 of libURL contains:

    return empty  with urlResult laLoadedUrls[newUrl]

What is that "with" clause?

I was familiar with the "for" clause", but when I went to check this 
in the Dictionary I found neither clause is mentioned. :(




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: play sounds in HTML5

2019-05-15 Thread Alain Vezina via use-livecode
Thanks Sean,

You did not misunderstand my request.

You make me go one step forward : now I can call a sound to be played from a 
folder where there are several other sound.

Now, how can I played a sound chosen by random your chosen by the user; in 
other words, how can I replace "piano-melody.wav" by the name of the chosen 
sound, never knowing wich sound will be chosen by the user or by a random 
procedure ? How my program can write in an HTML file, considering there is a 
list of all the soud files including the extention .WAV or .MP3 or another one?

Regards

Alain


> Le 14 mai 2019 à 17:02, Pi Digital via use-livecode 
>  a écrit :
> 
> Hi Alain
> 
> The key here is in the line
> 
> 
> 
> Instead of just piano-melody.wav you would put in the whole path or relative 
> path to the file. Example, if your file structure has a folder called ‘html’ 
> containing your html file and then another folder called ‘audio’ which 
> contains all your audio files including one called piano-melody.wav then the 
> code would read
> 
> 
> 
> This points to the file in a relative path to the html file itself. 
> 
> Does this help or have I misunderstood your request?
> 
> Regards
> 
> Sean Cole
> Pi Digital Prod Ltd
> 
>> On 14 May 2019, at 20:52, Alain Vezina via use-livecode 
>>  wrote:
>> 
>> Hi all,
>> 
>> Is there somebody who knows how to play one sound after another using the 
>> path of each sound.
>> 
>> I read the lesson [ How do I play sound files in HTML5? ] where I have to 
>> type the name the sound in the HTML file and to put the sound file into the 
>> standalone folder.
>> 
>> You know, I want to use one of my sounds libraries as I did into a 
>> standalone for Mac, PC , IOS or Android : you specify once the path of the 
>> library and the name of the sound you want to be played. The sounds library 
>> is not in the app and every sound has his proper name. So I can play a sound 
>> chosen by random  or chosen by the user.
>> 
>> Alain Vezina
>> Logilangue
>> www.logilangue.com
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

return with ?

2019-05-15 Thread Richard Gaskin via use-livecode

Line 264 of libURL contains:

return empty  with urlResult laLoadedUrls[newUrl]

What is that "with" clause?

I was familiar with the "for" clause", but when I went to check this in 
the Dictionary I found neither clause is mentioned. :(


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: array and revExecuteSQL

2019-05-15 Thread Bob Sneidar via use-livecode
I believe you need to surround the placeholder with single quotes. 

>> put "UPDATE `t_test` SET `Text` = ':11' WHERE `Nummer` = ':22';" into StrSQL

Also you can lose the semicolon as LC will only execute one statement at a 
time. You cannot string statements. 

Bob S


> On May 15, 2019, at 06:46 , axwald via use-livecode 
>  wrote:
> 
> Hi,
> the notation for revExecuteSQL you mention only works with 1-digit numbers
> (in my LC 6.7.10).
> Named arrays and 2- or more digit entries don't work - LC doesn't translate
> 'em. You can easily check this with your favorite network sniffer:
> 
>> put "bText" into myArr[11]
>> put "99" into myArr[22]
>> put "UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22;" into StrSQL
> sends this to the database:
>> UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22;
> and this fails, for sure.
> 
> Correctly used:
>> put "bText" into myArr[1]
>> put "99" into myArr[2]
>> put "UPDATE `t_test` SET `Text` = :1 WHERE `Nummer` = :2;" into StrSQL
> sends this to the database:
>> UPDATE `t_test` SET `Text` = "bText" WHERE `Nummer` = "99";
> 
> So the error is in LC, dunno if the newer versions do better. Or the
> limitation just isn't mentioned in the dictionary.
> And since LC obviously just does a simple & limited replace, you could use
> merge() as well.
> 
> Have fun!
> 
> 
> 
> -
> • Livecode programming until the cat hits the fan •
> --
> Sent from: 
> http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: array and revExecuteSQL

2019-05-15 Thread axwald via use-livecode
Hi,
the notation for revExecuteSQL you mention only works with 1-digit numbers
(in my LC 6.7.10).
Named arrays and 2- or more digit entries don't work - LC doesn't translate
'em. You can easily check this with your favorite network sniffer:

> put "bText" into myArr[11]
> put "99" into myArr[22]
> put "UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22;" into StrSQL
sends this to the database:
> UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22;
and this fails, for sure.

Correctly used:
> put "bText" into myArr[1]
> put "99" into myArr[2]
> put "UPDATE `t_test` SET `Text` = :1 WHERE `Nummer` = :2;" into StrSQL
sends this to the database:
> UPDATE `t_test` SET `Text` = "bText" WHERE `Nummer` = "99";

So the error is in LC, dunno if the newer versions do better. Or the
limitation just isn't mentioned in the dictionary.
And since LC obviously just does a simple & limited replace, you could use
merge() as well.

Have fun!



-
• Livecode programming until the cat hits the fan •
--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

file id/hash

2019-05-15 Thread Mike Kerner via use-livecode
I thought I read something about being able to grab and search on the
hash/id of a file.  That would certainly be useful for those times where
you move a file somewhere and then forget where you put it, and you can't
remember the name.

-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode