Manipulating PDF's

2024-02-16 Thread Ray Horsley via use-livecode

Greetings - after using launch document to launch a PDF file (using the
default PDF viewer) is there any way to get a reference to the window it
opened in, and then get and set the vScroll of that window?

___
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: [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
>

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?
>>>> 
>>>> 
>>>> ___

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


Re: Suffering from a Brain Fart...

2016-11-22 Thread Ray
Would it work for you to hide the visible stack(s) and open the stack 
being used as a dialog window as a palette?  Then re-show the visible 
stack(s) when the palette is closed.


On 11/22/2016 5:10 PM, Paul Dupuis wrote:

Help,

I was to open a modal dialog from a single handler and continue the
handler, updating certain information in a dialog, in a repeat loop.

The 'modal ' command pauses the handler execution until the
dialog is closed (presumably from a button in the dialog itself).
Therefore I need to open the dialog with something other than the modal
command?

I have done this before, but for whatever reasons, I can not remember
how to do it nor can I find any sample code in any of my stacks where I
have done this.



___
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


Cloning a Pixel C

2016-11-22 Thread Ray
This is a little off list but would anybody be able and willing to help 
me create four image files I can use to clone a Google Pixel C tablet?  
Specifically, the files I need are system.img, userdata.img, 
recovery.img, and boot.img.  The Pixel C is running Android 7.0.


___
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: Datagrids Jump when Scrolled

2016-11-04 Thread Ray
Thanks Mike - I have made a little progress of sorts.  I've noticed that 
when I set the fixed row height property, as in:


  set the dgProp["fixed row height"] of group "My Datagrid" to true

I can suddenly scroll vertically again.  I'm not sure this is the total 
solution but I thought I'd share it with you and Bob Sneidar since 
you've had trouble with this.  I'm still going to write something which 
will re-create datagrids anew.


Thanks!

On 11/4/2016 3:57 PM, Mike Kerner wrote:

Not that I know of, but you can check to see if the datagrid is part of a
group.  The bug is that LC recycles group properties, so you can wind up
with groups that get assigned behaviors, names, etc. that you never meant
to have assigned.  If the behavior gets assigned, then your DG will most
certainly break.

On Fri, Nov 4, 2016 at 3:24 PM, Ray <r...@linkit.com> wrote:


I avoid working with groups as much as I can.  I don't recall ever
ungrouping or grouping this particular datagrid.  Is there a way I can test
to see if I did so without knowing?


On 11/4/2016 3:22 PM, Mike Kerner wrote:


Hey, Ray, did you mess with a group with this DG, either adding it to a
group or ungrouping, etc.?  I finally isolated a bug that's been annoying
me for a while, and it was related to an issue with the way LC handles
groups.

On Fri, Nov 4, 2016 at 3:14 PM, Ray <r...@linkit.com> wrote:

Ahh!  There's an acronym I'd like to avoid :)


On 11/4/2016 3:13 PM, Bob Sneidar wrote:

Crash to Desktop

Bob S


On Nov 4, 2016, at 12:05 , Ray <r...@linkit.com> wrote:


What do you mean by "C to D"?

On 11/4/2016 3:04 PM, Bob Sneidar wrote:

I've had datagrids suddenly start C to D, and replacing them fixes the

issue. Who can say?

Bob S


On Nov 4, 2016, at 12:02 , Ray <r...@linkit.com<mailto:r...@linkit.com
wrote:

Seems like a bug if a datagrid can suddenly become unscrollable, and
thus useless.  If nobody else responds I'll report it.


___
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: Datagrids Jump when Scrolled

2016-11-04 Thread Ray
I avoid working with groups as much as I can.  I don't recall ever 
ungrouping or grouping this particular datagrid.  Is there a way I can 
test to see if I did so without knowing?


On 11/4/2016 3:22 PM, Mike Kerner wrote:

Hey, Ray, did you mess with a group with this DG, either adding it to a
group or ungrouping, etc.?  I finally isolated a bug that's been annoying
me for a while, and it was related to an issue with the way LC handles
groups.

On Fri, Nov 4, 2016 at 3:14 PM, Ray <r...@linkit.com> wrote:


Ahh!  There's an acronym I'd like to avoid :)


On 11/4/2016 3:13 PM, Bob Sneidar wrote:


Crash to Desktop

Bob S


On Nov 4, 2016, at 12:05 , Ray <r...@linkit.com> wrote:

What do you mean by "C to D"?

On 11/4/2016 3:04 PM, Bob Sneidar wrote:


I've had datagrids suddenly start C to D, and replacing them fixes the
issue. Who can say?

Bob S


On Nov 4, 2016, at 12:02 , Ray <r...@linkit.com<mailto:r...@linkit.com>>
wrote:

Seems like a bug if a datagrid can suddenly become unscrollable, and
thus useless.  If nobody else responds I'll report it.


___
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: Datagrids Jump when Scrolled

2016-11-04 Thread Ray

Ahh!  There's an acronym I'd like to avoid :)

On 11/4/2016 3:13 PM, Bob Sneidar wrote:

Crash to Desktop

Bob S



On Nov 4, 2016, at 12:05 , Ray <r...@linkit.com> wrote:

What do you mean by "C to D"?

On 11/4/2016 3:04 PM, Bob Sneidar wrote:

I've had datagrids suddenly start C to D, and replacing them fixes the issue. 
Who can say?

Bob S


On Nov 4, 2016, at 12:02 , Ray <r...@linkit.com<mailto:r...@linkit.com>> wrote:

Seems like a bug if a datagrid can suddenly become unscrollable, and thus 
useless.  If nobody else responds I'll report it.


___
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: Datagrids Jump when Scrolled

2016-11-04 Thread Ray

What do you mean by "C to D"?

On 11/4/2016 3:04 PM, Bob Sneidar wrote:

I've had datagrids suddenly start C to D, and replacing them fixes the issue. 
Who can say?

Bob S


On Nov 4, 2016, at 12:02 , Ray <r...@linkit.com<mailto:r...@linkit.com>> wrote:

Seems like a bug if a datagrid can suddenly become unscrollable, and thus 
useless.  If nobody else responds I'll report it.


___
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: Datagrids Jump when Scrolled

2016-11-04 Thread Ray
Bob - thanks for the idea and the ever so good feeling that I'm not the 
only one who's ever run across this.  I tried re-populating the datagrid 
with 500 lines of numbers and that didn't fix the problem so I don't 
think the issue has to do with the data itself.


I'm currently working on a script which will recreate the datagrid from 
scratch.  It's a lot of work, kind of sticky work, too, and it requires 
a thorough understanding of groups, background behaviors, the place 
command, row templates, and other stuff I've never really gotten into.


Seems like a bug if a datagrid can suddenly become unscrollable, and 
thus useless.  If nobody else responds I'll report it.


On 11/4/2016 2:57 PM, Bob Sneidar wrote:

Hate to say it but the easy thing is to delete the datagrid along with it's 
template (it will as you) and recreate it from scratch. I've solved a multitude 
of Datagrid issues this way. Also, keep in mind that if there is something iffy 
with the data you are putting into the data grid that can cause issues.

Bob S



On Nov 4, 2016, at 09:37 , Ray <r...@linkit.com> wrote:

I posted this last year and never got an answer.  Anybody want to take a shot 
at it?  I'm now using 7.1.1 but the same problem persists.

__

In a data grid with the vScrollBar set to true, scrolling suddenly stops
working.  Any attempt to scroll through about 100 rows of data simply
jumps to the end and shows only the last row at the very top of the
grid.  It doesn't matter whether I use the arrows, drag the scroll tab
or click in the scroll bar.

Many thanks,

Ray Horsley
LinkIt! Software


___
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


Datagrids Jump when Scrolled

2016-11-04 Thread Ray
I posted this last year and never got an answer.  Anybody want to take a 
shot at it?  I'm now using 7.1.1 but the same problem persists.


__

In a data grid with the vScrollBar set to true, scrolling suddenly stops
working.  Any attempt to scroll through about 100 rows of data simply
jumps to the end and shows only the last row at the very top of the
grid.  It doesn't matter whether I use the arrows, drag the scroll tab
or click in the scroll bar.

Many thanks,

Ray Horsley
LinkIt! Software


___
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


How do you stop editing a data grid cell

2016-07-07 Thread Ray
So a cell is open for editing in a data grid.  Click outside of the 
cell, it closes up (keeping the new data) and a 'closeFieldEditor' 
message is sent to the data grid group.  Good.


The problem is user don't always click outside the cell to manually 
close it up.  They may, for example, make a menu choice which opens a 
palette.  If they do, the new data in the cell is lost.  Sending 
'closeFieldEditor' does no good.


Ideas?

___
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: Get and Set the Scroll of a Datagrid

2016-06-07 Thread Ray Horsley

Mike, Klaus,  that's it!  Thank you very much.

On 6/7/2016 4:19 PM, Klaus major-k wrote:

Hi Ray,


Am 08.06.2016 um 00:09 schrieb Ray Horsley <r...@linkit.com>:

Does anybody know how to get and set the scroll of a datagrid?  None of the dgProp 
handlers works, nor does plain old "get the vScroll of group MyGrid", which 
always returns 0 for some reason.

Thanks a bunch for any help!

you can get and set:
the dgHScroll of grp XYZ
the dgVScroll of grp XYZ


Best

Klaus

--
Klaus Major
http://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


Get and Set the Scroll of a Datagrid

2016-06-07 Thread Ray Horsley
Does anybody know how to get and set the scroll of a datagrid?  None of 
the dgProp handlers works, nor does plain old "get the vScroll of group 
MyGrid", which always returns 0 for some reason.


Thanks a bunch for any help!

___
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: Rev Zip Archive call backs?

2016-05-19 Thread Ray

Now how did I miss that?

Thanks Paul!


On 5/19/2016 2:33 PM, Paul Dupuis wrote:

On 5/19/2016 2:09 PM, Ray wrote:

Greetings,

I'm using some of the commands from the Revolution Zip library and the
revZipCloseArchive takes about 25 seconds to close up and save a 36
meg file.  Does anybody know of any way to get call backs from this
command so I could display a progress graph?


See revZipSetProgressCallback in the dictionary

___
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


Rev Zip Archive call backs?

2016-05-19 Thread Ray

Greetings,

I'm using some of the commands from the Revolution Zip library and the 
revZipCloseArchive takes about 25 seconds to close up and save a 36 meg 
file.  Does anybody know of any way to get call backs from this command 
so I could display a progress graph?


Thanks.

Ray

___
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


LibURLftpUploadFile doesn't work with Windows Firewall On

2016-05-18 Thread Ray

I'm issuing the following Lib URL commands

   libURLSetFTPMode "active" -- our FTP server doesn't work 
otherwise for some reason

   libURLSetStatusCallback "uploadProgress", the long ID of me
   libURLftpUploadFile tFileForUpload, tDestination, "uploadComplete"

This only works on my Windows 8.1 system if I "Turn Off Windows 
Firewall" under "Private Network Settings".  Leaving Windows Firewall 
turned on for Public network setting doesn't cause any problems.


Does anybody have any experience with this?  Ideally I could provide 
users with a way to "always allow connections for the application named 
Livecode" as I get with other programs like FileZilla.


Thanks in advance!



___
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


Data Grid Array to Scalar Error

2016-05-11 Thread Ray

Has anybody seen this:

  An error has occurred in behavior for the column template:
  add: can't add array to scalar

I'm not sure what this means.  Other than the error popping up it 
doesn't seem to be doing any harm.  I've tried putting the handler which 
causes the error in a try-catch.  This works well but I can't save the 
RevDataGridLibrary stack so I have to re-do it each time I open the stack.


Any ideas?

___
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: Can't Display Keyboard Shortcuts in Popups

2016-04-20 Thread Ray

Thanks Peter - I'll experiment with this.  Looks interesting...

On 4/20/2016 4:14 PM, Peter M. Brigham wrote:

On Apr 20, 2016, at 2:31 PM, Ray wrote:


Thanks for the heads-up on the commandKeyDown handler.  I've actually already 
got that in place, and my software doesn't really use fields so I think it 
should be good.  If it isn't I'll more than likely see it in testing.

On 4/20/2016 2:20 PM, Peter M. Brigham wrote:

On Apr 20, 2016, at 1:45 PM, Richard Gaskin wrote:


If this item isn't also in the menu bar, you can put the shortcut into the 
context menu item but with two downsides:

1. It won't be right-aligned as users are accustomed to seeing.

2. It won't have any functional effect, requiring as Craig noted that
   you also write a commandKeyDown handler, with conditionals within
   it to determine when it should be invoked and when it should be
   ignored.

WIth trapping commandkeydown messages, if you're working in the IDE you do have 
to be sure that you're paying attention to existing commandkey shortcuts. If 
the user types ctrl-A and the focus is on an editable field then the text of 
the field will be selected and your own handler won't fire off. If this is a 
standalone then you have more control.

FWIW, here's a modular way of managing popup menus that I use all the time. It 
requires about 5 minutes of setup (create a popup menu button, and paste a 
handler into your library stack) but then to pop up a menu and get the user 
choice you just do something like:

put popChoose("Audio","Video","Photo") into userChoice
switch userChoice
...

-- Peter

Peter M. Brigham
pmb...@gmail.com



(watch line wraps)

function popChoose
-- popChoose() is the equivalent of the "answer" command, but for a pop-up 
list
-- pops up a list of options, returns the option chosen by the user,
--if no option chosen, exits to top
-- you must have a button "contextualMenu"
--button style = menu, menumode = popup, name = "contextualMenu"
--the button should be placed in your mainstack or a library stack
--button can be made invisible when you're done, if you like
-- the button script needs only one handler:
--on menupick what
--   set the uSelection of me to what
--end menupick
-- paste this popChoose handler into a suitable stack script,
--(mainstack or library) so it's available anywhere --
--put the button into same stack for convenience
-- enter the short name of the stack containing the button
--into the constant declaration below

-- popChoose() can accept a cr-delimited list of choices

--or a comma-delimited list
-- eg: put "parsley" & cr & "sage" & cr & "rosemary" into choiceList
-- put popChoose(choiceList) into userChoice
-- or: put popChoose(choice1,choice2,choice3) into userChoice
-- or: put popChoose("parsley","sage","rosemary","-","thyme") \
   --   into userChoice
-- if you need the line number of the chosen item, check the dialogdata
--after calling popChoose()

constant popChooseStackName = "yourLibraryStack"

repeat with n = 1 to paramcount()

   put param(n) & cr after tList
end repeat
delete char -1 of tList
put empty into u
set the uSelection of btn "contextualMenu" of stack popChooseStackName to 
empty
put tList into btn "contextualMenu" of stack popChooseStackName
popup btn "contextualMenu" of stack popChooseStackName
put the menuhistory of btn "contextualMenu" of stack popChooseStackName \
  into lineNbr
put the uSelection of btn "contextualMenu" of stack popChooseStackName into 
u
set the uSelection of btn "contextualMenu" of stack popChooseStackName to 
empty
put empty into btn "contextualMenu" of stack popChooseStackName
-- belt and suspenders, don't leave contents hanging around
select empty
if u = empty then exit to top
-- ie, mouseRelease, no action, otherwise:
set the dialogdata to lineNbr
return u
end popChoose



___
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: Can't Display Keyboard Shortcuts in Popups

2016-04-20 Thread Ray
Thanks for the heads-up on the commandKeyDown handler.  I've actually 
already got that in place, and my software doesn't really use fields so 
I think it should be good.  If it isn't I'll more than likely see it in 
testing.


On 4/20/2016 2:20 PM, Peter M. Brigham wrote:

On Apr 20, 2016, at 1:45 PM, Richard Gaskin wrote:


If this item isn't also in the menu bar, you can put the shortcut into the 
context menu item but with two downsides:

1. It won't be right-aligned as users are accustomed to seeing.

2. It won't have any functional effect, requiring as Craig noted that
   you also write a commandKeyDown handler, with conditionals within
   it to determine when it should be invoked and when it should be
   ignored.

WIth trapping commandkeydown messages, if you're working in the IDE you do have 
to be sure that you're paying attention to existing commandkey shortcuts. If 
the user types ctrl-A and the focus is on an editable field then the text of 
the field will be selected and your own handler won't fire off. If this is a 
standalone then you have more control.

-- Peter

Peter M. Brigham
pmb...@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


Re: Can't Display Keyboard Shortcuts in Popups

2016-04-20 Thread Ray
OK - so the software is for drawing 'links' around parts of a picture so 
when they're clicked the software plays audio files, among other 
things.  The links are listed in the data grid.  I've already got a 
traditional menu bar at the top of the screen but instead of requiring 
the user to select the link in the data grid and then relocate the mouse 
to the traditional menu bar, click on it, and choose Audio, it seemed 
easier to simply let the user right click directly on the link in the 
grid and choose Audio (which then brings up a dialog prompting the user 
to specify the audio file which will be played).  Let me know if you 
have any other suggestions but I'm pretty sure your previous suggestion 
of manually including the shortcut as part of the menu item is the best 
work around.


On 4/20/2016 12:47 PM, Peter M. Brigham wrote:

On Apr 20, 2016, at 12:08 PM, Ray wrote:


Peter - many thanks for your thoughts here!  I believe the answer is to just manually 
include the "...ctrl+A" in the menu item.   The limitation with this 
solution is I can't 'right justify' the keyboard shortcut part of the menu item.  Thus, 
other menu items which have sub menus show the right pointing arrow much farther to the 
right.  I guess I could duplicate the contextual menu in a fixed menu bar but I like to 
avoid redundancy.

I'm actually popping up the contextual menu as a right-click choice on a data 
grid.  It changes depending which column in the grid you right-click.  Does 
that sound like bad interface to you?

I often use a popup this way, to provide contextual choices to the user. What I don't get about 
what you're trying to do is this: if the user does a , what is supposed to 
happen? Given that just typing ctrl-A doesn't give the "audio" command (whatever that 
does) any context to work from? And if the audio command doesn't need a context, then why put 
it into a contextual popup in the first place? I guess I don't understand what your aim is.


On 4/20/2016 11:55 AM, Peter M. Brigham wrote:


On Apr 20, 2016, at 11:35 AM, Richard Gaskin wrote:


Ray wrote:


I'm unable to popup a button as a contextual menu and show keyboard
shortcuts.  For example, I'd like users to see "Audio  ctrl+A", not
just "Audio".

The button's style is "menu" and the button's contents for that line
is "Audio/A".  The "Audio   ctrl+A" displays fine as long as the
button's "menuMode" is pulldown, but as soon as I use the popup
command to pop the button up contextually, it's menuMode is changed
to "popUp".  This loses the display of the keyboard shortcut.  I now
only see "Audio" instead of the desired "Audio   ctrl+A".

Does anyone know how to keep keyboard shortcuts while using the popup
command?

I don't believe the OS APIs support that.  The HIGs for all supported desktop 
platforms suggest using context menus as a secondary convenience for items also 
available in the more visible menu bar.

Given that design mandate, it seems the assumption is that users can learn 
shortcuts when viewing the menu item in their primary location, regardless 
whether a subset of those items is also available in a more ephemeral secondary 
form such as a context menu.

On an implementation level, following the design mandate certainly makes things 
easier for the developer, as both LiveCode and the OS support keyboard triggers 
for visible menu items such as those in the menu bar, but since a popup only 
exists at the moment it's popped up there's no way to hook the event from the 
object.

Usually popup menus are really contextual menus anyway, and give the user choices that are quite dependent on 
the control being clicked on. They can be (and I think usually are) constructed on the fly, to allow for, eg, 
actions specific to a field, or even to the text chunk clicked on. Whereas keyboard shortcuts (and the menu 
choices associated with them) are generally more global in scope. If you really need to have shortcuts listed 
in a popup menu, you could construct them yourself on the fly -- on mousedown; put "Audio   ctrl+A" 
into btn "myPopup"; popup btn "myPopup". I don't know when this would be actually useful, 
but then I don't know what you're trying to do here.

-- Peter

Peter M. Brigham
pmb...@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


Re: Can't Display Keyboard Shortcuts in Popups

2016-04-20 Thread Ray
Peter - many thanks for your thoughts here!  I believe the answer is to 
just manually include the "...ctrl+A" in the menu item.   The 
limitation with this solution is I can't 'right justify' the keyboard 
shortcut part of the menu item.  Thus, other menu items which have sub 
menus show the right pointing arrow much farther to the right.  I guess 
I could duplicate the contextual menu in a fixed menu bar but I like to 
avoid redundancy.


I'm actually popping up the contextual menu as a right-click choice on a 
data grid.  It changes depending which column in the grid you 
right-click.  Does that sound like bad interface to you?


On 4/20/2016 11:55 AM, Peter M. Brigham wrote:

On Apr 20, 2016, at 11:35 AM, Richard Gaskin wrote:


Ray wrote:


I'm unable to popup a button as a contextual menu and show keyboard
shortcuts.  For example, I'd like users to see "Audio  ctrl+A", not
just "Audio".

The button's style is "menu" and the button's contents for that line
is "Audio/A".  The "Audio   ctrl+A" displays fine as long as the
button's "menuMode" is pulldown, but as soon as I use the popup
command to pop the button up contextually, it's menuMode is changed
to "popUp".  This loses the display of the keyboard shortcut.  I now
only see "Audio" instead of the desired "Audio   ctrl+A".

Does anyone know how to keep keyboard shortcuts while using the popup
command?

I don't believe the OS APIs support that.  The HIGs for all supported desktop 
platforms suggest using context menus as a secondary convenience for items also 
available in the more visible menu bar.

Given that design mandate, it seems the assumption is that users can learn 
shortcuts when viewing the menu item in their primary location, regardless 
whether a subset of those items is also available in a more ephemeral secondary 
form such as a context menu.

On an implementation level, following the design mandate certainly makes things 
easier for the developer, as both LiveCode and the OS support keyboard triggers 
for visible menu items such as those in the menu bar, but since a popup only 
exists at the moment it's popped up there's no way to hook the event from the 
object.

Usually popup menus are really contextual menus anyway, and give the user choices that are quite dependent on 
the control being clicked on. They can be (and I think usually are) constructed on the fly, to allow for, eg, 
actions specific to a field, or even to the text chunk clicked on. Whereas keyboard shortcuts (and the menu 
choices associated with them) are generally more global in scope. If you really need to have shortcuts listed 
in a popup menu, you could construct them yourself on the fly -- on mousedown; put "Audio   ctrl+A" 
into btn "myPopup"; popup btn "myPopup". I don't know when this would be actually useful, 
but then I don't know what you're trying to do here.

-- Peter

Peter M. Brigham
pmb...@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


Can't Display Keyboard Shortcuts in Popups

2016-04-20 Thread Ray
I'm unable to popup a button as a contextual menu and show keyboard 
shortcuts.  For example, I'd like users to see "Audio  ctrl+A", not just 
"Audio".


The button's style is "menu" and the button's contents for that line is 
"Audio/A".  The "Audio   ctrl+A" displays fine as long as the button's 
"menuMode" is pulldown, but as soon as I use the popup command to pop 
the button up contextually, it's menuMode is changed to "popUp".  This 
loses the display of the keyboard shortcut.  I now only see "Audio" 
instead of the desired "Audio   ctrl+A".


Does anyone know how to keep keyboard shortcuts while using the popup 
command?


___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Very interesting.  I've looked a little into postgreSQL, not that much.  
I think we've pretty much decided to stick with mySQL for now, it should 
work for our purpose, but you've peaked my interest in postgreSQL.


Many thanks for your input on this Richard!

On 4/6/2016 3:13 PM, Dr. Hawkins wrote:

On Wed, Apr 6, 2016 at 10:38 AM, Ray <r...@linkit.com> wrote:


So Richard, what did you end up going with when neither sqLite nor mySQL
worked out for you?


postgreSQL

It's more mature in some ways than mySQL, but more importantly, I can give
compound transaction (there's a 500+ statement query on client opening).
It also has more advanced "replication" across multiple installations,
although I haven't gotten near implementing that yet.

It's also a free database, and is MIT license instead of GPL.  It's used
within OS X, but I installed it separately after misadventure with OS X
server--apple changed major release of OS X on a minor release of server,
leaving things tea din the water and requiring reinstallation of an older
version just to export the db . . .

I think that postgres is also the only one of the three being discussed
that has a true boolean type, but that doesn't matter for most applications.

Also, if you find yourself crossing back and forth, you need to keep track
of things like each db representing true and false differently, and such
things.  I use an in-memory SQLite for the client, but postgres for the
server. After some experimenting, I stopped storing the data fields on the
server, instead having fields for datetime, key, type (I have multiple
tables in memory), and just storing INSERT commands in it (all the
processing is actually done on he client.  I *could* use an array [and at
one point did], but "SELECT . . . WHERE" is *so* much easier to write than
looping through arrays . . .)




___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
I'd actually be happy with emails if they included everything I need and 
excluded unnecessary stuff, but we've had a lot of problems in the past 
relying on general emails so we're going to try something which should 
help guide our users to writing good bug reports.


On 4/6/2016 2:55 PM, EED-wp Email wrote:

Ray
Good idea. I just get bug reports emailed to me. That's why I send the email by 
accessing a php mail system on my server. That way the user doesn't have to 
have email installed.

William Prothero
http://ed.earthednet.org


On Apr 6, 2016, at 8:32 AM, Ray <r...@linkit.com> wrote:

Richard - thanks for this advice.  It's really quite helpful.  We've abandoned 
the sqLite idea but I think mySQL should work fine.  The purpose of this 
database is to maintain an index of bug reports. The bug reports themselves are 
actually Livecode stacks.  The database will serve as an index to all bug 
reports.  The plan is to have just single table of about four columns; 
username, bug name, date, and status.  Hopefully it will stay this simple.

Since we'll be updating an entire record at a time I don't think the lack of 
dependency will ever be a problem, but let me know what you think.

Thanks,

Ray


On 4/6/2016 11:14 AM, Dr. Hawkins wrote:

On Wed, Apr 6, 2016 at 6:05 AM, Ray <r...@linkit.com> wrote:

I thought of downloading it, updating it, and then putting it back on the
server but that wouldn't work if two users simultaneously did so.  Since
I'll have many users using the database simultaneously everything has to be
done on the server.  I know only one user can write to an sqLite database
at a time, but that only takes about 20 milliseconds if done on the server
and the other writes get cued, something that wouldn't happen in the
download/re-upload scenario.

You are going past what SQLite is meant to handle, and asking for trouble.

When SQLite writes, it changes a patch of disk (I couldn't tell you how
much).

The other users won't be queued up waiting to write; they'll be getting
failure to open.

You're either going to need a persistent middleware app running on the
server, or to follow the advice of the SQLite team:  use postgres for
something like this.

SQLite is wonderful, but it also knows it's limits.  I use it in-memory,
and as a convenient way to throw backup files.

And depending upon what you're doing, mySQL may not be an appropriate
choice.  In particular, it doesn't handle real transactions.

SQLite and postgres can handle

BEGIN TRANSACTION;

SELECT this from that;

UPDATE that WITH thisstuff;

UPDATE somethingElse WITH that

END TRANSACTION;


whereas mySQL would do this as separate SELECT and  two UPDATEs

If you need either all or none of them to happen (e.g., dependencies and
consistency), mySQL is not your choice.

postgres also means a single 20ms transaction for such things, while mySQL
would be three separate 20ms transactions.


___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
I haven't gotten that far into the database syntax and Livecode's 
handling of it yet so I couldn't say, yet.  But I'm sure I'll figure out 
soon what, if any, Livecode's limitations are.


So Richard, what did you end up going with when neither sqLite nor mySQL 
worked out for you?



On 4/6/2016 1:16 PM, Dr. Hawkins wrote:

On Wed, Apr 6, 2016 at 9:42 AM, Peter Haworth  wrote:


mySQL does have transactions, as do all SQL implementations.  They're part
of the SQL spec.  postGresql may well have advantages over mySQL but that
isn't one of them.


Now I'm trying to remember: is it that livecdoe that can't successfully
  pass a compound command to mySQL?

So that BEGIN, each command, and END each take a separate live code
command?  That turns it into a brutal multiplier for a remote database, and
one to watch on a local.

I remember that mySQL was a flat-out deadend for me; I started with it when
I realized that SQLite wasn't going to do it for the remote.

Tje more I think about it, the more I think it's live code's
implementation; maybe that is getting fixed in 8.



It's quite feasible to implement multi-user sqlite applications.  There are
several examples on the SQLite web site and in fact their website is driven
by an sqlite database.  Of course it depends on the needs of the
application, as it always does.


"SQLite does not compete with client/server databases. SQLite competes with
fopen()."
 from https://www.sqlite.org/whentouse.html


I'm going to be going the middleware route myself, but i'm not switching
until everything else is done.

I'm dealing with the presumption of multiple users accessing the same
"case" at once--at least the lawyer's desk, secretary's computer, and the
lawyer from court.

At the moment, I periodically (about 30 seconds) send a transaction to the
server with all of the updates that also scoops back any updates from the
remote.   I don't need to worry about inconsistencies from users, and can
simply use the latest value entered, without regard to whether there was an
earlier unknown change (If Beth enters $20,000 for income, and Sarah enters
$30,000, the office or data has bigger problems than I can solve).

I very briefly synched each transaction as it occurred using remote mySQL;
this was  brutally slow as each changed variable causes a cascade of it's
dependencies; it was a noticeable fraction of a second to tab to the next
field . . . (kind of like tabs in the IDE when you have multiple large
scripts . . .)

While I could stay with the current method for the distributed product once
the ssl postgres is implemented, there are enough advantages to me for a
persistent server that I'll still switch.   In particular, it lets me go
asynchronous:  the client program writes and forgets, eliminating most of
the transactions it initiates, and receives messages from the server on the
socket when something changes at that end (which would always follow
shortly after its own transmission).  The server on a VPS or even dedicated
server simply watches the open sockets on a round robin basis, and writes
back any changes (or, potentially other messages) to the client.







___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Yeah, my expectation is that we'll avoid injection issues using the PHP 
middleware.


All in all, it seems like a pretty common need; to store on a server a 
database that multiple users are going to be updating.  I wish there 
were some sort of a Livecode lesson which detailed several approaches to 
this including the necessary steps to set up the database on the remote 
server.  Do you know of any?


On 4/6/2016 12:42 PM, Peter Haworth wrote:

Hi Ray,
Lots of things for you to think about!  As someone else mentioned, I
thought you were using a network file system rather than a web server.

Just to set the record straight on a couple of things.

mySQL does have transactions, as do all SQL implementations.  They're part
of the SQL spec.  postGresql may well have advantages over mySQL but that
isn't one of them.

It's quite feasible to implement multi-user sqlite applications.  There are
several examples on the SQLite web site and in fact their website is driven
by an sqlite database.  Of course it depends on the needs of the
application, as it always does.

There are many ways to handle queuing of db access when the db is locked.
There's a PRAGMA that controls how long the lock request should wait before
reporting it can't get the lock.  It's easy to program that yourself in a
repeat loop/send in time structure too.

I started a thread a few months back about direct calls to server-based SQL
databases from Livecode versus middleware which generated a lot of possible
approaches.  I ended up going the middleware route using php scripts.  My
Livecode app uses the POST command to send a code that indicates to the
server which SQL operation is to be executed along with all the data needed
to execute it.  No SQL statements ever go over the connection so no sql
injection issues. That's just one possible implementation of course and
there are many other ways to do it.

Good luck!

On Wed, Apr 6, 2016 at 8:32 AM Ray <r...@linkit.com> wrote:


Richard - thanks for this advice.  It's really quite helpful.  We've
abandoned the sqLite idea but I think mySQL should work fine.  The
purpose of this database is to maintain an index of bug reports. The bug
reports themselves are actually Livecode stacks.  The database will
serve as an index to all bug reports.  The plan is to have just single
table of about four columns; username, bug name, date, and status.
Hopefully it will stay this simple.

Since we'll be updating an entire record at a time I don't think the
lack of dependency will ever be a problem, but let me know what you think.

Thanks,

Ray

On 4/6/2016 11:14 AM, Dr. Hawkins wrote:

On Wed, Apr 6, 2016 at 6:05 AM, Ray <r...@linkit.com> wrote:


I thought of downloading it, updating it, and then putting it back on

the

server but that wouldn't work if two users simultaneously did so.  Since
I'll have many users using the database simultaneously everything has

to be

done on the server.  I know only one user can write to an sqLite

database

at a time, but that only takes about 20 milliseconds if done on the

server

and the other writes get cued, something that wouldn't happen in the
download/re-upload scenario.


You are going past what SQLite is meant to handle, and asking for

trouble.

When SQLite writes, it changes a patch of disk (I couldn't tell you how
much).

The other users won't be queued up waiting to write; they'll be getting
failure to open.

You're either going to need a persistent middleware app running on the
server, or to follow the advice of the SQLite team:  use postgres for
something like this.

SQLite is wonderful, but it also knows it's limits.  I use it in-memory,
and as a convenient way to throw backup files.

And depending upon what you're doing, mySQL may not be an appropriate
choice.  In particular, it doesn't handle real transactions.

SQLite and postgres can handle

BEGIN TRANSACTION;

SELECT this from that;

UPDATE that WITH thisstuff;

UPDATE somethingElse WITH that

END TRANSACTION;


whereas mySQL would do this as separate SELECT and  two UPDATEs

If you need either all or none of them to happen (e.g., dependencies and
consistency), mySQL is not your choice.

postgres also means a single 20ms transaction for such things, while

mySQL

would be three separate 20ms transactions.




___
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 
prefe

Re: Error: Unable to open the database file

2016-04-06 Thread Ray
Richard - thanks for this advice.  It's really quite helpful.  We've 
abandoned the sqLite idea but I think mySQL should work fine.  The 
purpose of this database is to maintain an index of bug reports. The bug 
reports themselves are actually Livecode stacks.  The database will 
serve as an index to all bug reports.  The plan is to have just single 
table of about four columns; username, bug name, date, and status.  
Hopefully it will stay this simple.


Since we'll be updating an entire record at a time I don't think the 
lack of dependency will ever be a problem, but let me know what you think.


Thanks,

Ray

On 4/6/2016 11:14 AM, Dr. Hawkins wrote:

On Wed, Apr 6, 2016 at 6:05 AM, Ray <r...@linkit.com> wrote:


I thought of downloading it, updating it, and then putting it back on the
server but that wouldn't work if two users simultaneously did so.  Since
I'll have many users using the database simultaneously everything has to be
done on the server.  I know only one user can write to an sqLite database
at a time, but that only takes about 20 milliseconds if done on the server
and the other writes get cued, something that wouldn't happen in the
download/re-upload scenario.


You are going past what SQLite is meant to handle, and asking for trouble.

When SQLite writes, it changes a patch of disk (I couldn't tell you how
much).

The other users won't be queued up waiting to write; they'll be getting
failure to open.

You're either going to need a persistent middleware app running on the
server, or to follow the advice of the SQLite team:  use postgres for
something like this.

SQLite is wonderful, but it also knows it's limits.  I use it in-memory,
and as a convenient way to throw backup files.

And depending upon what you're doing, mySQL may not be an appropriate
choice.  In particular, it doesn't handle real transactions.

SQLite and postgres can handle

BEGIN TRANSACTION;

SELECT this from that;

UPDATE that WITH thisstuff;

UPDATE somethingElse WITH that

END TRANSACTION;


whereas mySQL would do this as separate SELECT and  two UPDATEs

If you need either all or none of them to happen (e.g., dependencies and
consistency), mySQL is not your choice.

postgres also means a single 20ms transaction for such things, while mySQL
would be three separate 20ms transactions.





___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Bill thanks for sharing this with me.  I've downloaded it and I'm 
looking into now.  I'll let you know how it works out.


On 4/6/2016 10:26 AM, Earthednet-wp wrote:

Ray,
I have a stack for MySQL implementation that might help you get started, since 
you are thinking of using php as middleware. It's at 
http://es.earthednet.org/SoftwareForEducation
Scroll to the bottom of the page.
Good luck.
Bill

William Prothero
http://es.earthednet.org


On Apr 6, 2016, at 7:23 AM, Ray <r...@linkit.com> wrote:

Thanks Mike.  I've used Andre's solutions a number of times and they've always 
worked really well.  I wasn't aware of this one.


On 4/6/2016 10:21 AM, Mike Bonner wrote:
On an "LC server" side note, andre garzias dblib is really helpful.  It
might be possible to build up your query locally using dblib, then send the
resulting array to the server that also uses dblib, set the array there and
execute the action.  (dblib works great)  I think it will work with either
mysql or sqlite.  This would require you to set up livecode server of
course.
http://andregarzia.com/pages/en/dblib/
___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Thanks for your confirmation on this, Mike.  We'll continue with the PHP 
middleware plan.  It seems to be industry standard and it makes sense, 
especially from a security standpoint.


On 4/6/2016 10:15 AM, Mike Bonner wrote:

Actually, you CAN connect directly to to mysql server (its actually a
server in its own right) if you set things up that way.  You have to change
where connections are allowed from but honestly, you're still better off
using middleware. This way you can place any files with sensitive data
(passwords etc) outside the directly accessible area of your webserver, and
have your middleware "include" the file. In this way, you make it harder
for people to poke around and figure out parts of your setup, and obviates
the need to have a hard coded or known password to your mysql database.

Having an open port accessible from anywhere directly to your database
server is usually a bad idea.
The php middleware idea should work swimmingly.
___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Thanks Mike.  I've used Andre's solutions a number of times and they've 
always worked really well.  I wasn't aware of this one.


On 4/6/2016 10:21 AM, Mike Bonner wrote:

On an "LC server" side note, andre garzias dblib is really helpful.  It
might be possible to build up your query locally using dblib, then send the
resulting array to the server that also uses dblib, set the array there and
execute the action.  (dblib works great)  I think it will work with either
mysql or sqlite.  This would require you to set up livecode server of
course.
http://andregarzia.com/pages/en/dblib/
___
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: Error: Unable to open the database file

2016-04-06 Thread Ray
Mike - thanks for your help here.  You're absolutely right about the 
need for some kind of middleware and although I've never setup nor used 
Livecode Server I find the idea kind of intriguing.  For now I've asked 
my son who I work with daily to write the middleware piece using PHP.  
This should get us started.  I was just hoping sqLite would work with 
direct calls which evidently is not the case.


Many thanks!

On 4/6/2016 9:20 AM, Mike Bonner wrote:

You can write your own middleware using LC server if you have it set up on
your remote.  I'm afraid I don't know enough about sqlite concurrency
issues and how to handle them, but since the server that has your sqlite is
an http server (I think most of us had been thinking it was a local network
share of some type) middleware would be the way to go. Or switch to mysql..

Ask pete or.. well, there are a ton of people on here who can advise on the
multi-user use of sqlite and its pitfalls and workarounds.

On Wed, Apr 6, 2016 at 7:05 AM, Ray <r...@linkit.com> wrote:


I thought of downloading it, updating it, and then putting it back on the
server but that wouldn't work if two users simultaneously did so.  Since
I'll have many users using the database simultaneously everything has to be
done on the server.  I know only one user can write to an sqLite database
at a time, but that only takes about 20 milliseconds if done on the server
and the other writes get cued, something that wouldn't happen in the
download/re-upload scenario.

I do like your suggestion regarding middleware on the server to update it
in place.  You wouldn't happen to have any experience with something that
works well in this scenario would you?  Something which works well with
Livecode, an sqLite database, and on a Linux server?


On 4/5/2016 11:20 PM, Mike Bonner wrote:


Ah. Do you need to update the file in place, or just be able to use it
with
your app?  If the second, you might put url "
http://54.210.118.224/Downloads/yourfile.sqlite; into URL
(specialfolderpath("tmp") & "/yourfile.sqlite")

at which point you can use revopendatabase to open the local copy of the
file at (specialfolderpath("tmp") & "/yourfile.sqlite")

If you need to be able to update the file in place you'd probably be
better
off using middleware on the web server and send your requests that way.

On Tue, Apr 5, 2016 at 8:51 PM, Ray <r...@linkit.com> wrote:

Mike - if I set the folder to the area I've set up to work with this, "

http://54.210.118.224/Downloads/;, I get "can't open that directory"
returned in the result.  I can read files at that location but I get an
"error 405 method not allowed" if I try to write files to that location.
Could that be the problem?

Regarding mapping the server to a drive letter or mounting it to a folder
on the local system, even if that worked I wouldn't be able to expect my
end users to do that so it's kind of out unless I'm missing something.

Thanks for your input and let me know if anything else comes to mind.

On 4/5/2016 10:33 PM, Mike Bonner wrote:

can you map the server to a drive letter?  (or mount it to a folder on

the
local system)  If so, that might help.

Alternatively, can you "set the folder.." to a path on the server and
see
"the files"?  If you can successfully set the default folder, then you
can
just supply the filename and see if it behaves differently.

On Tue, Apr 5, 2016 at 5:58 PM, Ray <r...@linkit.com> wrote:

I did read some about the file locking issues so I'll continue to look


into that.

Regarding testing with sqLite3, I'm not sure what to do with it.  I
downloaded the pre-compiled binary for Windows 64.  It gave me 2 files,
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.
Shell
commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:

I suppose I should also mention the usual caveat about using sqlite
over


a
networked file system, which is that sqlite relies on file system
locking
to preserve data integrity and some networked file systems are buggy
in
that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:

Peter - thanks for jumping in here.  Yes, I can read and write files
to

this location and, as a matter of fact, I can even do a straight read

of
the database file on the server and get the same cryptic characters
back
I get when I read the local copy.  I just can't establish a
connection
to it for the purpose of issuing revDatabase calls.

You're right when you say the "unable to open the database file" is
not
very informative.  I get the same message when I try that on an empty
path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:

You might want to try opening the database with something other than


Livecode i

Re: Error: Unable to open the database file

2016-04-06 Thread Ray
I actually haven't created the database yet so I guess it makes sense to 
use mySQL from the beginning instead of sqLite, thus eliminating the 
need to import one into the other.  Nonetheless, I'll still need 
middleware as I don't think Livecode can make direct calls to a mySQL 
database on a server as it does to a sqLite database locally (which was 
my original goal).


On 4/6/2016 9:54 AM, Ralph DiMola wrote:

Ray,

An http file reference is not a valid UNC for read/write file access. If you
want to connect remote users to a DB then import the SQLite DB into a MySQL
DB and have the users connect to the MySQL server and all the record locking
would be in place. You could go LC server middleware but that would be a
fair amount of work.

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 Ray
Sent: Tuesday, April 05, 2016 10:51 PM
To: use-livecode@lists.runrev.com
Subject: Re: Error: Unable to open the database file

Mike - if I set the folder to the area I've set up to work with this,
"http://54.210.118.224/Downloads/;, I get "can't open that directory"
returned in the result.  I can read files at that location but I get an
"error 405 method not allowed" if I try to write files to that location.
Could that be the problem?

Regarding mapping the server to a drive letter or mounting it to a folder on
the local system, even if that worked I wouldn't be able to expect my end
users to do that so it's kind of out unless I'm missing something.

Thanks for your input and let me know if anything else comes to mind.

On 4/5/2016 10:33 PM, Mike Bonner wrote:

can you map the server to a drive letter?  (or mount it to a folder on
the local system)  If so, that might help.

Alternatively, can you "set the folder.." to a path on the server and
see "the files"?  If you can successfully set the default folder, then
you can just supply the filename and see if it behaves differently.

On Tue, Apr 5, 2016 at 5:58 PM, Ray <r...@linkit.com> wrote:


I did read some about the file locking issues so I'll continue to
look into that.

Regarding testing with sqLite3, I'm not sure what to do with it.  I
downloaded the pre-compiled binary for Windows 64.  It gave me 2
files, sqlite3.def and sqlite3.dll but I'm not sure what to do with
them.  Shell commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:


I suppose I should also mention the usual caveat about using sqlite
over a networked file system, which is that sqlite relies on file
system locking to preserve data integrity and some networked file
systems are buggy in that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:

Peter - thanks for jumping in here.  Yes, I can read and write files
to

this location and, as a matter of fact, I can even do a straight
read of the database file on the server and get the same cryptic
characters back I get when I read the local copy.  I just can't
establish a connection to it for the purpose of issuing revDatabase

calls.

You're right when you say the "unable to open the database file" is
not very informative.  I get the same message when I try that on an
empty path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:


You might want to try opening the database with something other
than Livecode in hope that you will get a more informative error

message.

 sqlite3 is the official sqlite command line tool.  It's
distributed


with


OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as
the


sqlite


db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:

Devin - thanks for the idea but that's not it.  I just checked and

everything on my Windows 8.1 system matches case with the
database file path on the Linux server.  I even tried changing
the name of the database file to all lower case but that didn't work

either. Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:


Ray,

You may have moved your DB file from a system that is not case


sensitive, like MacOS, to one this is case sensitive, like Linux.
Do


all of
your folders and file names have the same exact spelling,
including upper and lower case letters, as the string in your path
variable?

Devin


On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers.
These


drivers are probably built in to Livecode and the OnRev server
which

would
explain why LC's database commands works so well locally and with
the OnRev based samples.

If this is the problem, does anybody know how I could install
these drivers on my own server?
On 4/5/2016 1:18 PM, Ray wrote:

I've never worke

Re: Error: Unable to open the database file

2016-04-06 Thread Ray
I thought of downloading it, updating it, and then putting it back on 
the server but that wouldn't work if two users simultaneously did so.  
Since I'll have many users using the database simultaneously everything 
has to be done on the server.  I know only one user can write to an 
sqLite database at a time, but that only takes about 20 milliseconds if 
done on the server and the other writes get cued, something that 
wouldn't happen in the download/re-upload scenario.


I do like your suggestion regarding middleware on the server to update 
it in place.  You wouldn't happen to have any experience with something 
that works well in this scenario would you?  Something which works well 
with Livecode, an sqLite database, and on a Linux server?


On 4/5/2016 11:20 PM, Mike Bonner wrote:

Ah. Do you need to update the file in place, or just be able to use it with
your app?  If the second, you might put url "
http://54.210.118.224/Downloads/yourfile.sqlite; into URL
(specialfolderpath("tmp") & "/yourfile.sqlite")

at which point you can use revopendatabase to open the local copy of the
file at (specialfolderpath("tmp") & "/yourfile.sqlite")

If you need to be able to update the file in place you'd probably be better
off using middleware on the web server and send your requests that way.

On Tue, Apr 5, 2016 at 8:51 PM, Ray <r...@linkit.com> wrote:


Mike - if I set the folder to the area I've set up to work with this, "
http://54.210.118.224/Downloads/;, I get "can't open that directory"
returned in the result.  I can read files at that location but I get an
"error 405 method not allowed" if I try to write files to that location.
Could that be the problem?

Regarding mapping the server to a drive letter or mounting it to a folder
on the local system, even if that worked I wouldn't be able to expect my
end users to do that so it's kind of out unless I'm missing something.

Thanks for your input and let me know if anything else comes to mind.

On 4/5/2016 10:33 PM, Mike Bonner wrote:


can you map the server to a drive letter?  (or mount it to a folder on the
local system)  If so, that might help.

Alternatively, can you "set the folder.." to a path on the server and see
"the files"?  If you can successfully set the default folder, then you can
just supply the filename and see if it behaves differently.

On Tue, Apr 5, 2016 at 5:58 PM, Ray <r...@linkit.com> wrote:

I did read some about the file locking issues so I'll continue to look

into that.

Regarding testing with sqLite3, I'm not sure what to do with it.  I
downloaded the pre-compiled binary for Windows 64.  It gave me 2 files,
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.  Shell
commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:

I suppose I should also mention the usual caveat about using sqlite over

a
networked file system, which is that sqlite relies on file system
locking
to preserve data integrity and some networked file systems are buggy in
that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:

Peter - thanks for jumping in here.  Yes, I can read and write files to


this location and, as a matter of fact, I can even do a straight read
of
the database file on the server and get the same cryptic characters
back
I get when I read the local copy.  I just can't establish a connection
to it for the purpose of issuing revDatabase calls.

You're right when you say the "unable to open the database file" is not
very informative.  I get the same message when I try that on an empty
path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:

You might want to try opening the database with something other than

Livecode in hope that you will get a more informative error message.
 sqlite3 is the official sqlite command line tool.  It's
distributed

with

OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as the

sqlite

db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:

Devin - thanks for the idea but that's not it.  I just checked and


everything on my Windows 8.1 system matches case with the database
file
path on the Linux server.  I even tried changing the name of the
database file to all lower case but that didn't work either.
Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:

Ray,

You may have moved your DB file from a system that is not case

sensitive, like MacOS, to one this is case sensitive, like Linux. Do

all of

your folders and file names have the same exact spelling, including
upper
and lower case letters, as the string in your path variable?


Devin


On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:


...one other note.  I'm gue

Re: Error: Unable to open the database file

2016-04-05 Thread Ray
Mike - if I set the folder to the area I've set up to work with this, 
"http://54.210.118.224/Downloads/;, I get "can't open that directory" 
returned in the result.  I can read files at that location but I get an 
"error 405 method not allowed" if I try to write files to that 
location.  Could that be the problem?


Regarding mapping the server to a drive letter or mounting it to a 
folder on the local system, even if that worked I wouldn't be able to 
expect my end users to do that so it's kind of out unless I'm missing 
something.


Thanks for your input and let me know if anything else comes to mind.

On 4/5/2016 10:33 PM, Mike Bonner wrote:

can you map the server to a drive letter?  (or mount it to a folder on the
local system)  If so, that might help.

Alternatively, can you "set the folder.." to a path on the server and see
"the files"?  If you can successfully set the default folder, then you can
just supply the filename and see if it behaves differently.

On Tue, Apr 5, 2016 at 5:58 PM, Ray <r...@linkit.com> wrote:


I did read some about the file locking issues so I'll continue to look
into that.

Regarding testing with sqLite3, I'm not sure what to do with it.  I
downloaded the pre-compiled binary for Windows 64.  It gave me 2 files,
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.  Shell
commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:


I suppose I should also mention the usual caveat about using sqlite over a
networked file system, which is that sqlite relies on file system locking
to preserve data integrity and some networked file systems are buggy in
that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:

Peter - thanks for jumping in here.  Yes, I can read and write files to

this location and, as a matter of fact, I can even do a straight read of
the database file on the server and get the same cryptic characters back
I get when I read the local copy.  I just can't establish a connection
to it for the purpose of issuing revDatabase calls.

You're right when you say the "unable to open the database file" is not
very informative.  I get the same message when I try that on an empty
path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:


You might want to try opening the database with something other than
Livecode in hope that you will get a more informative error message.
sqlite3 is the official sqlite command line tool.  It's distributed


with


OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as the


sqlite


db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:

Devin - thanks for the idea but that's not it.  I just checked and

everything on my Windows 8.1 system matches case with the database file
path on the Linux server.  I even tried changing the name of the
database file to all lower case but that didn't work either. Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:


Ray,

You may have moved your DB file from a system that is not case


sensitive, like MacOS, to one this is case sensitive, like Linux. Do


all of
your folders and file names have the same exact spelling, including
upper
and lower case letters, as the string in your path variable?

Devin


On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers. These


drivers are probably built in to Livecode and the OnRev server which

would
explain why LC's database commands works so well locally and with the
OnRev
based samples.

If this is the problem, does anybody know how I could install these
drivers on my own server?
On 4/5/2016 1:18 PM, Ray wrote:

I've never worked with sqLite databases before but it appears I


should

be able to access one on a server pretty much the same as I do locally.

Here's what I've done:

  put revOpenDatabase("sqLite",localPath) into theDbId


  -- this creates a zero K local database file

  put "CREATE TABLE bugs(Name char(50), Date char(50))" into

myQuery

  revExecuteSQL theDbId,myQuery -- the local database file is no 2

K

  revCloseDatabase theDbId -- close it or I won't be able to copy

it

to the server

I then copy the local database file to a remote server and make sure

all 9 permissions are checked (777).

I now load the well-tested server path into the variable dbPath and

try this:

  put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
  Error: Unable to open the database file

Suggestions?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your


subscription preferences

Re: Error: Unable to open the database file

2016-04-05 Thread Ray
Mike - if I set the folder to "http://54.210.118.224/Downloads/; I get 
"can't open that directory" returned in the result.  I can read files at 
that location but I get an "error 405 method not allowed" if I try to 
write files to that location.  Could that be the problem?


Regarding mapping the server to a drive letter or mounting it to a 
folder on the local system, even if that worked I wouldn't be able to 
expect my end users to do that so it's kind of out unless I'm missing 
something.


Thanks for your input and let me know if anything else comes to mind.

On 4/5/2016 10:33 PM, Mike Bonner wrote:

can you map the server to a drive letter?  (or mount it to a folder on the
local system)  If so, that might help.

Alternatively, can you "set the folder.." to a path on the server and see
"the files"?  If you can successfully set the default folder, then you can
just supply the filename and see if it behaves differently.

On Tue, Apr 5, 2016 at 5:58 PM, Ray <r...@linkit.com> wrote:


I did read some about the file locking issues so I'll continue to look
into that.

Regarding testing with sqLite3, I'm not sure what to do with it.  I
downloaded the pre-compiled binary for Windows 64.  It gave me 2 files,
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.  Shell
commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:


I suppose I should also mention the usual caveat about using sqlite over a
networked file system, which is that sqlite relies on file system locking
to preserve data integrity and some networked file systems are buggy in
that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:

Peter - thanks for jumping in here.  Yes, I can read and write files to

this location and, as a matter of fact, I can even do a straight read of
the database file on the server and get the same cryptic characters back
I get when I read the local copy.  I just can't establish a connection
to it for the purpose of issuing revDatabase calls.

You're right when you say the "unable to open the database file" is not
very informative.  I get the same message when I try that on an empty
path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:


You might want to try opening the database with something other than
Livecode in hope that you will get a more informative error message.
sqlite3 is the official sqlite command line tool.  It's distributed


with


OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as the


sqlite


db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:

Devin - thanks for the idea but that's not it.  I just checked and

everything on my Windows 8.1 system matches case with the database file
path on the Linux server.  I even tried changing the name of the
database file to all lower case but that didn't work either. Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:


Ray,

You may have moved your DB file from a system that is not case


sensitive, like MacOS, to one this is case sensitive, like Linux. Do


all of
your folders and file names have the same exact spelling, including
upper
and lower case letters, as the string in your path variable?

Devin


On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers. These


drivers are probably built in to Livecode and the OnRev server which

would
explain why LC's database commands works so well locally and with the
OnRev
based samples.

If this is the problem, does anybody know how I could install these
drivers on my own server?
On 4/5/2016 1:18 PM, Ray wrote:

I've never worked with sqLite databases before but it appears I


should

be able to access one on a server pretty much the same as I do locally.

Here's what I've done:

  put revOpenDatabase("sqLite",localPath) into theDbId


  -- this creates a zero K local database file

  put "CREATE TABLE bugs(Name char(50), Date char(50))" into

myQuery

  revExecuteSQL theDbId,myQuery -- the local database file is no 2

K

  revCloseDatabase theDbId -- close it or I won't be able to copy

it

to the server

I then copy the local database file to a remote server and make sure

all 9 permissions are checked (777).

I now load the well-tested server path into the variable dbPath and

try this:

  put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
  Error: Unable to open the database file

Suggestions?


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your


subscription preferences:
http://li

Re: Error: Unable to open the database file

2016-04-05 Thread Ray
I did read some about the file locking issues so I'll continue to look 
into that.


Regarding testing with sqLite3, I'm not sure what to do with it.  I 
downloaded the pre-compiled binary for Windows 64.  It gave me 2 files, 
sqlite3.def and sqlite3.dll but I'm not sure what to do with them.  
Shell commands from within Livecode don't work.  Suggestions?


On 4/5/2016 7:22 PM, Peter Haworth wrote:

I suppose I should also mention the usual caveat about using sqlite over a
networked file system, which is that sqlite relies on file system locking
to preserve data integrity and some networked file systems are buggy in
that area according to the sqlite website.

On Tue, Apr 5, 2016, 3:57 PM Ray <r...@linkit.com> wrote:


Peter - thanks for jumping in here.  Yes, I can read and write files to
this location and, as a matter of fact, I can even do a straight read of
the database file on the server and get the same cryptic characters back
I get when I read the local copy.  I just can't establish a connection
to it for the purpose of issuing revDatabase calls.

You're right when you say the "unable to open the database file" is not
very informative.  I get the same message when I try that on an empty
path on the server.

I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:

You might want to try opening the database with something other than
Livecode in hope that you will get a more informative error message.
   sqlite3 is the official sqlite command line tool.  It's distributed

with

OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as the

sqlite

db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:


Devin - thanks for the idea but that's not it.  I just checked and
everything on my Windows 8.1 system matches case with the database file
path on the Linux server.  I even tried changing the name of the
database file to all lower case but that didn't work either. Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:

Ray,

You may have moved your DB file from a system that is not case

sensitive, like MacOS, to one this is case sensitive, like Linux. Do

all of

your folders and file names have the same exact spelling, including

upper

and lower case letters, as the string in your path variable?

Devin



On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers. These

drivers are probably built in to Livecode and the OnRev server which

would

explain why LC's database commands works so well locally and with the

OnRev

based samples.

If this is the problem, does anybody know how I could install these

drivers on my own server?

On 4/5/2016 1:18 PM, Ray wrote:

I've never worked with sqLite databases before but it appears I

should

be able to access one on a server pretty much the same as I do locally.

Here's what I've done:
 put revOpenDatabase("sqLite",localPath) into theDbId

 -- this creates a zero K local database file

 put "CREATE TABLE bugs(Name char(50), Date char(50))" into

myQuery

 revExecuteSQL theDbId,myQuery -- the local database file is no 2

K

 revCloseDatabase theDbId -- close it or I won't be able to copy

it

to the server

I then copy the local database file to a remote server and make sure

all 9 permissions are checked (777).

I now load the well-tested server path into the variable dbPath and

try this:

 put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
 Error: Unable to open the database file

Suggestions?

___
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

Devin Asay
Office of Digital Humanities
Brigham Young University


___
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 preferen

Re: Error: Unable to open the database file

2016-04-05 Thread Ray
Peter - thanks for jumping in here.  Yes, I can read and write files to 
this location and, as a matter of fact, I can even do a straight read of 
the database file on the server and get the same cryptic characters back 
I get when I read the local copy.  I just can't establish a connection 
to it for the purpose of issuing revDatabase calls.


You're right when you say the "unable to open the database file" is not 
very informative.  I get the same message when I try that on an empty 
path on the server.


I'll try your sqLite3 suggestion and let you know how it works.

Thanks!

On 4/5/2016 6:34 PM, Peter Haworth wrote:

You might want to try opening the database with something other than
Livecode in hope that you will get a more informative error message.
  sqlite3 is the official sqlite command line tool.  It's distributed with
OSX but not sure if it's included with Windows.

Are you able to access any other files in the same directory as the sqlite
db?

On Tue, Apr 5, 2016 at 1:31 PM Ray <r...@linkit.com> wrote:


Devin - thanks for the idea but that's not it.  I just checked and
everything on my Windows 8.1 system matches case with the database file
path on the Linux server.  I even tried changing the name of the
database file to all lower case but that didn't work either. Thanks...

On 4/5/2016 3:38 PM, Devin Asay wrote:

Ray,

You may have moved your DB file from a system that is not case

sensitive, like MacOS, to one this is case sensitive, like Linux. Do all of
your folders and file names have the same exact spelling, including upper
and lower case letters, as the string in your path variable?

Devin



On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers. These

drivers are probably built in to Livecode and the OnRev server which would
explain why LC's database commands works so well locally and with the OnRev
based samples.

If this is the problem, does anybody know how I could install these

drivers on my own server?

On 4/5/2016 1:18 PM, Ray wrote:

I've never worked with sqLite databases before but it appears I should

be able to access one on a server pretty much the same as I do locally.

Here's what I've done:
put revOpenDatabase("sqLite",localPath) into theDbId

-- this creates a zero K local database file

put "CREATE TABLE bugs(Name char(50), Date char(50))" into myQuery
revExecuteSQL theDbId,myQuery -- the local database file is no 2 K

revCloseDatabase theDbId -- close it or I won't be able to copy it

to the server

I then copy the local database file to a remote server and make sure

all 9 permissions are checked (777).

I now load the well-tested server path into the variable dbPath and

try this:

put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
Error: Unable to open the database file

Suggestions?

___
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

Devin Asay
Office of Digital Humanities
Brigham Young University


___
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: Error: Unable to open the database file

2016-04-05 Thread Ray
Devin - thanks for the idea but that's not it.  I just checked and 
everything on my Windows 8.1 system matches case with the database file 
path on the Linux server.  I even tried changing the name of the 
database file to all lower case but that didn't work either. Thanks...


On 4/5/2016 3:38 PM, Devin Asay wrote:

Ray,

You may have moved your DB file from a system that is not case sensitive, like 
MacOS, to one this is case sensitive, like Linux. Do all of your folders and 
file names have the same exact spelling, including upper and lower case 
letters, as the string in your path variable?

Devin



On Apr 5, 2016, at 12:39 PM, Ray <r...@linkit.com> wrote:

...one other note.  I'm guessing calls to sqLite need drivers. These drivers 
are probably built in to Livecode and the OnRev server which would explain why 
LC's database commands works so well locally and with the OnRev based samples.

If this is the problem, does anybody know how I could install these drivers on 
my own server?

On 4/5/2016 1:18 PM, Ray wrote:

I've never worked with sqLite databases before but it appears I should be able 
to access one on a server pretty much the same as I do locally.

Here's what I've done:
   put revOpenDatabase("sqLite",localPath) into theDbId   -- 
this creates a zero K local database file

   put "CREATE TABLE bugs(Name char(50), Date char(50))" into myQuery
   revExecuteSQL theDbId,myQuery -- the local database file is no 2 K

   revCloseDatabase theDbId -- close it or I won't be able to copy it to the 
server

I then copy the local database file to a remote server and make sure all 9 
permissions are checked (777).

I now load the well-tested server path into the variable dbPath and try this:
   put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
   Error: Unable to open the database file

Suggestions?

___
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

Devin Asay
Office of Digital Humanities
Brigham Young University


___
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: Error: Unable to open the database file

2016-04-05 Thread Ray
...one other note.  I'm guessing calls to sqLite need drivers. These 
drivers are probably built in to Livecode and the OnRev server which 
would explain why LC's database commands works so well locally and with 
the OnRev based samples.


If this is the problem, does anybody know how I could install these 
drivers on my own server?


On 4/5/2016 1:18 PM, Ray wrote:
I've never worked with sqLite databases before but it appears I should 
be able to access one on a server pretty much the same as I do locally.


Here's what I've done:
   put revOpenDatabase("sqLite",localPath) into 
theDbId   -- this creates a zero K local database file


   put "CREATE TABLE bugs(Name char(50), Date char(50))" into myQuery
   revExecuteSQL theDbId,myQuery -- the local database file is no 2 K

   revCloseDatabase theDbId -- close it or I won't be able to copy it 
to the server


I then copy the local database file to a remote server and make sure 
all 9 permissions are checked (777).


I now load the well-tested server path into the variable dbPath and 
try this:

   put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
   Error: Unable to open the database file

Suggestions?


___
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


Error: Unable to open the database file

2016-04-05 Thread Ray
I've never worked with sqLite databases before but it appears I should 
be able to access one on a server pretty much the same as I do locally.


Here's what I've done:
   put revOpenDatabase("sqLite",localPath) into 
theDbId   -- this creates a zero K local database file


   put "CREATE TABLE bugs(Name char(50), Date char(50))" into myQuery
   revExecuteSQL theDbId,myQuery -- the local database file is no 2 K

   revCloseDatabase theDbId -- close it or I won't be able to copy it 
to the server


I then copy the local database file to a remote server and make sure all 
9 permissions are checked (777).


I now load the well-tested server path into the variable dbPath and try 
this:

   put revOpenDatabase("sqLite",dbPath) into myResult

but all I get back is:
   Error: Unable to open the database file

Suggestions?

___
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


When is a GIF Finished Playing?

2016-02-10 Thread Ray
Does anybody know of an easy way to tell whether a GIF file is playing 
or not?


If possible I'd like to avoid trying to write something involved using 
the CurrentFrame and FrameCount properties.  I'm not even sure how that 
would be done.


I'd rather have something like the sound() function, as in:

on mouseUp
   set the repeatCount of img myGif to 10
   repeat while gif(myImg) is not "done"
   end repeat
   answer "It's done!"
end mouseUp

___
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: When is a GIF Finished Playing?

2016-02-10 Thread Ray
Thanks Scott, but if you've set the RepeatCount to more than 1 and it's 
looping through the frames, twice for example, isn't there a possibility 
you'll get the CurrentFrame the same as the FrameCount too early?


On 2/10/2016 2:25 PM, Scott Rossi wrote:

I haven't done this in a long time, but in theory you should be able to
compare the currentFrame of the GIF with the frameCount.

  if the currentFrame of img "myGif" = the frameCount of img "myGif" then
answer "It's done"


Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design



On 2/10/16, 10:51 AM, "use-livecode on behalf of Ray"
<use-livecode-boun...@lists.runrev.com on behalf of r...@linkit.com> wrote:


Does anybody know of an easy way to tell whether a GIF file is playing
or not?

If possible I'd like to avoid trying to write something involved using
the CurrentFrame and FrameCount properties.  I'm not even sure how that
would be done.

I'd rather have something like the sound() function, as in:

on mouseUp
 set the repeatCount of img myGif to 10
 repeat while gif(myImg) is not "done"
 end repeat
 answer "It's done!"
end mouseUp

___
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: When is a GIF Finished Playing?

2016-02-10 Thread Ray
It would also be helpful if a message was sent each time a new frame is 
displayed.  We could trap for those messages, count them, and go from there.


On 2/10/2016 2:48 PM, Sannyasin Brahmanathaswami wrote:
  
I have a similar need.


Seems we can set the repeatCount, but I don’t see a way to test for 
“currentLoop”

Theoretically we need something like — where I am making up an unknown prop called 
“currentLoop":

if (the currentFrame of img "myGif" = the frameCount of img “myGif”) AND \
(the currentLoop of img “myGif" = the repeatCount of img “myGif")

then

answer “Ok I am indeed done”

end if

On February 10, 2016 at 9:29:57 AM, Ray 
(r...@linkit.com(mailto:r...@linkit.com)) wrote:


Thanks Scott, but if you've set the RepeatCount to more than 1 and it's
looping through the frames, twice for example, isn't there a possibility
you'll get the CurrentFrame the same as the FrameCount too early?

___
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: When is a GIF Finished Playing?

2016-02-10 Thread Ray
Hi Scott - In my case I let my users decide how many times the GIF 
cycles, so it more than likely will be more than once through, but not 
infinitely as in -1.  I like your second option, below, but how are you 
getting the GIF's frame delay?  Did I miss that Livecode property somewhere?


On 2/10/2016 4:06 PM, Scott Rossi wrote:

If you want the GIF to stop playing when it reaches the last frame, why
wouldn't you set the repeatCount to 1?

If your GIF can play multiple times through (repeatCount = -1), then I
believe the only way you can track its frames is to poll it, with a
frequency that slightly exceeds its frame delay.  Try running a loop while
the GIF is playing, maybe something like:

# GIF WITH 10 MS FRAME DELAY

on mouseUp
set the repeatCount of img "myGif" to -1
trackPlayback
end mouseUp

on trackPlayback
if the currentFrame of img "myGif" > (the frameCount of img "myGif" - 1)
then
   set the repeatCount of img "myGif" to 0
   set the currentFrame of img "myGif" to the frameCount of img "myGif"
-- just to be sure
   exit trackPlayback
end if
send "trackPlayback" to me in 8 millisecs
end trackPlayback


Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design



On 2/10/16, 12:06 PM, "use-livecode on behalf of Ray"
<use-livecode-boun...@lists.runrev.com on behalf of r...@linkit.com> wrote:


It would also be helpful if a message was sent each time a new frame is
displayed.  We could trap for those messages, count them, and go from there.

On 2/10/2016 2:48 PM, Sannyasin Brahmanathaswami wrote:

  I have a similar need.


  Seems we can set the repeatCount, but I don¹t see a way to test for
³currentLoop²

  Theoretically we need something like ‹ where I am making up an unknown prop
called ³currentLoop":

  if (the currentFrame of img "myGif" = the frameCount of img ³myGif²) AND \
  (the currentLoop of img ³myGif" = the repeatCount of img ³myGif")

  then

  answer ³Ok I am indeed done²

  end if

  On February 10, 2016 at 9:29:57 AM, Ray
(r...@linkit.com(mailto:r...@linkit.com)) wrote:


  Thanks Scott, but if you've set the RepeatCount to more than 1 and it's
  looping through the frames, twice for example, isn't there a possibility
  you'll get the CurrentFrame the same as the FrameCount too early?


___
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: When is a GIF Finished Playing?

2016-02-10 Thread Ray
Bernd - thanks for this idea.  Yes, it's a little sticky but if nothing 
else comes along I might be able to massage it somewhat.


On 2/10/2016 3:46 PM, BNig wrote:

Hi Ray,

not pretty but seems to work:


local sGifName
local sLastFrame
local sRepeatTimesFrames
local sCount

on mouseUp
put "myGif" into sGifName
put the currentFrame of img sGifName into sLastFrame
put 7 into tRepeatCount
put tRepeatCount * the frameCount of img sGifName into sRepeatTimesFrames
put 0 into sCount
put the milliseconds into sMS
set the repeatCount of img sGifName to tRepeatCount
send "checkGifAnimation" to me in 0 milliseconds
end mouseUp

on checkGifAnimation
if "checkGifAnimation" is in the pendingMessages then exit
checkGifAnimation
if the optionKey is down then exit checkGifAnimation -- just a precaution
put the currentFrame of img sGifName into tCurrFrame
if tCurrFrame <> sLastFrame then
   add 1 to sCount
   put tCurrFrame into sLastFrame
   if sCount >= sRepeatTimesFrames then
  answer "Animation Stopped"
  exit checkGifAnimation
   end if
end if
send "checkGifAnimation" to me in 40 milliseconds -- 40 ms seems to be
plenty
end checkGifAnimation


Kind regards
Bernd



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Motion-Graphic-in-LiveCode-tp4682250p4701009.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: When is a GIF Finished Playing?

2016-02-10 Thread Ray
BR - thanks for filing this report.  I guess we'll see if any of the LC 
team have time to accommodate this.


On 2/10/2016 4:39 PM, Sannyasin Brahmanathaswami wrote:

These methods work, of course, but surprisely “horsey” for something that 
should be easy.

Assuming that the engineers are not following this thread, or at least not 
jumping in with solutions.

I added this enhancement request.

http://quality.livecode.com/show_bug.cgi?id=16907 - We need a way to check of a 
looping Animated Gif is finished playing 
(edit<http://quality.livecode.com/show_bug.cgi?id=16907#>)

If there *is* a simple way, under the engine hood, to get the 
currentRepeatLoop, I guess the mothership crew will tell us.

BR



On February 10, 2016 at 11:28:35 AM, Ray 
(r...@linkit.com<mailto:r...@linkit.com>) wrote:

Hi Scott - In my case I let my users decide how many times the GIF
cycles, so it more than likely will be more than once through, but not
infinitely as in -1. I like your second option, below, but how are you
getting the GIF's frame delay? Did I miss that Livecode property somewhere?
___
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: When is a GIF Finished Playing?

2016-02-10 Thread Ray
Guys - thanks for this input.  I'm going to experiment with 'rolling my 
own' GIF player as suggested.  I guess I was just looking for an easy 
way out.  There's a lot of time based events happening simultaneously in 
the project I'm working on so I'm already relying heavily on 'send' 
commands to get around Livecode's single thread environment.  I also 
have code which detects when end users interrupt a sequence of time 
based events so there's one more thing to code for, but it shouldn't be 
too hard.


Thanks again,

Ray

On 2/10/2016 5:59 PM, J. Landman Gay wrote:
I had to manage gif playback manually once. It worked well to just set 
the currentframe repeatedly, ignoring auto-playback entirely. That way 
you can keep track of how many cycles you've done and you can control 
the speed of playback by changing the "send in time" frequency. You 
always know what frame you're on because the script sets it.


I didn't bother to load individual images, just setting the 
currentframe worked okay.


On 2/10/2016 4:00 PM, Scott Rossi wrote:

Nope, you just have to "know"  :-)

-HH makes a good point that I forgot about: if you control the playback
yourself, setting the GIF's currentFrame every so many millisecs, you'll
always know which frame you're on in the GIF.  This will work for most
GIFs, but can mess up playback of GIFs that use varying frame delays 
since

timing will differ from how the GIF was originally authored.






___
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: Does user have network connection?

2016-01-10 Thread Ray

What if Google is out of business :)

On 1/9/2016 5:24 PM, John Dixon wrote:

on mouseUp
put "http://www.google.com; into tURL
put URL tURL into tempVar
end mouseUp

if the variable tempVar is empty then there is no internet connection


Date: Sat, 9 Jan 2016 13:55:56 -0800
From: bod...@bodinetraininggames.com
To: use-revolut...@lists.runrev.com
Subject: Does user have network connection?

For desktop standalones, is there a function or constant that will tell me if
the user has an Internet connection or not? (Can't find one searching the
dictionary.)

Happy new year!
Tom B.




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Does-user-have-network-connection-tp4700051.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: LC app not displaying correctly on iPhone

2016-01-06 Thread Ray
What is the default-5...@2x.png file and where does it go?  Are these 
simply the files you specify in the Standalone Application settings?


Would you happen to have a link to any lessons on this?  I've Googled it 
and looked for it in the Livecode dictionary and I'm coming up empty handed.


On 1/6/2016 1:05 PM, Colin Holgate wrote:

Exact fit is rarely what you would want to do, it will distort the card area to 
fit the screen size.

The black bars are because you didn’t include the default-5...@2x.png file.



On Jan 6, 2016, at 9:44 AM, Richard Miller  wrote:

I am testing a LC iPhone app on my iPad and iPhone 6S plus. I'm setting the 
fullscreenmode to "exactFit". The app displays perfectly on the iPad, but there 
is black space above and below the app on the iPhone. Nothing is cut off; it's just that 
the app is not filling the iPhone screen. I get the same result in the simulator, even 
when I set it to iPhone 6 or 5S.

Any suggestions? Building this with OS 10.11.2, LC 7.1, and Xcode 6.4.

Thanks
Richard Miller
___
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: Scrolling Smoothly through Large Scripts

2015-12-24 Thread Ray
Peter - thanks for the idea.  I've tried it along with a few variations 
on it but unfortunately to no avail.  I can see it getting trapped but 
for some reason my script editor window always jumps about 5 or 6 lines 
when I scroll one notch using the mouse wheel.  Any ideas?  I'm 
experimenting with a script window of about 3000 lines.


On 12/24/2015 1:08 PM, Peter M. Brigham wrote:

Try this (untested). Put the following into a frontscript. Watch for 
email-induced linebreaks.

on rawkeydown n
if not (the name of the selectedfield contains "revNewScriptEditor") then 
pass rawkeydown
if the optionkey is down then pass rawkeydown
--  use optionkey to return to usual scrolling, for scanning through long 
scripts
put the long id of the selectedfield into sFld
put the textheight of sFld into txtHt
put the scroll of sFld into oldScr
switch n
   case "65308" -- up
  set the scroll of sFld to oldScr + txtHt
  break
   case "65309" -- down
  set the scroll of sFld to oldScr - txtHt
  break
   default
  pass rawkeydown
end switch
end rawkeydown

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig

On Dec 24, 2015, at 11:59 AM, Ray wrote:


Seasons Greetings on Christmas Eve!

Does anybody know how to scroll just one line per mouse-wheel movement through 
the script editor window?

I typically view several thousand lines at a time.  Each push of the little 
scroll wheel on my mouse produces an abrupt 'jerk' of 10 or 15 lines.  It's 
really hard on the eyes by the end of the day.

Ideally scrolling would be totally smooth without even jerking one line at a 
time, but one line at a time is better than a random group at a time causing me 
to re-orient myself.

Many 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


Scrolling Smoothly through Large Scripts

2015-12-24 Thread Ray

Seasons Greetings on Christmas Eve!

Does anybody know how to scroll just one line per mouse-wheel movement 
through the script editor window?


I typically view several thousand lines at a time.  Each push of the 
little scroll wheel on my mouse produces an abrupt 'jerk' of 10 or 15 
lines.  It's really hard on the eyes by the end of the day.


Ideally scrolling would be totally smooth without even jerking one line 
at a time, but one line at a time is better than a random group at a 
time causing me to re-orient myself.


Many 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


Re: Stacks Losing their Size and Location

2015-12-17 Thread Ray
Paul this is working out very well.  Actually, both of these ideas work 
equally well.  Thanks!


On 12/17/2015 9:00 AM, Paul Dupuis wrote:

On 12/16/2015 8:05 PM, Ray wrote:

Paul - excellent idea and thanks for this suggestion.  There's just
one pitfall in my situation.  I'm doing this:

put url serverStackPath into stackData
open file localStackPath for binary write
write stackData to file localStackPath
close file localStackPath

I've now created the 'virgin' stack but the rect it should be is
stored as a property in it.  So the problem is the next line:

put the LastRect of stack localStackPath into stacksLastRect

will effectively open the stack, thus assigning the templateStack's
rectangle to it before I get a chance to change the rect of the
templateStack.

What do you think?

As an aside, you could probably shorten the above to:

  put url serverStackPath into url ("binfile:") -- copy
stack from server to local storage

then I would do a variant of what Phil suggested, namely open the local
stack invisible, fetch the custom property "LastRect", set the stack's
rect to be what you want it to be, then save the stack. Or follow Phil's
suggested and open from the server invisibly, set the size, and save.



___
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: Stacks Losing their Size and Location

2015-12-16 Thread Ray
Thanks Scott - I was just going to add that I can NOT repeat this on my 
laptop which is also running Livecode 7.0.5 and Windows 8.1 so there's 
obviously something going on with my desktop 8.1 system.


If anybody has any ideas please share them.  Sorry for the false alarm 
regarding Livecode.


On 12/16/2015 3:13 PM, Scott Rossi wrote:

You might want to check with a more recent version to confirm since 7.0.5
is several versions old (the LC guys announced 7.1.1 today).

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 12/16/15, 12:02 PM, "use-livecode on behalf of Ray"
<use-livecode-boun...@lists.runrev.com on behalf of r...@linkit.com> wrote:


I've been wrestling with this in 7.0.5 for a while.  Here it is
distilled and the simplest way to repeat it:

on mouseUp
answer the rect of this stack
set the decorations of this stack to empty
answer the rect of this stack -- we're
fine here (same rect)
set the decorations of this stack to default -- we're
suddenly all over the place
answer the rect of this stack
-- totally different rect and dimmensions
end mouseUp

Setting the decorations to default not only changes the location of the
stack, it also changes the stack's width and height to some new random
size.

As I mentioned, this is the "distilled" version.  This also happens when
downloading a stack from a remote server.  Simply opening it changes the
width and/or height.

An additional issue is I'm also unable to return the stack's width,
height or location after this random resizing occurs unless I send
commands later or in an idle handler which calls them after everything
has settled back down.

Does anybody know if this is a reported bug?

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


Stacks Losing their Size and Location

2015-12-16 Thread Ray
I've been wrestling with this in 7.0.5 for a while.  Here it is 
distilled and the simplest way to repeat it:


on mouseUp
   answer the rect of this stack
   set the decorations of this stack to empty
   answer the rect of this stack -- we're 
fine here (same rect)
   set the decorations of this stack to default -- we're 
suddenly all over the place
   answer the rect of this stack   
-- totally different rect and dimmensions

end mouseUp

Setting the decorations to default not only changes the location of the 
stack, it also changes the stack's width and height to some new random size.


As I mentioned, this is the "distilled" version.  This also happens when 
downloading a stack from a remote server.  Simply opening it changes the 
width and/or height.


An additional issue is I'm also unable to return the stack's width, 
height or location after this random resizing occurs unless I send 
commands later or in an idle handler which calls them after everything 
has settled back down.


Does anybody know if this is a reported bug?

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


Re: Stacks Losing their Size and Location

2015-12-16 Thread Ray
Scott thanks again.  I just uninstalled 7.0.5 and installed 7.1.1 and 
resolved this issue.  I might have also been able to resolve it 
re-installing 7.0.5.


I should have tried this on another system first.  I thought mine was 
pretty stable but I guess things can creep in from time to time.


Thanks,

Ray

On 12/16/2015 3:13 PM, Scott Rossi wrote:

You might want to check with a more recent version to confirm since 7.0.5
is several versions old (the LC guys announced 7.1.1 today).

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 12/16/15, 12:02 PM, "use-livecode on behalf of Ray"
<use-livecode-boun...@lists.runrev.com on behalf of r...@linkit.com> wrote:


I've been wrestling with this in 7.0.5 for a while.  Here it is
distilled and the simplest way to repeat it:

on mouseUp
answer the rect of this stack
set the decorations of this stack to empty
answer the rect of this stack -- we're
fine here (same rect)
set the decorations of this stack to default -- we're
suddenly all over the place
answer the rect of this stack
-- totally different rect and dimmensions
end mouseUp

Setting the decorations to default not only changes the location of the
stack, it also changes the stack's width and height to some new random
size.

As I mentioned, this is the "distilled" version.  This also happens when
downloading a stack from a remote server.  Simply opening it changes the
width and/or height.

An additional issue is I'm also unable to return the stack's width,
height or location after this random resizing occurs unless I send
commands later or in an idle handler which calls them after everything
has settled back down.

Does anybody know if this is a reported bug?

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


Re: Stacks Losing their Size and Location

2015-12-16 Thread Ray
Bob - interesting situation.  I work with two monitors, also, but they' 
always connected so I haven't experienced this.


On a related note however, I've discovered that reading a stack's data 
on a remote server and then recreating the stack on my local, populating 
it with the data I just read, effectively recreates the stack.  Fine and 
dandy except that the stack's dimensions and location are set to 
whatever Livecode's default is for creating a new main stack.


So does anybody know how to set the default new stack size Livecode will 
use the next time a new stack is created, either by the menu choice or 
by simply opening a new disk file, writing to it and closing it?


On 12/16/2015 7:26 PM, Bob Sneidar wrote:

By which I mean even palettes.

Bob S


On Dec 16, 2015, at 15:01 , Bob Sneidar 
> wrote:

and I mean ALL WINDOWS in LC are unresponsive!

___
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: Stacks Losing their Size and Location

2015-12-16 Thread Ray
Paul - excellent idea and thanks for this suggestion.  There's just one 
pitfall in my situation.  I'm doing this:


   put url serverStackPath into stackData
   open file localStackPath for binary write
   write stackData to file localStackPath
   close file localStackPath

I've now created the 'virgin' stack but the rect it should be is stored 
as a property in it.  So the problem is the next line:


   put the LastRect of stack localStackPath into stacksLastRect

will effectively open the stack, thus assigning the templateStack's 
rectangle to it before I get a chance to change the rect of the 
templateStack.


What do you think?

On 12/16/2015 7:54 PM, Paul Dupuis wrote:

On 12/16/2015 7:40 PM, Ray wrote:

So does anybody know how to set the default new stack size Livecode
will use the next time a new stack is created, either by the menu
choice or by simply opening a new disk file, writing to it and closing
it?

See the entry for "templateStack" in the dictionary.

___
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: Search and Replace in Script Editor: Cannot invoke "Replace All"

2015-09-29 Thread Ray
The options mentioned below work for me, but for some reason every time 
I choose "Current Tab" in the Look In pull-down, for example, I get a 
slightly annoying dialog window which displays my choice "Current Tab" 
which I have to dismiss.  I saw and agree with the post on etiquette 
yesterday but I believe this question would fall under this same subject 
matter.  Does anybody else experience this unnecessary dialog?


On 9/29/15 2:12 AM, Dick Kriesel wrote:

Expected behavior “Replace All” button should be enabled after the find runs

What happened: it remains dimmed


Aloha, BR.

"Change all" requires "Look in: Current Tab" or "Look in: All Tabs" for me.

Do those options work for you?

— 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

Re: What's everyone working on this month? (September 2015 edition)

2015-09-29 Thread Ray
This is the first time I've seen a thread like this.  It's a great idea 
for all of us to see what others are doing.


I'm refining a suite of tools I've been working on with a partner for 
several years.  The tools allow users to import PDF's of children's 
books (think "Green Eggs and Ham"), trace areas of the images and create 
hot spots which play audio files, animations, highlighters for text as 
it's read, go to other pages or URL's, draw on screen, facilitate 
drag/drop of images, etc.  After adding all this interaction there's an 
export button which converts the book to HTML5 and uploads it to one of 
our servers for children to view it in any browser.  The latest addition 
is Android and iOS apps for those users who prefer apps instead of 
browsers on tablets.


On 9/28/15 2:09 PM, Peter TB Brett wrote:

Hi all,

I'm really interested to hear about what you're working on at the 
moment.  The community always seems to have a huge, exciting and 
varied range of projects going on, and it's great to hear how people 
are using LiveCode for work, for hobbies, for learning or for play!




I'll start:

1. I've been working on the HTML5 engine.  For the last couple of 
weeks, I've been focussed on getting LiveCode Builder (i.e. widgets) 
working in HTML5, and it's been an often rather frustrating business, 
because it's really hard to debug asm.js code running in the browser!  
Every time I think I've nailed the last bug, another one jumps out of 
the woodwork.  However, I'm feeling hopeful that by the time of the 
Global Jam next week, everyone will be able to use widgets in the 
browser.  And after that, commercial HTML5...


2. I've added a new test framework to the repository that lets us 
write script-only test stacks and run them automatically for every 
proposed change.  Now I need to get contributors to write tests!




What have you been working on?

 Peter




___
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


Sleep Wake Switch

2015-09-28 Thread Ray
Has anybody ever written any code which taps into the sleep/wake switch 
on either an Android or iOS phone?  I'd like to know if that's possible.


___
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: Importing a Snapshot from a window off screen

2015-09-18 Thread Ray
Paul - once again thanks for this insight.  I'd thought I'd let you know 
the following script which groups everything on the card, gets a 
snapshot /of the group/, and then ungroups everything, is working well.


on importGroupSnapshot snapName,myRect
   repeat with C=1 to number of controls
  set the selected of control C to true
   end repeat
   group
   import snapshot from rectangle myRect of last grp
   set the name of last img to snapName
   select last group
   ungroup
   select empty
   choose the browse tool
end importGroupSnapshot

Thanks again!

On 9/18/15 11:37 AM, Paul Hibbert wrote:

Ray,

Importing a snapshot from rect uses the computer’s graphic card to generate the 
snapshot image, whereas, importing a snapshot from an object (group, card, 
stack etc.) allows the LC engine to generate the snapshot image.

I’m travelling right now so can’t test so easy, but I’m sure if you can drop 
the ‘from rect’ you should see an improvement.

Paul



On 18 Sep 2015, at 08:32, Ray <r...@linkit.com> wrote:

Greetings - Has anybody had any success importing a snapshot from a stack's 
window which is offscreen?

I'm looping through every card in a stack to import a snapshot using something 
like:

   import snapshot from rect myRect of window myWinId

This causes a lot of annoying screen flicker so I'd like to place the stack's 
window off screen, do the importing and then return it on screen.  But doing so 
gives me blank images for the snapshots.

Any suggestions?

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

Re: Importing a Snapshot from a window off screen

2015-09-18 Thread Ray
Good point Richard. I had tried importing from the stack which didn't 
work so I [wrongly] assumed it also would not work from the card.  But 
it does!  That's even easier.


On 9/18/15 3:21 PM, Richard Gaskin wrote:

Ray wrote:

Paul - once again thanks for this insight.  I'd thought I'd let you know
the following script which groups everything on the card, gets a
snapshot /of the group/, and then ungroups everything, is working well.

on importGroupSnapshot snapName,myRect
repeat with C=1 to number of controls
   set the selected of control C to true
end repeat
group
import snapshot from rectangle myRect of last grp
set the name of last img to snapName
select last group
ungroup
select empty
choose the browse tool
end importGroupSnapshot


Unless you need the group for other purposes, you can use the card 
object directly.





___
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


Importing a Snapshot from a window off screen

2015-09-18 Thread Ray
Greetings - Has anybody had any success importing a snapshot from a 
stack's window which is offscreen?


I'm looping through every card in a stack to import a snapshot using 
something like:


   import snapshot from rect myRect of window myWinId

This causes a lot of annoying screen flicker so I'd like to place the 
stack's window off screen, do the importing and then return it on 
screen.  But doing so gives me blank images for the snapshots.


Any suggestions?

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


Re: Importing a Snapshot from a window off screen

2015-09-18 Thread Ray

Ah haaa!  so that's what's going on.  I'll give it a try.  Many thanks!

On 9/18/15 11:37 AM, Paul Hibbert wrote:

Ray,

Importing a snapshot from rect uses the computer’s graphic card to generate the 
snapshot image, whereas, importing a snapshot from an object (group, card, 
stack etc.) allows the LC engine to generate the snapshot image.

I’m travelling right now so can’t test so easy, but I’m sure if you can drop 
the ‘from rect’ you should see an improvement.

Paul



On 18 Sep 2015, at 08:32, Ray <r...@linkit.com> wrote:

Greetings - Has anybody had any success importing a snapshot from a stack's 
window which is offscreen?

I'm looping through every card in a stack to import a snapshot using something 
like:

   import snapshot from rect myRect of window myWinId

This causes a lot of annoying screen flicker so I'd like to place the stack's 
window off screen, do the importing and then return it on screen.  But doing so 
gives me blank images for the snapshots.

Any suggestions?

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

Nice to Meet You!

2015-08-17 Thread Ray
My wife and I are in Edinburgh over the weekend just to see Scotland's 
beautiful capital city.  On our way to the airport today we to stopped 
by Livecode's office.  I would have been happy just to say hello to 
Heather, probably the only staff member who might remember me from a 
conference years ago, but Ian spent five minutes or so and introduced me 
to the staff both upstairs and down.  It was a real kick to meet 
Livecode's staff and see everybody working, especially Fraser who gave 
me a quick peek at his large monitor full of code which will become the 
much anticipated HTML5 release.


For nearly two decades I've posted questions, bugs, and other issues on 
this site.  Today's my opportunity to just say thanks to the Livecode 
team.  It's really a great product.


Nice to meet you!

___
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: Nice to Meet You!

2015-08-17 Thread Ray Horsley
I know - but we sure enjoyed the weekend.
On Aug 17, 2015 9:54 PM, Mark Wieder mwie...@ahsoftware.net wrote:

 On 08/17/2015 05:44 AM, Ray wrote:

 My wife and I are in Edinburgh over the weekend just to see Scotland's
 beautiful capital city.


 OMG! You're in Edinburgh during festival month and you're only staying for
 a weekend?

 --
  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


Re: Multiple Stacks on Mobile

2015-07-29 Thread Ray
Eric - that might work, but only if the part of the screen which 
transitions with the visual effect does not overlap the part which 
remains stationary (the rect).  In my case they do overlap so the 
snapshot idea, I believe, is the best.


Thanks

On 7/28/15 8:04 PM, Eric Corbett wrote:

Would it be helpful to use lock screen for visual effect in rect tRect?

If the controls you want to leave are in a header for instance, tRect would be 
0,bottom of header,width of cd,bottom of cd.

-E

On Jul 28, 2015, at 10:53 AM, Ray r...@linkit.com wrote:


Understood, but then I'm still left with how to use the built-in visual effects 
while hiding one group and showing another and still leave the stationary 
fields out of the transition.

On 7/28/15 6:10 PM, Dr. Hawkins wrote:

On Tue, Jul 28, 2015 at 9:01 AM, Ray r...@linkit.com wrote:


Dr. Hawkins also suggested the groups idea which I can try, although now
that I think about it that might be a little complicated since it's my
users, not me, who populate each card with objects.

That should not be a problem--you can paste, etc. to groups in the same way
as cards, and there is the start editing group sizzle to let them
populate the group.




___
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


Multiple Stacks on Mobile

2015-07-28 Thread Ray
As far as I know, it's not possible to display two stacks simultaneously 
on either Android or iOS.  Does anybody have any suggestions for a work 
around to this?


In my case I have a stack with multiple cards which transition with 
visual effects as users go from card to card.  I'd like to keep this 
look while at the same time displaying in front of it another, fixed, 
video game style 'heads-up' stack on screen using the window mask property.


Thanks in advance for any ideas!

___
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: Multiple Stacks on Mobile

2015-07-28 Thread Ray
Scott - the main issue is the second one you've mentioned, below, 
although it would be more accurate to say 'using transitions behind a 
fixed foreground'.  I'd like for the fixed foreground to be transparent, 
hence the introduction of the custom window shape idea.


Dr. Hawkins also suggested the groups idea which I can try, although now 
that I think about it that might be a little complicated since it's my 
users, not me, who populate each card with objects.  I'm also 
considering snapshots of the entire screen and transitioning from one 
PNG to the other while maintaining the same fixed group of objects in 
the foreground.


On 7/28/15 4:52 PM, Scott Rossi wrote:

What's the main issue you're trying to solve?  A custom window shape or
using transitions in front of a fixed background?

AFAIK, you can't use the windowShape property on mobile stacks.  But you
might achieve the effect of one stack in front of another by moving your
card-based content into groups, and showing/hiding groups on a single card
(with the card acting as the background stack).  You can apply the same
transitions used when navigating between cards to showing/hiding groups.

However, the above might not be necessary.  You also might be able to
change your background stack into a background object that appears behind
all cards in your foreground stack.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 7:51 AM, Ray r...@linkit.com wrote:


As far as I know, it's not possible to display two stacks simultaneously
on either Android or iOS.  Does anybody have any suggestions for a work
around to this?

In my case I have a stack with multiple cards which transition with
visual effects as users go from card to card.  I'd like to keep this
look while at the same time displaying in front of it another, fixed,
video game style 'heads-up' stack on screen using the window mask
property.

Thanks in advance for any ideas!

___
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: Multiple Stacks on Mobile

2015-07-28 Thread Ray
Interesting...  So is the idea that if cards become groups, I can then 
display group after group instead of card after card, but still 
unlocking the screen with visual effects each time, while maintaining a 
second 'fixed' group on top?


On 7/28/15 4:46 PM, Dr. Hawkins wrote:

On Tue, Jul 28, 2015 at 7:51 AM, Ray r...@linkit.com wrote:


As far as I know, it's not possible to display two stacks simultaneously
on either Android or iOS.  Does anybody have any suggestions for a work
around to this?


My thinking at the moment as I ponder a tablet version is to use groups.

I cleverly created floating stacks for controls that follow the user from
datapoint to datapoint.  I *think* I can largely change that to a group . .
.





___
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: Multiple Stacks on Mobile

2015-07-28 Thread Ray

Richard - many thanks.  I'll take a look.

On 7/28/15 5:00 PM, Richard Gaskin wrote:

Ray wrote:

 Interesting...  So is the idea that if cards become groups, I
 can then display group after group instead of card after card,
 but still unlocking the screen with visual effects each time,
 while maintaining a second 'fixed' group on top?

A long time ago I had to make several set of nested groups and found 
it painful to do, so I made Pane Reliever, which lets you build a 
stack and then it gathers up the controls from each card and makes a 
group for each card, nested within a master group that can be easily 
copied-and-pasted wherever needed:

http://fourthworld.net/revnet/stacks/4W_PaneReliever.mc

I haven't even looked at it in years so I have no idea if it even 
works in recent versions of LC, but feel free to modify it however you 
like if it seems useful at all.





___
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: Multiple Stacks on Mobile

2015-07-28 Thread Ray

I'm currently using this:
   lock screen for visual effect
   go next card
   unlock screen with visual effect push right fast

Works great, but it's the whole card.  I'd like to maintain a few 
transparent fields and images in a fixed way in front of this so the 
whole transition is happening behind these objects, much like a 
'heads-up' in a video game which shows how much ammunition you have left.


I, too, doubt the move command would work well on under-powered mobile 
devices.  I'm kind of leaning toward something like this:
   hide the objects I want to remain stationary and get a snapshot of 
the both the current and destination cards

   re-show the objects I want to remain stationary
   lock screen for visual effect
   hide the snapshot of the current card, show the snapshot of the 
destination card

   unlock screen with visual effect push right fast
   copy the objects I want to remain stationary to the destination card
   go to the destination card
   delete both snapshots

What do you think?


On 7/28/15 5:14 PM, Scott Rossi wrote:

I think I see what you're trying to do, and if I understand correctly, you
can't do it using built-intransitions.  You can restrict transitions
WITHIN a specified rect or object, but not outside (in this case, the
background).

What transition are you using -- one of the motion-based options like push
or scroll?  If yes, one solution could be to use the move command or
something like AnimationEngine to physically move background groups left
and right (or up and down).  But since we're talking about the entire
width/height of the card, that might be a lot of screen to update, which
could bog down on an underpowered device.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 9:01 AM, Ray r...@linkit.com wrote:


Scott - the main issue is the second one you've mentioned, below,
although it would be more accurate to say 'using transitions behind a
fixed foreground'.  I'd like for the fixed foreground to be transparent,
hence the introduction of the custom window shape idea.

Dr. Hawkins also suggested the groups idea which I can try, although now
that I think about it that might be a little complicated since it's my
users, not me, who populate each card with objects.  I'm also
considering snapshots of the entire screen and transitioning from one
PNG to the other while maintaining the same fixed group of objects in
the foreground.

On 7/28/15 4:52 PM, Scott Rossi wrote:

What's the main issue you're trying to solve?  A custom window shape or
using transitions in front of a fixed background?

AFAIK, you can't use the windowShape property on mobile stacks.  But you
might achieve the effect of one stack in front of another by moving your
card-based content into groups, and showing/hiding groups on a single
card
(with the card acting as the background stack).  You can apply the same
transitions used when navigating between cards to showing/hiding groups.

However, the above might not be necessary.  You also might be able to
change your background stack into a background object that appears
behind
all cards in your foreground stack.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 7:51 AM, Ray r...@linkit.com wrote:


As far as I know, it's not possible to display two stacks
simultaneously
on either Android or iOS.  Does anybody have any suggestions for a work
around to this?

In my case I have a stack with multiple cards which transition with
visual effects as users go from card to card.  I'd like to keep this
look while at the same time displaying in front of it another, fixed,
video game style 'heads-up' stack on screen using the window mask
property.

Thanks in advance for any ideas!

___
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

Re: Multiple Stacks on Mobile

2015-07-28 Thread Ray
Understood, but then I'm still left with how to use the built-in visual 
effects while hiding one group and showing another and still leave the 
stationary fields out of the transition.


On 7/28/15 6:10 PM, Dr. Hawkins wrote:

On Tue, Jul 28, 2015 at 9:01 AM, Ray r...@linkit.com wrote:


Dr. Hawkins also suggested the groups idea which I can try, although now
that I think about it that might be a little complicated since it's my
users, not me, who populate each card with objects.


That should not be a problem--you can paste, etc. to groups in the same way
as cards, and there is the start editing group sizzle to let them
populate the group.





___
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: Multiple Stacks on Mobile

2015-07-28 Thread Ray
Scott - I'm experimenting with this now and not having a whole lot of 
success, mainly due to the limitation you've mentioned here.  I was 
hoping I could hide and show images instead of going from card to card.  
That might leave a field on screen independent of the transition, but I 
was wrong.  You're right.  You can't use a built-in motion transition 
and keep an object on the card independent of it.  I'm not hopeful about 
the browser idea on mobile so I have to give this some thought.  I guess 
I can experiment with the move command.  Wouldn't it be nice if I could 
just display a stack as a floating palette on mobile!


On 7/28/15 5:59 PM, Scott Rossi wrote:

If you're planning to hide the stationary objects during the transition,
that would work, but otherwise, I don't think so.  You can't use a
built-in motion transition and keep objects (real or virtual) in a fixed
location on the card.

One thing that came to mind as another option is the updated browser
control.  I *think* the new version might allow layering with other
LiveCode objects, but I'm not sure.  If yes, then that could be an option
since you could place a browser on the first layer of the card to display
background images, and use Javascript to do some nice transitions behind
objects in the foreground.  How well this would work on mobile, if it does
at all, I have no idea.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 9:37 AM, Ray r...@linkit.com wrote:


I'm currently using this:
lock screen for visual effect
go next card
unlock screen with visual effect push right fast

Works great, but it's the whole card.  I'd like to maintain a few
transparent fields and images in a fixed way in front of this so the
whole transition is happening behind these objects, much like a
'heads-up' in a video game which shows how much ammunition you have left.

I, too, doubt the move command would work well on under-powered mobile
devices.  I'm kind of leaning toward something like this:
hide the objects I want to remain stationary and get a snapshot of
the both the current and destination cards
re-show the objects I want to remain stationary
lock screen for visual effect
hide the snapshot of the current card, show the snapshot of the
destination card
unlock screen with visual effect push right fast
copy the objects I want to remain stationary to the destination card
go to the destination card
delete both snapshots

What do you think?


On 7/28/15 5:14 PM, Scott Rossi wrote:

I think I see what you're trying to do, and if I understand correctly,
you
can't do it using built-intransitions.  You can restrict transitions
WITHIN a specified rect or object, but not outside (in this case, the
background).

What transition are you using -- one of the motion-based options like
push
or scroll?  If yes, one solution could be to use the move command or
something like AnimationEngine to physically move background groups left
and right (or up and down).  But since we're talking about the entire
width/height of the card, that might be a lot of screen to update, which
could bog down on an underpowered device.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 9:01 AM, Ray r...@linkit.com wrote:


Scott - the main issue is the second one you've mentioned, below,
although it would be more accurate to say 'using transitions behind a
fixed foreground'.  I'd like for the fixed foreground to be
transparent,
hence the introduction of the custom window shape idea.

Dr. Hawkins also suggested the groups idea which I can try, although
now
that I think about it that might be a little complicated since it's my
users, not me, who populate each card with objects.  I'm also
considering snapshots of the entire screen and transitioning from one
PNG to the other while maintaining the same fixed group of objects in
the foreground.

On 7/28/15 4:52 PM, Scott Rossi wrote:

What's the main issue you're trying to solve?  A custom window shape
or
using transitions in front of a fixed background?

AFAIK, you can't use the windowShape property on mobile stacks.  But
you
might achieve the effect of one stack in front of another by moving
your
card-based content into groups, and showing/hiding groups on a single
card
(with the card acting as the background stack).  You can apply the
same
transitions used when navigating between cards to showing/hiding
groups.

However, the above might not be necessary.  You also might be able to
change your background stack into a background object that appears
behind
all cards in your foreground stack.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 7/28/15, 7:51 AM, Ray r...@linkit.com wrote:


As far as I know, it's not possible to display two stacks
simultaneously
on either Android or iOS.  Does anybody have any suggestions for a
work
around to this?

In my case I have a stack with multiple cards which transition

Letter Box

2015-07-16 Thread Ray
I'd love to control letterbox as a setting for fullScreenMode on mobile, 
set how wide the margins are, specify a color for them instead of black 
and maybe even using an image for the margins instead of a solid color.


Does anybody have any experience with this?

___
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


Custom Ask File Dialogs

2015-07-11 Thread Ray

Greetings,

I'd like to solicit three things from my users in one window.  The main 
thing is a new file name and location.  I normally use ask file for 
this, but that only solicits a file name and location.  It does not let 
me solicit the other two things.  I then have to present a second dialog 
with some check boxes and radio buttons to solicit the other two pieces 
of info from my users.


Does anybody know of a way to duplicate Livecode's Ask File dialog 
window and customize it?  I suppose I could build up my own Ask File 
dialog window from scratch but it would be a lot of work and I'm not 
sure how I would include things like Favorites and the many different 
views the Ask File dialog window has.


In my research so far I've experimented unsuccessfully with the sheet 
command.  I've also set the systemFileSelector property to true in 
order to use Livecode's built-in dialog box.  I'm just not sure where to 
go to duplicate it so I can customize it.


Much appreciated,

Ray Horsley
LinkIt! Software

___
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


  1   2   3   4   5   6   7   8   >