Re: [semi OT] mySQL question

2023-05-11 Thread Ken Ray via use-livecode
I would recommend a table for People, a table for Companies, and a table for 
Employment that acts as a linking table between the first two. Something like 
(at its simplest):

people

id  INT(11)
first_name  VARCHAR(255)
last_name   VARCHAR(255)


companies
===
id  INT(11)
nameVARCHAR(255)


employment

id  INT(11)
person_id   INT(11) 
company_id  INT(11)
job_descrip VARCHAR(255)


To get a list of everyone that worked at a particular company, you'd do:

SELECT * FROM people
INNER JOIN employment ON (people.id = employment.person_id)
INNER JOIN companies ON (employment.company_id = companies.id)
WHERE companies.name="XYZ, Inc."

To get a list of all companies where a person has worked, you'd do:

SELECT * FROM companies
INNER JOIN employment ON (companies.id = employment.company_id)
INNER JOIN people ON (employment.person_id = people.id)
WHERE people.first_name="John" AND people.last_name="Smith"

Make sure to index the 'id' and '_id' columns, and you can use the 
employment.job_descrip to hold info on the particular job an individual had at 
a specific company.

This is all off the top of my head, so it may need a little massaging, but you 
get the idea.


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com


> On May 11, 2023, at 9:55 AM, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> 
> This is a question for mySQL experts, which I am not.
> 
> I have a table of individuals.
> I have another table of companies.
> 
> Many individuals have worked in more than 1 company with
> different jobs descriptions.
> 
> I need to build my DB so that, with single requests, I
> can get a list of either :
> - all individuals who worked in a specific company with
> the job description of each one
> - all companies in which a specific individual has worked,
> along with the job description he had in each company.
> 
> The main problem is that the tables might become huge with
> the time (several Gb), so searching the tables might take
> forever if not carefully built.
> 
> I guess I will need to use a third table for the job descriptions
> and a combination of fulltext indexes and foreign keys
> might do the trick, but my limited skills don't allow me
> to find the best solution...
> 
> Any help will be much appreciated.
> Thank you in advance.
> 
> jbv
> 
> ___
> 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: ChatGPT

2022-12-20 Thread Ken Ray via use-livecode
I just tried it and got this instead:

-
ME: Write a calendar app in livecode

CHATGPT:

To create a calendar app in LiveCode, you will need to use the LiveCode 
programming language and the LiveCode development environment. Here is a 
step-by-step guide to help you get started:

1. Open LiveCode and create a new stack.
2. Design the layout of your calendar app. You can use LiveCode's 
built-in layout tools to create a grid of squares representing the days of the 
month, as well as buttons for navigating between months and years.
3. Use LiveCode's control structures and looping statements to create 
the logic for displaying the current month and year, and for navigating between 
months and years.
4. Add functionality to highlight the current day and to display events 
for each day. You can use LiveCode's data structures, such as lists and arrays, 
to store the events for each day.
5. Use LiveCode's built-in date and time functions to help with the 
calendar calculations, such as determining the number of days in a given month 
and the day of the week for a given date.
6. Test your calendar app thoroughly to ensure that it is working as 
expected.
7. Customize the appearance of your calendar app using LiveCode's 
graphics and styling features.

I hope this helps! Let me know if you have any questions or need further 
guidance.
-

Amazing!

Ken


> On Dec 9, 2022, at 3:54 PM, Jim Lambert via use-livecode 
>  wrote:
> 
> Even more interesting I issued the same chat request a few hours later and 
> got an entirely different coding approach. 
> It even helpfully put the code into formatted, copy-able blocks. (formatting 
> not shown here.)
> 
> ME: Write a calendar app in livecode
> 
> CHATGPT:
> Here is an example of how you could implement a simple calendar app in 
> LiveCode:
> 
> Copy code
> -- Set the default date to the current date put the short date into 
> currentDate 
> 
> -- Create the calendar UI 
> create calendar 
> set the date of calendar to currentDate 
> set the rect of calendar to the rect of this card  
> 
> -- Function to handle date changes in the calendar 
> on dateChanged pNewDate 
> put pNewDate into currentDate 
> end dateChanged
> 
> This script creates a calendar widget and sets its default date to the 
> current date. It also defines a dateChanged handler that is called whenever 
> the selected date in the calendar changes. In this handler, the currentDate 
> variable is updated with the new selected date.
> 
> You can then add other UI elements and functions to your app to allow the 
> user to view and manage events for the selected date. For example, you could 
> add a list widget to display the events for the current date, and buttons to 
> add and remove events.
> 
> Here is an example of how you could add a list widget to display the events 
> for the current date:
> 
> Copy code
> -- Create a list widget to display the events for the current date 
> create field "eventsList" 
> set the rect of "eventsList" to 100,100,200,200 
> set the text of "eventsList" to "No events for this date" 
> 
> -- Function to update the events list 
> on updateEventsList 
> -- Clear the events list 
> put empty into field "eventsList" 
> 
> -- Retrieve the events for the current date from a database or file 
> put the events for currentDate from database or file into events 
> 
> -- Add the events to the list 
> repeat for each event in events 
> put event & cr after field "eventsList"
> end repeat 
> end updateEventsList
> 
> This script creates a list widget called eventsList, and defines an 
> updateEventsList function that retrieves the events for the current date from 
> a database or file and adds them to the list.
> 
> You can then call the updateEventsList function whenever the date in the 
> calendar changes, so that the list of events is updated to show the events 
> for the new selected date. You can do this by adding the following code to 
> the dateChanged handler:
> 
> Copy code
> on dateChanged pNewDate 
> put pNewDate into currentDate 
> updateEventsList 
> end dateChanged
> 
> You can also add buttons to allow the user to add and remove events. For 
> example, you could add the following code to create "Add" and "Remove" 
> buttons and define the corresponding event handlers:
> 
> Copy code
> -- Create "Add" and "Remove" buttons
> 
> But, of course, this code doesn't actually work. But it could be re-written 
> to work.
> 
> JimL
> ___
> 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

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this 

Re: Speed up a slow loop

2022-03-03 Thread Ken Ray via use-livecode
BTW you an also use this "split" trick to remove dupes (although you lose the 
order of the word list):

function stripDupes pWordList
  split pWordList by cr and tab
  return (the keys of pWordList)
end stripDupes

on mouseUp
   put stripDupes("test" & cr & "ball" & cr & "test" & cr & "orange")
end mouseUp

Result:
ball
orange
test

Not sure if it's faster, but it may work in your situation,

Ken


> On Mar 3, 2022, at 2:28 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 3/3/22 12:53 AM, Mark Waddingham via use-livecode wrote:
>> If the difference between `the milliseconds` before the loop, and then after 
>> is 0 or 1 millisecond - then that is how long it is taking. This means the 
>> issue is somewhere else. Are you sure there isn't anything you are doing 
>> either before that loop or after that loop which doesn't wait for ages (due 
>> to the ANRs you mentioned).
> 
> Today I'm getting slightly faster results. Repeatedly creating new boards is 
> not slowing down. Maybe some background processes were stopped (there was a 
> system update last night.)
> 
> The scoring handler does three things with the user word list, calling out to 
> 3 different handlers:
>  1. Remove any duplicates
>  2. Check the dicionary for the remaining words
>  3. Walk the board for each word to ensure it's a legal path
> 
> I just ran tests with LC 9.6.6 on a Pixel 5 that timed each callout 
> independently. Times are in milliseconds. No words were longer than 4 letters.
> 
> Dupes Dictionary Boardwalk word counts
> 12   1954   1404   -- 5 wds + 2 dupes, 2 illegals (total 9)
> 1   1934   2542   -- 9 wds, all legal
> 0   1960   1966   -- 7 wds + 2 illegals (total 9)
> 0   1921   1142   -- 4 wds, all legal
> 17   2015   8321   -- 30 wds + 1 dupe, 1 illegal (total 32)
> 
> My recursive board walk could probably be optimized but for now I'm just 
> focusing on the dictionary lookup. For reference, here is the whole handler:
> 
> function checkDictionary pList -- plist is the user words
>  repeat for each line l in pList
>if sDictFile[l] = true then put l & cr after tCheckedList
>else put l & cr after tNonWords
>wait 0 with messages  -- prevent ANRs
>  end repeat
>  set wholematches to true
>  put fld "wordList" into tWList -- no longer the same as pList since 
> removeDupes has already run
>  repeat for each line l in tNonWords -- mark non-words in list
>set the textcolor of line lineoffset(l,tWList) of fld "wordList" to "red"
>  end repeat
>  if tNonWords <> "" then put tNonWords into sStats["unknowns"] -- for later 
> display
>  return tCheckedList
> end checkDictionary
> 
> I suppose the delay could be updating the field? But updating a field for 2 
> or 3 entries shouldn't take too long, should it? Also note that in the 2 runs 
> where there were no illegals, the timings didn't vary much. The checkDupes 
> handler also colorizes duplicate words, which is why those 2 runs have longer 
> times.
> 
>> If there are only 3 reasonable length words in pList (I.e. 3 lines) then 
>> there's no way that loop can take 4 seconds.
> 
> When testing I don't have patience to think, so all words are usually 3-4 
> letters each.
> 
> 
>>> Even stranger: on my cheapo Android tablet with 4 megs of RAM running
>>> Android 9 the response is nearly instantaneous, even if the user list
>>> has 200+ words. On my Pixel phone with 8 megs of RAM and Android 12
>>> the response is slow enough to trigger the ANR with only 3 words. I'm
>>> building for ARM 64.
>> This strongly suggests it is something else either on your phone, or in your 
>> code which your phone doesn't like I think.
> 
> I have two Pixels, a 5 and a 6, and they both behave the same (slow) way, 
> though the 6 has the new Tensor chip. Yesterday I was wondering if the delay 
> isn't the calculations but rather the screen redraws. I have a lot of 
> controls stacked up on the card, though many are not visible. However, I've 
> run the handlers with the screen both locked and unlocked with no changes.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: Speed up a slow loop

2022-03-03 Thread Ken Ray via use-livecode
Jacque,

How about using the 'difference' command? Here's a simple example:


on mouseUp
   put "true" into tDict["test"]
   put "true" into tDict["word"]
   put "true" into tDict["ball"]
   
   put "test" & cr & "ball" & cr & "boat" & cr & "unicorn" into tUserWords

   split tUserWords by cr and tab
   difference tUserWords with tDict
   
   if tUserWords is not an array then
  answer "All words matched!"
   else
  answer "Sorry, try again, these words didn't match:" & cr & cr & (the 
keys of tUserWords)
   end if
end mouseUp

If you run this, it will say that "boat" and "unicorn" don't match; if 
tUserWords is "test" and "ball" you get "all words matched".

Will this work?


Ken



> On Mar 3, 2022, at 2:34 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> On 3/3/22 2:00 PM, Tom Glod via use-livecode wrote:
>> But what prevents you from loading all your data into an array?  and just
>> iterating over the keys or index of an array?  vs the lines of a long list.?
>> That will yield the fastest performance.
> 
> Right, it's an array, and I don't iterate. I just check the array key 
> directly for a value.
> 
> I realize I'm kind of monopolizing things here. I wrote the game for myself 
> and I ignored the speed issues and just played it on my tablet where it works 
> fine, but now someone else wants to include it in a distributed app so I need 
> to figure it out.
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.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

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: lineOffset wildcard

2021-04-19 Thread Ken Ray via use-livecode
> On Apr 19, 2021, at 1:47 PM, Mark Wieder via use-livecode 
>  wrote:
> 
> On 4/19/21 11:04 AM, J. Landman Gay via use-livecode wrote:
> 
>> I don't think lineoffset supports wildcards, but you could do it with 
>> matchChunk.
> 
> Ah! matchChunk and the the number of lines of... etc...
> That should do it.

Another way to do it is to use 'filter' to get the text of the line that 
matches your wildcard, and then 'lineOffset' to find that line:

put tScript into tTemp
filter tTemp with ("local*" & tFunctionName & "*")
put lineOffset((cr & tTemp & cr),(cr & tScript & cr)) into tPos

Not sure if 'filter' is faster than 'matchChunk' when dealing with large 
scripts, but I have a feeling it might be...


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: We don't need a Player (was Re: New(?) Idea for Standalones)

2021-04-13 Thread Ken Ray via use-livecode


> On Apr 13, 2021, at 5:28 AM, Andre Garzia via use-livecode 
>  wrote:
> 
> I like all that I read here. There are things that are really hard when 
> building standalone apps that I don’t think should be handled by LC HQ, such 
> as “adding AppleScript dictionary” to your app. This is harder than it seems 
> and it involves plist manipulation, fancy sdef xml creation, etc. This is too 
> large a product to develop with a small target base.
> 
> On the other hand, I think that the SB should create standalones that can 
> actually be deployed, this means that it should be able to handle 
> notarisation on the mac out-of-the-box.

Amen, brother! 

:)


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: sort container parameters

2021-03-03 Thread Ken Ray via use-livecode
Craig,

It's because when you try to sort something, it's got to be a variable that's 
being sorted. So all of the examples you used put "toSort" into the statement 
to be "done" coming out compiled as:

sort items of "A,C,T,B" ascending

... which won't work. You need to execute:

do "sort items of toSort" && sortDir

which compiles to:

sort items of toSort ascending

... and that works.

:)


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com


> On Mar 3, 2021, at 12:23 PM, Craig Newman via use-livecode 
>  wrote:
> 
> I thought I was pretty clever at using “do”, often going down several levels, 
>  evaluating the whole way before trying to execute a single  “do” statement.
> 
> Neither of the last lines seem to work:
> 
> on mouseup
> 
> put "A,C,T,B" into toSort
> 
> put "ascending" into sortDir
> 
> get "sort items of" && quote & toSort & quote && sortDir
> 
> breakpoint
> 
> --do it
> 
> --do "sort" && toSort && sortDir
> 
> do "sort" && quote & toSort & quote && sortDir
> 
> end mouseup
> 
> 
> I feel there must be a way…
> 
> Craig
> 
> 
>> On Mar 2, 2021, at 7:36 PM, Alex Tweedly via use-livecode 
>>  wrote:
>> 
>> The number of lines being sorted makes o difference.
>> 
>> The number of distinct sorts will - but at a single 'do' for each of 
>> "several hundreds", you'll not even notice except (maybe) if you are 
>> benchmarking it (around 5ms per 1000 'do's on an elderly MacBook Pro).
>> 
>> Alex.
>> 
>> On 02/03/2021 22:52, Paul Dupuis via use-livecode wrote:
>>> Okay. Thank you Ralph.
>>> 
>>> I was reluctant to use "do" for performance reasons. The sort could be 
>>> sorting a large number of lines - as many as several hundred sorts of a 
>>> thousand to ten thousand lines.
>>> 
>>> I could of course do timing trials, but does anyone from the mothership (or 
>>> anyone period) know if using "do" with a container sort causes any 
>>> appreciable performance hit? All the data is in a variable (vs fields).
>>> 
>>> 
>>> On 3/2/2021 5:19 PM, Ralph DiMola via use-livecode wrote:
 I found that you must us a "Do"(thank heaven for "Do"s) if you want to 
 make variable any LC token that colorizes like "stack", "the", "field", 
 "button", "put" or "ascending".
 
 I don't think "Do" is a kludge is this case.
 
 Ralph DiMola
 IT Director
 Evergreen Information Services
 rdim...@evergreeninfo.net
 
 -Original Message-
 From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On 
 Behalf Of Paul Dupuis via use-livecode
 Sent: Tuesday, March 02, 2021 4:56 PM
 To: use-livecode@lists.runrev.com
 Cc: Paul Dupuis
 Subject: sort container parameters
 
 I just discovered much to my dismay that you can not execute the following:
 
 put "ascending" into tDirection
 soft lines of tContainer tDirection international
 
 apparently neither the sort direction (ascending|descending) nor the sort 
 type (international|text|datetime|numeric|binary) can be variable!
 
 That means if you want to parameterize a sort direction, you have to do 
 something like:
 
 if tDirection is "ascending" then
sort lines of tContainer ascending international else
sort lines of tCOntainer descending international end if
 
 I see this a a bug or perhaps a failure to fully robust impliment the sort 
 container command? Does any one else see this as a bug?
 
 I suppose I could work around it with a "do" but that seems like a cludge
 
 do ("sort line of tContainer" && tDirection && tSortType)
 
 Thoughts? Comments? Opinions? Am I expecting too much of LiveCode to have 
 sort direction and type actual parameters?
 
 
 ___
 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: "within graphic" question

2021-02-22 Thread Ken Ray via use-livecode
If you're willing to do something "hackish", you could do this:

on mouseDown
  lock screen
  show grc "mygraphic"
  put within(grc "mygraphic",the clickloc)
  hide grc "mygraphic"
  unlock screen
end mouseDown

:D

Ken


> On Feb 22, 2021, at 1:49 PM, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> 
> I have a graphic made of a list of points. This graphic is opaque
> and invisible, its filled property is set to true (according to
> the doc).
> In my card script I have something like :
> on mousedown
>  put within(grc "mygraphic", the clickloc)
> end mousedown
> 
> but it always returns false, even when I click
> inside the clickable area of the graphic...
> What am I missing ?
> 
> Thanks in advance.
> jbv
> 
> ___
> 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: How to find the offset of the first character in a string that's not a tab?

2021-01-22 Thread Ken Ray via use-livecode


> On Jan 21, 2021, at 8:36 AM, Keith Clarke via use-livecode 
>  wrote:
> 
> Thanks Brian. I looked at matchChunk in the dictionary & it seems to return a 
> boolean, rather than the offset. 

The boolean is just whether or not the matchChunk operation was successful; you 
need to provide variables for the start and end character offsets in the 
function call:

if matchChunk(myString,"([^\t])",tStart,tEnd) then
  put "The offset to the first non-tab character is:" && tStart
else
  -- matchChunk had an error because the regex was bad or something
end if

I know you've moved on, but just for the record...

:D


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com


> 
> Thanks all - I’ve stopped trying to find the syntax for ‘find any char but 
> this’ in offset and instead, taken Dick’s advice to iterate through the chars 
> and count the loops until char <> tab. :)
> Best,
> Keith 
> 
>> On 21 Jan 2021, at 14:03, Brian Milby via use-livecode 
>>  wrote:
>> 
>> You could also use matchChunk with a regular expression that excludes the 
>> tab character.
>> 
>> Sent from my iPhone
>> 
>>> On Jan 21, 2021, at 7:14 AM, Keith Clarke via use-livecode 
>>>  wrote:
>>> 
>>> Ah yes indeed, I’d forgotten I could test with 'put not(tab)’ in the 
>>> message box - that certainly proves the syntax was wrong! :-)
>>> Best,
>>> Keith
>>> 
> On 21 Jan 2021, at 10:49, Dick Kriesel via use-livecode 
>  wrote:
> 
> 
> 
>> On Jan 21, 2021, at 2:34 AM, Keith Clarke via use-livecode 
>>  wrote:
> 
> I was just keen to understand why offset wasn’t happy with the ‘not(tab)’ 
> in this instance.
 
 expression "not(tab)" evaluates to true, which doesn’t serve your purpose
 
 — Dick
 
 
 ___
 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






___
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 "error" code from standalone compile

2020-12-11 Thread Ken Ray via use-livecode
Wow... I've been using Livecode since its inception (and Revolution before 
that, and even MetaCard before *that*!), and I never knew this existed!

Just goes to show that there's always something new to learn about our favorite 
development tool. 

(I wonder if anyone's put together a "list of things Livecode can do that you 
probably didn't know about" ?)

:D


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.com


> On Dec 10, 2020, at 11:51 AM, Douglas A. Ruisaard via use-livecode 
>  wrote:
> 
> I use AUTOHOTKEY... as a fast, dirty way to "get stuff done" when I'm either 
> too lazy or too rushed to do a "quality" job with Livecode.  It has a command 
> called "Run" & "Runwait" ... which returns the calling program's (Livecode 
> executable, in this case) return code into a predefined variable called 
> "ErrorLevel" (how original!).  So a line in a AUTOHOTKEY script for this 
> would look like:
> 
>   cmd = c:\livecode\SomeLiveCode.exe
>   RunWait, %cmd%,,UseErrorLevel
>   exitcode := ErrorLevel
>   if (exitcode > 1)
> 
> Autohotkey takes some getting used to but I think it's a handy addition to 
> development projects.. since AHK scripts can be compiled into executables, 
> themselves.
> 
> My 4.5 cents
> 
> Douglas Ruisaard
> 
>Trilogy Software
>  (250) 573-3935
> 
> 
> -Original Message-
> From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf 
> Of John Balgenorth via use-livecode
> Sent: Thursday, December 10, 2020 4:03 AM
> To: How to use LiveCode
> Cc: John Balgenorth
> Subject: Re: return "error" code from standalone compile
> 
> Since Livecode is written in C++ here is some
> info about using return  in  C.
> 
> Every C program has a function named main.   At the
> end of the function the programmer usually writes a
> return 0;
> 
> That tells  the c  program the code has  completed
> and is exiting with  a  0 value which confirms it  has
> successfully executed the code and is quitting.
> 
> At any point above that line the programmer can  write
> a return call  but they will usually use a 1  on another
> value.  The program will exit the code at that point  and
> it does not matter what value is entered after the  return
> but 1 usually means the code failed and any other value
> but 0 means anything you want it to mean.
> 
> JB
> 
> 
>> On Dec 9, 2020, at 8:52 PM, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> I don't know much about this but it looks interesting. Is there a list of 
>> exit codes somewhere? When the OS receives the exit code, what happens? 
>> I.e., how would I use it?
>> --
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software | http://www.hyperactivesw.com
>>> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode 
>>>  wrote:
>>> 
 On 12/9/20 5:32 PM, Douglas A. Ruisaard via use-livecode wrote:
 On the completion of a stack, can the compiled executable return an error
 code like the old DOS ErrorLevel value(s)?  If so, how do you specify the
 error code?  in the on closeStack call?
>>> 
>>> See the quit command in the dictionary.
>>> 
>>> quit 42
>>> 
>>> --
>>> Mark Wieder
>>> ahsoftw...@gmail.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





___
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: Naive XML questions

2020-10-25 Thread Ken Ray via use-livecode
Graham, here's the basic approach (assuming your XML is in the variable 'tXML'):

put revXMLCreateTree(tXML,false,true,false) into tTreeID
put  "/gpx/trk/trkseg/trkpt[1]" into tNode  -- the brackets identify 
the instance of "trkpt" to work with
put revXMLAttribute(tTreeID, tNode,"lon") into tLonValue
put revXMLNodeContents(tTreeID,(tNode & "/ele")) into tEleValue
put tLonValue && "/" && tEleValue

>> 2.128369 / 169.623637

So to work with the third instance of "trkpt", you'd do:

put  "/gpx/trk/trkseg/trkpt[3]" into tNode

Hope this helps,

Ken


> On Oct 25, 2020, at 12:21 PM, Graham Samuel via use-livecode 
>  wrote:
> 
> I feel stupid, but even with Sarah Reichelt’s help, there are very very 
> simple things I can’t do with the LC XML functions. My current problem is 
> this:
> 
> I have a series of XML files which are in fact .gpx files - a collection of 
> GPS coordinates representing a route on the Earth’s surface. There are 
> thousands of files around which I can use as test data, so I don’t have to 
> roll my own. Taking just one of these examples, I can do the following in LC
> 
> 1. Get the user to find the file and download it
> 
> 2. Check it’s a .gpx file
> 
> 3. Turn it into an LC XML data structure with an integer ID
> 
> 4. Find out how many child nodes there are.
> 
> Then it all goes wrong, because I don’t seem to be able to address the 
> individual nodes. This is obviously needed for further progress, in functions 
> like revXMLFirstChild  and revXMLNodeContents.
> 
> I just don’t know what format to use. Sarah’s tutorial doesn’t help because 
> her data structure is too simplified.
> 
> If you’re still with me, this is what the beginning of a typical file looks 
> like:
> 
>> 
>> http://www.topografix.com/GPX/1/1; creator="Digital Crow" 
>> version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
>> xsi:schemaLocation="http://www.topografix.com/GPX/1/1 
>> http://www.topografix.com/GPX/1/1/gpx.xsd;>
>> 
>> 
>>   
> 
>> 
>> 169.623637 
> 
>> 
>> 169.744722 
> 
>> 
>> 169.744722 
> 
>> 
>> 169.266626 
>> 
> etc - there may sometimes be thousands of these “trkpt” elements.
> 
> So, suppose I want to get the first instance of the “lon” attribute into a 
> local variable. How do I address the first  node etc in order to do it? 
> I have attempted various common-sense methods, but none work.
> 
> This must be child’s play to a lot of people, just not me.
> 
> Hoping for some guidance.
> 
> Graham
> ___
> 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

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Website: https://www.sonsothunder.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: macOS, is my app active?

2019-11-23 Thread Ken Ray via use-livecode
Klaus,

I have a function that generally works with this AppleScript:

function stsGetFrontmostProcess
  put "tell app `System Events`" & cr & \
  "get (the name of every application process whose frontmost is true) 
as string" & cr & \
  "end tell" into tScript
  replace "`" with quote in tScript
  do tScript as AppleScript
  put the result into tResult
  replace quote with "" in tResult
  return tResult
end stsGetFrontmostProcess

Give that a try and see if it works for you.

Ken

> On Nov 23, 2019, at 6:24 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi friends,
> 
> can we check if our standalone is currently active, means in
> the "foreground" or if it is not active? Know what I mean?
> If yes, how can we do that? LC? AppleScript?
> 
> I want to alert the user if the app is active, but not if the app 
> is not active.
> 
> Thanks in advance!
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> kl...@major-k.de
> 
> 
> ___
> 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: Script Editor Performance

2019-01-28 Thread Ray via use-livecode

Thanks Curry - I'm using Windows 10.  I'll try some of these things
you've suggested and get back.

On 1/28/2019 4:54 PM, Curry Kenworthy via use-livecode wrote:


Ray:

> For some time now I've noticed a substantial slowdown in
> the script editor every time I upgrade to 8.X or 9.X.

If you're lucky, making adjustments (disabling real time protection
mode or whitelisting LC and its filetypes) to your Anti Virus (such as
Windows Defender) may alleviate the symptoms of this problem. That
works in most but not all cases. Also turn off most of the "auto"
features such as coloring and autocomplete and real-time compile in
the script editor. See this bug:

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

And if applicable, add your own CC and note!

Notice the bug title is misleading, because (as I found out after
filing the report) Macs sometimes have the same symptoms. Which
platform are you using?

If you're not lucky and tweaking (or changing) AV doesn't do the
trick, or if you're on Mac, please consider attempting a reliable
recipe, because that has proved elusive. At the moment I'm no longer
able to flip a setting on my computer to cause the Anti Virus obvious
exaggeration of the symptoms on Windows, but eventually when I have
some time I may attempt a recipe for Mac.

> Which version of LC are you using?

I'm one of the lucky ones with greatly reduced symptoms after changing
my AV, so using LC 902 an 901 on Win 10 and Mac, also LC 6.7 on Win 10
and Mac for some work.

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.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

Script Editor Performance

2019-01-28 Thread Ray via use-livecode

For some time now I've noticed a substantial slowdown in the script
editor every time I upgrade to 8.X or 9.X.  I've usually end up going
back to my favorite version, 7.1.4, with its high performance script
editor.  Which version of LC are you using?

___
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: Android, acceleratedRendering and visual effect

2018-07-21 Thread Ray via use-livecode
Are you having this problem only on other users' Macs?  If so then 
you've run into the same Apple induced problem I posted about a month 
ago.  It only happens when you distribute to others using MacOS 10.12 or 
higher.



On 7/21/2018 2:29 PM, Dan Friedman via use-livecode wrote:

So, I tried to revert back to 9.0.0 because my client is pretty pissed that 
we’ve missed our deadline.  Unfortunately, when I save as standalone in 9.0.0, 
and try to install it on a device, the device reports that “the package appears 
to be corrupt”.  I tried changing the build number (as Jacque suggested in a 
related thread (https://forums.livecode.com/viewtopic.php?t=29624)), but that 
did not solve the problem.   Is there something I need to do to the stack to 
revert back to 9.0.0 from 9.0.1?

FYI, I did all the obvious things like reset the standalone settings, uninstall 
the old app on the phone, etc.

At this point, I would be grateful for ANY advice.

-Dan
  


On 7/20/18, 6:27 AM, "use-livecode on behalf of Dan Friedman via use-livecode" 
 wrote:

 Monte,
 
 Thanks!   I have a client waiting… should I revert back to 9.0.0?  Or is there a 9.0.1 rc2 coming SOON?
 
 -Dan
 
 
 On 7/19/18, 5:17 PM, "use-livecode on behalf of Monte Goulding via use-livecode"  wrote:
 
 Hi Dan
 
 A little update.
 
 The bug report is here:

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

 
 The PR for the fix is here:

 https://github.com/livecode/livecode/pull/6610 

 
 Cheers
 
 Monte
 
 > On 20 Jul 2018, at 9:54 am, Monte Goulding via use-livecode  wrote:

 >
 > Hi Dan
 >
 > This looks like a regression from the large number of 
acceleratedRendering related patches that went into 9.0.1 rc 1. I am looking into 
it as it will be a blocker for 9.0.1-rc-2.
 >
 > Cheers
 >
 > Monte
 >
 >> On 20 Jul 2018, at 4:13 am, Dan Friedman via use-livecode 
 wrote:
 >>
 >> Hello!
 >>
 >> Using LC 9.0.1 (rc1), on android only, if I have 
acceleratedRendering on, the effect is not applied when doing this:
 >>
 >> lock screen for visual effect
 >> //do something
 >> unlock screen with visual effect wipe left //any effect fails
 >>
 >> However, if acceleratedRendering is off, the visual effect is 
applied.
 >>
 >> Any thoughts?
 >>
 >>
 >> -Dan
 >>
 >> ___
 >> 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

___
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: Signing MacOS Standalones

2018-05-26 Thread Ray via use-livecode
Thanks Paul - yes, I've got an active Apple Developer account and I've 
downloaded a code signing certificate for both MacOS and the iOS 
systems.  After dragging my app to AppWrapper and immediately wrapping 
it AppWrapper displays "Unable to Code Sign the application - please 
select a valid code signing identity".  It then wraps it anyway but 
leaves me with a "potential issue" that "CfBundle Get Info String is 
depricated".  In any event the app wasn't code signed.  When I try to 
use the Code Signature pull down to make a selection (changing it from 
'no signature') I see 2 choices, each one available for App Store or Web 
Deployment.  But they all display "Both Cert Missing".  That's where I'm 
stuck.


So yes, I have reached out to the guys at Ohanaware Software. I'll see 
if they can clear this up for me.


Thanks,

Ray


On 5/25/2018 5:24 PM, Paul Dupuis via use-livecode wrote:

I am not sure - the "no identity" seems like you may have not added your
code signing certificate to AppWrapper.

To verify, you have an Apple Developer account. From the Developer
account, you have downloaded a code signing certificate for signing OSX
desktop apps (Apple issues different certificates for signing desktop
app and iOS apps). I'm sorry, but I do not remember the specifc steps to
add your certificate to AppWrapper, but in the past, Ohanaware email
support has been really good. Have you contacted them?


On 5/25/2018 8:40 AM, Ray via use-livecode wrote:

Paul thanks again for your suggestion here.  I finally got some time
and a Mac to try this but I ran into problems.  I get a "no identity
found" error from AppWrapper with no support as to how to find 'my
identity'.  I did find some information on Stack Overflow at:

https://stackoverflow.com/questions/16036571/codesign-gives-always-no-identity-found-error-via-terminal


but it's pretty cryptic and ultimately impossible to follow.  In my
opinion this whole thing seems like one big extortion scheme on the
part of Apple Computers.  To the best of my knowledge Microsoft does
not impose anything like this on Windows developers.  Exasperating
matters, Apple routinely changes things up thus making it difficult
for an organization such as Livecode to provide an accurate
procedure.  Nonetheless, if we can no longer save a standalone for
MacOS we taken a major step backward, have we not?

Please let me know what your thoughts are on this.

Thanks!

Ray Horsley


On 5/19/2018 5:54 PM, Ray via use-livecode wrote:

Many thanks Paul - I'll give this a try and post how it works out.


On 5/19/2018 1:47 PM, Paul Dupuis via use-livecode wrote:

You will still have to join Apple Developer to purchase a certificate,
but then use AppWrapper (http://www.ohanaware.com/appwrapper/)

On 5/19/2018 5:19 AM, Ray via use-livecode wrote:

Does anybody have steps to sign Mac OS standalones?  I've discovered
Apple 10.12 or higher now sabotages unsigned standalones and it's a
rather cryptic process to join the Apple dev club, create a
certificate, and then sign an LC standalone, evidently using Terminal.

Thanks in advance!

Ray Horsley

___
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



___
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: Signing MacOS Standalones

2018-05-25 Thread Ray via use-livecode
Paul thanks again for your suggestion here.  I finally got some time and 
a Mac to try this but I ran into problems.  I get a "no identity found" 
error from AppWrapper with no support as to how to find 'my identity'.  
I did find some information on Stack Overflow at:


https://stackoverflow.com/questions/16036571/codesign-gives-always-no-identity-found-error-via-terminal

but it's pretty cryptic and ultimately impossible to follow.  In my 
opinion this whole thing seems like one big extortion scheme on the part 
of Apple Computers.  To the best of my knowledge Microsoft does not 
impose anything like this on Windows developers.  Exasperating matters, 
Apple routinely changes things up thus making it difficult for an 
organization such as Livecode to provide an accurate procedure.  
Nonetheless, if we can no longer save a standalone for MacOS we taken a 
major step backward, have we not?


Please let me know what your thoughts are on this.

Thanks!

Ray Horsley


On 5/19/2018 5:54 PM, Ray via use-livecode wrote:

Many thanks Paul - I'll give this a try and post how it works out.


On 5/19/2018 1:47 PM, Paul Dupuis via use-livecode wrote:

You will still have to join Apple Developer to purchase a certificate,
but then use AppWrapper (http://www.ohanaware.com/appwrapper/)

On 5/19/2018 5:19 AM, Ray via use-livecode wrote:

Does anybody have steps to sign Mac OS standalones?  I've discovered
Apple 10.12 or higher now sabotages unsigned standalones and it's a
rather cryptic process to join the Apple dev club, create a
certificate, and then sign an LC standalone, evidently using Terminal.

Thanks in advance!

Ray Horsley

___
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: Signing MacOS Standalones

2018-05-19 Thread Ray via use-livecode

Many thanks Paul - I'll give this a try and post how it works out.


On 5/19/2018 1:47 PM, Paul Dupuis via use-livecode wrote:

You will still have to join Apple Developer to purchase a certificate,
but then use AppWrapper (http://www.ohanaware.com/appwrapper/)

On 5/19/2018 5:19 AM, Ray via use-livecode wrote:

Does anybody have steps to sign Mac OS standalones?  I've discovered
Apple 10.12 or higher now sabotages unsigned standalones and it's a
rather cryptic process to join the Apple dev club, create a
certificate, and then sign an LC standalone, evidently using Terminal.

Thanks in advance!

Ray Horsley

___
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

Signing MacOS Standalones

2018-05-19 Thread Ray via use-livecode
Does anybody have steps to sign Mac OS standalones?  I've discovered 
Apple 10.12 or higher now sabotages unsigned standalones and it's a 
rather cryptic process to join the Apple dev club, create a certificate, 
and then sign an LC standalone, evidently using Terminal.


Thanks in advance!

Ray Horsley

___
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

Signing MacOS Standalones

2018-05-17 Thread Ray via use-livecode
Does anybody have steps to sign Mac OS standalones?  I've discovered 
Apple 10.12 or higher now sabotages unsigned standalones and it's a 
rather cryptic process to join the Apple dev club, create a certificate, 
and then sign an LC standalone, evidently using Terminal.


Thanks in advance!

Ray Horsley

___
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: playing multiple audio files simultaneously

2017-03-29 Thread Ray via use-livecode
I'm also sticking with LC 8.1.  I thought there was a stable version of 
9 but evidently not yet.


On 3/29/2017 4:13 PM, Peter Bogdanoff via use-livecode wrote:

Using “wait” is generally not advisable…

I just have a list of all players and then give them all a pause command or set 
their filenames to empty before playing the new audio.

I saw some instability in LC 9 (crashing), so I’m sticking with 8 until those 
issues are worked out.

pb

On Mar 29, 2017, at 11:50 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Thanks Peter - I'll look into 9.0 and see how it works.  I can't imagine an 
improvement in 8.x is not retained in 9.x.

To your point, I'm assuming you can't use:

  wait until sound() = "done" with messages

in order to avoid playing sounds simultaneously.  Right?

On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote:

What I’m doing now is…
I’m using the Livecode 8.1 series
Converting my QT files to wmv and putting those in the same directory as the QT 
files
Using the platform property to detect the user’s OS
Setting the file suffix to .mov or .wmv depending on that result

It works well. My issue is wanting to not have the various players play 
simultaneously—I have to stop the others when another plays!

The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT 
files. On Windows, LC 8 uses DirectShow to play audio and video.

https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/

Peter

On Mar 29, 2017, at 11:07 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Yes - 7.7.9.  I re-installed Quicktime and got it working, playing sounds 
simultaneously, but I'm still somewhat apprehensive since Quicktime has been 
discontinued for so long now.

Do you know of anything else Peter or are we pretty much resigned to Quicktime 
on the desktop for simultaneous sounds?

On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote:

You do have QuickTime installed on your Windows machine? …if you are trying to 
play a QT file.

Peter
  On Mar 29, 2017, at 10:40 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac 
desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 
system, LC 7.1.1, I get an error of "could not open that video".  Even if it 
worked I understand there are latency issues as well as Apple discontinuing Quicktime.

I've tried SOX but for some reason can't get it to simply play an audio file 
(via a shell command).  If anybody knows the right syntax for this that would 
be great.

Otherwise, does anyone know of any alternatives compatible with Livecode?  I 
hope I'm missing something here and that Livecode itself can do this.  It seems 
odd that with all the advances Livecode has made we're still struggling aith an 
age old issue of how to play sounds.

Thanks!

___
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


___
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: playing multiple audio files simultaneously

2017-03-29 Thread Ray via use-livecode

Peter - this is working well now.  Thanks for the link, very informative.

On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote:

What I’m doing now is…
I’m using the Livecode 8.1 series
Converting my QT files to wmv and putting those in the same directory as the QT 
files
Using the platform property to detect the user’s OS
Setting the file suffix to .mov or .wmv depending on that result

It works well. My issue is wanting to not have the various players play 
simultaneously—I have to stop the others when another plays!

The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT 
files. On Windows, LC 8 uses DirectShow to play audio and video.

https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/

Peter

On Mar 29, 2017, at 11:07 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Yes - 7.7.9.  I re-installed Quicktime and got it working, playing sounds 
simultaneously, but I'm still somewhat apprehensive since Quicktime has been 
discontinued for so long now.

Do you know of anything else Peter or are we pretty much resigned to Quicktime 
on the desktop for simultaneous sounds?

On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote:

You do have QuickTime installed on your Windows machine? …if you are trying to 
play a QT file.

Peter
  On Mar 29, 2017, at 10:40 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac 
desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 
system, LC 7.1.1, I get an error of "could not open that video".  Even if it 
worked I understand there are latency issues as well as Apple discontinuing Quicktime.

I've tried SOX but for some reason can't get it to simply play an audio file 
(via a shell command).  If anybody knows the right syntax for this that would 
be great.

Otherwise, does anyone know of any alternatives compatible with Livecode?  I 
hope I'm missing something here and that Livecode itself can do this.  It seems 
odd that with all the advances Livecode has made we're still struggling aith an 
age old issue of how to play sounds.

Thanks!

___
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



___
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: playing multiple audio files simultaneously

2017-03-29 Thread Ray via use-livecode
Thanks Peter - I'll look into 9.0 and see how it works.  I can't imagine 
an improvement in 8.x is not retained in 9.x.


To your point, I'm assuming you can't use:

  wait until sound() = "done" with messages

in order to avoid playing sounds simultaneously.  Right?

On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote:

What I’m doing now is…
I’m using the Livecode 8.1 series
Converting my QT files to wmv and putting those in the same directory as the QT 
files
Using the platform property to detect the user’s OS
Setting the file suffix to .mov or .wmv depending on that result

It works well. My issue is wanting to not have the various players play 
simultaneously—I have to stop the others when another plays!

The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT 
files. On Windows, LC 8 uses DirectShow to play audio and video.

https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/

Peter

On Mar 29, 2017, at 11:07 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


Yes - 7.7.9.  I re-installed Quicktime and got it working, playing sounds 
simultaneously, but I'm still somewhat apprehensive since Quicktime has been 
discontinued for so long now.

Do you know of anything else Peter or are we pretty much resigned to Quicktime 
on the desktop for simultaneous sounds?

On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote:

You do have QuickTime installed on your Windows machine? …if you are trying to 
play a QT file.

Peter
  On Mar 29, 2017, at 10:40 AM, Ray via use-livecode 
<use-livecode@lists.runrev.com> wrote:


I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac 
desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 
system, LC 7.1.1, I get an error of "could not open that video".  Even if it 
worked I understand there are latency issues as well as Apple discontinuing Quicktime.

I've tried SOX but for some reason can't get it to simply play an audio file 
(via a shell command).  If anybody knows the right syntax for this that would 
be great.

Otherwise, does anyone know of any alternatives compatible with Livecode?  I 
hope I'm missing something here and that Livecode itself can do this.  It seems 
odd that with all the advances Livecode has made we're still struggling aith an 
age old issue of how to play sounds.

Thanks!

___
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



___
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: playing multiple audio files simultaneously

2017-03-29 Thread Ray via use-livecode
Yes - 7.7.9.  I re-installed Quicktime and got it working, playing 
sounds simultaneously, but I'm still somewhat apprehensive since 
Quicktime has been discontinued for so long now.


Do you know of anything else Peter or are we pretty much resigned to 
Quicktime on the desktop for simultaneous sounds?


On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote:

You do have QuickTime installed on your Windows machine? …if you are trying to 
play a QT file.

Peter
  
On Mar 29, 2017, at 10:40 AM, Ray via use-livecode <use-livecode@lists.runrev.com> wrote:



I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac 
desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 
system, LC 7.1.1, I get an error of "could not open that video".  Even if it 
worked I understand there are latency issues as well as Apple discontinuing Quicktime.

I've tried SOX but for some reason can't get it to simply play an audio file 
(via a shell command).  If anybody knows the right syntax for this that would 
be great.

Otherwise, does anyone know of any alternatives compatible with Livecode?  I 
hope I'm missing something here and that Livecode itself can do this.  It seems 
odd that with all the advances Livecode has made we're still struggling aith an 
age old issue of how to play sounds.

Thanks!

___
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


playing multiple audio files simultaneously

2017-03-29 Thread Ray via use-livecode
I've lo0oked into playing multiple audio files simultaneously, for 
Windows and Mac desktops, and come up with nothing but issues. Using a 
player object on my Windows 8.1 system, LC 7.1.1, I get an error of 
"could not open that video".  Even if it worked I understand there are 
latency issues as well as Apple discontinuing Quicktime.


I've tried SOX but for some reason can't get it to simply play an audio 
file (via a shell command).  If anybody knows the right syntax for this 
that would be great.


Otherwise, does anyone know of any alternatives compatible with 
Livecode?  I hope I'm missing something here and that Livecode itself 
can do this.  It seems odd that with all the advances Livecode has made 
we're still struggling aith an age old issue of how to play sounds.


Thanks!

___
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