Re: Swipe gesture script on datagrid

2021-01-18 Thread Phil Davis via use-livecode
Would the dgProp["left swipe control"] of grp "yourDG" help? At least 
that might let you change the default trash can to some other control 
(maybe to a group that contains your 2 buttons?). If you get that far, 
maybe the message path of your 2 buttons would go through the DG 
template row behavior script. I don't know for sure but that would be my 
first guess.


Phil Davis


On 1/18/21 10:28 PM, Ludovic THEBAULT via use-livecode wrote:

Hello,

How edit the script of a swipe gesture control ?
I want to add two buttons to the right swipe control, it’s ok for appearance 
but I cannot find where to edit the script.

Is it even possible?

PS : i have datagrid helper plugin 2.5.

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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Is there a way to manually trigger GC?

2021-01-16 Thread Phil Davis via use-livecode

Hi Tom,

Does hasMemory() have any effect on available memory, or does it truly 
just report the state of things?


I wonder if there is some shell command that might help?

Phil Davis



On 1/16/21 11:31 AM, Tom Glod via use-livecode wrote:

Hi Folks,

I'm finding my application does a nice job to unload data from memory, but
it takes a while for that to happen.  When the initial load of the
application occurs, the memory consumption is quite high if there is lots
of data to be loaded (1 GB+).

But after a while, the used ram drops down to under 100 mb as the
application run in the background, after which the application swaps is
only the data I am accessing.

Can I trigger that memory release manually? (Maybe its another mechanism
and not GC?!)

TIA


Tom Glod
Founder & Developer
MakeShyft R.D.A (www.makeshyft.com)
Mobile:647.562.9411
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: DG outcomes on desktop vs mobile

2020-10-23 Thread Phil Davis via use-livecode

Well, I'm feeling pretty dumb about now. It's the architecture, stupid!

I overlooked the fact that, unlike on desktop systems, my mobile app 
doesn't automagically have access to the test files that reside in the 
app's dev environment on my Mac. During startup on the iPad, the app has 
to populate its [Documents] subfolders with test files stored in the app 
bundle.


It's my first mobile app. At least there's that. And I can pretty much 
guarantee I'll never again overlook the need to do this!


So that part of the app is working now. Thanks for the great ideas, 
which will be useful when I stumble again -


Phil


On 10/23/20 3:06 PM, Bob Sneidar via use-livecode wrote:

I got into the habit of setting the dgdata to empty before populating it 
because I ran into issues where my own code set the dgdata to something not an 
array, and this seems to bork the data grid. I think it was an empty array, or 
an empty record. This didn’t show up as a blank line however, the data 
displayed correctly, but the data grid became unresponsive. It didn’t show up 
in the text view of the property inspector either. I had to put the dgtext into 
the msg and then the blank line showed up.

Bob S


On Oct 23, 2020, at 5:19 AM, Andrew at MidWest Coast Media via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

This happened to me, twice, in a project I just launched. I was in crunch so 
didn’t have time to properly document but something happened where the DG 
wasn’t loading. I could take the same dgData or dgText and load it to another 
DG fine. Being on mobile made this harder to debug because even with Remote 
Debugger I would still have to compile and launch to the simulator each time I 
tried a tweak.

Because I was up against a deadline and since I wasted several hours trying to 
troubleshoot I just replaced the DG with a brand new: everything worked. Didn’t 
even bother to troubleshoot the 2nd time it happened, just immediately made a 
new DG and moved on.

Not a definitive answer to your question but an acknowledgement of your problem.

—Andrew Bell

I'm building an iPad app that reads a bunch of files into an array and
then sets the dgData of a form DG to that array. The array is
well-formed for DG use. After setting the dgData of the DG, the result
is empty. Only one problem: the DG now contains no data. (I also tried
setting the dgText of the DG to a flat version of the same data and got
the same outcome.)

I can then create another array from custom property data and set the
dgData of the same form DG to that array and it works.

On the desktop, however, the same DG loading process never fails.

The data being loaded is all text - nothing esoteric.

Does anyone have any ideas how I can find & fix the problem(s)? Or have
you run into this before?

Thank you -
Phil Davis

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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: DG outcomes on desktop vs mobile

2020-10-23 Thread Phil Davis via use-livecode
All the files are in a 'Students' subfolder of the app's Documents 
folder, and the path reflects that. However, your question is making me 
go through the handling of data with a fine-tooth comb, so that may 
result in something.


Thanks Jacque -
Phil


On 10/23/20 11:22 AM, J. Landman Gay via use-livecode wrote:

What is the path you use to get the files?

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On October 23, 2020 12:26:34 PM Phil Davis via use-livecode 
 wrote:



That's a good question. On desktop, the array variable is full of data.
On the iPad it's apparently empty. I'll drill down further and see
what's going on.

Thanks for the idea.
Phil


On 10/23/20 1:03 AM, JeeJeeStudio via use-livecode wrote:

What do you see when you answer the data you set the dgdata to? Does it
show the values?

Op vr 23 okt. 2020 08:44 schreef Phil Davis via use-livecode <
use-livecode@lists.runrev.com>:


I'm building an iPad app that reads a bunch of files into an array and
then sets the dgData of a form DG to that array. The array is
well-formed for DG use. After setting the dgData of the DG, the result
is empty. Only one problem: the DG now contains no data. (I also tried
setting the dgText of the DG to a flat version of the same data and 
got

the same outcome.)

I can then create another array from custom property data and set the
dgData of the same form DG to that array and it works.

On the desktop, however, the same DG loading process never fails.

The data being loaded is all text - nothing esoteric.

Does anyone have any ideas how I can find & fix the problem(s)? Or 
have

you run into this before?

Thank you -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: DG outcomes on desktop vs mobile

2020-10-23 Thread Phil Davis via use-livecode
That's a good question. On desktop, the array variable is full of data. 
On the iPad it's apparently empty. I'll drill down further and see 
what's going on.


Thanks for the idea.
Phil


On 10/23/20 1:03 AM, JeeJeeStudio via use-livecode wrote:

What do you see when you answer the data you set the dgdata to? Does it
show the values?

Op vr 23 okt. 2020 08:44 schreef Phil Davis via use-livecode <
use-livecode@lists.runrev.com>:


I'm building an iPad app that reads a bunch of files into an array and
then sets the dgData of a form DG to that array. The array is
well-formed for DG use. After setting the dgData of the DG, the result
is empty. Only one problem: the DG now contains no data. (I also tried
setting the dgText of the DG to a flat version of the same data and got
the same outcome.)

I can then create another array from custom property data and set the
dgData of the same form DG to that array and it works.

On the desktop, however, the same DG loading process never fails.

The data being loaded is all text - nothing esoteric.

Does anyone have any ideas how I can find & fix the problem(s)? Or have
you run into this before?

Thank you -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: DG outcomes on desktop vs mobile

2020-10-23 Thread Phil Davis via use-livecode

Thanks Andrew - I think I'll try this for the same reasons you did.

Phil


On 10/23/20 5:19 AM, Andrew at MidWest Coast Media via use-livecode wrote:

This happened to me, twice, in a project I just launched. I was in crunch so 
didn’t have time to properly document but something happened where the DG 
wasn’t loading. I could take the same dgData or dgText and load it to another 
DG fine. Being on mobile made this harder to debug because even with Remote 
Debugger I would still have to compile and launch to the simulator each time I 
tried a tweak.

Because I was up against a deadline and since I wasted several hours trying to 
troubleshoot I just replaced the DG with a brand new: everything worked. Didn’t 
even bother to troubleshoot the 2nd time it happened, just immediately made a 
new DG and moved on.

Not a definitive answer to your question but an acknowledgement of your problem.

—Andrew Bell


I'm building an iPad app that reads a bunch of files into an array and
then sets the dgData of a form DG to that array. The array is
well-formed for DG use. After setting the dgData of the DG, the result
is empty. Only one problem: the DG now contains no data. (I also tried
setting the dgText of the DG to a flat version of the same data and got
the same outcome.)

I can then create another array from custom property data and set the
dgData of the same form DG to that array and it works.

On the desktop, however, the same DG loading process never fails.

The data being loaded is all text - nothing esoteric.

Does anyone have any ideas how I can find & fix the problem(s)? Or have
you run into this before?

Thank you -
Phil Davis


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


--
Phil Davis
503-307-4363


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


DG outcomes on desktop vs mobile

2020-10-23 Thread Phil Davis via use-livecode
I'm building an iPad app that reads a bunch of files into an array and 
then sets the dgData of a form DG to that array. The array is 
well-formed for DG use. After setting the dgData of the DG, the result 
is empty. Only one problem: the DG now contains no data. (I also tried 
setting the dgText of the DG to a flat version of the same data and got 
the same outcome.)


I can then create another array from custom property data and set the 
dgData of the same form DG to that array and it works.


On the desktop, however, the same DG loading process never fails.

The data being loaded is all text - nothing esoteric.

Does anyone have any ideas how I can find & fix the problem(s)? Or have 
you run into this before?


Thank you -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: The iOS "Files" folder

2020-10-13 Thread Phil Davis via use-livecode
On a related note, there is a "File Sharing" check box in the iOS > 
Requirements tab > Requirements and Restrictions section of the 
Standalone App settings. What does that do?


Thanks -
Phil Davis


On 10/13/20 9:19 AM, Andrew at MidWest Coast Media via use-livecode wrote:

It looks from the minimum documentation I have that you could do much the same 
with an image, but I have not tried it.

I use this in a (now abandoned) feature of an app to take a screenshot of the 
mobile stack and share the image. Switched to this after mergSocial stopped 
working when Apple made some core OS updates. The entire MergExt suite is 
extremely powerful and extremely under-documented.


put specialFolderPath("documents") & "/IndianaOnTap.png" into tFilePath
put the rect of this card into tRect
put the bottom of field "promoName" into tBottom
put item 1 of tRect & COMMA & item 2 of tRect & COMMA & item 3 of tRect & COMMA 
& tBottom into tExportRect
export snapshot from rect tExportRect of this card to file tFilePath as PNG
mergPopActivity "Indiana On Tap just hooked me up!",tFilePath,""


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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Modal stacks cpu usage

2020-10-01 Thread Phil Davis via use-livecode
Sorry Neville, I didn't read your email closely enough - you are 
obviously on the right track.


Phil


On 9/30/20 9:02 PM, Phil Davis via use-livecode wrote:
Another factor I discovered in times past (which may have been changed 
by now) that eats up CPU cycles is the "Default" button style. Do you 
possibly have one of those on your stack?


Phil Davis


On 9/30/20 7:30 PM, Neville Smythe via use-livecode wrote:

I have just noticed something curious.

I am running LiveCode 8.1 IDE 9.6.1 on a Mac Air 2020 quad core 
Catalina.


Typically LC cpu usage shows about 34%  (presumably of 1 core). When 
a modal stack is opened it immediately ramps up to 99% ; the fan 
kicks in, and if left for a while the OS boosts the kernel_task 
daemon which I have been told is a protection device to prevent 
overheating. This has the effect of very markedly slowing down all 
apps as they get less cpu time.


If the stack is opened in non-modal mode, cpu usage stays around 34% 
. I don’t understand why a modal stack should be a cpu hog, indeed it 
seems like a bug to me.


I have a suspicion the wait with messages command  may have the same 
effect on cpu performance, so it could be the culprit.






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

http://lists.runrev.com/mailman/listinfo/use-livecode




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Modal stacks cpu usage

2020-09-30 Thread Phil Davis via use-livecode
Another factor I discovered in times past (which may have been changed 
by now) that eats up CPU cycles is the "Default" button style. Do you 
possibly have one of those on your stack?


Phil Davis


On 9/30/20 7:30 PM, Neville Smythe via use-livecode wrote:

I have just noticed something curious.

I am running LiveCode 8.1 IDE 9.6.1 on a Mac Air 2020 quad core Catalina.

Typically LC cpu usage shows about 34%  (presumably of 1 core).  When a modal 
stack is opened it immediately ramps up to 99% ; the fan kicks in, and if left 
for a while the OS boosts the kernel_task daemon which I have been told is a 
protection device to prevent overheating. This has the effect of very markedly 
slowing down all apps as they get less cpu time.

If the stack is opened in non-modal mode, cpu usage stays around 34% . I don’t 
understand why a modal stack should be a cpu hog, indeed it seems like a bug to 
me.

I have a suspicion the wait with messages command  may have the same effect on 
cpu performance, so it could be the culprit.





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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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 Do You Get Filename / Image

2020-09-06 Thread Phil Davis via use-livecode
Maybe check the result after your 'put URL... into URL ...' statement. 
That might give you a hint about the problem.


Phil Davis


On 9/6/20 2:31 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

Looks like that does not  work

on mouseUp
local tImageName, tDestinationPath,tHolder
set the itemdelimiter to "/"
put (item -2 to -1  of the filename of img "slideImage") into tImageName

put   "_ForWebSite/"  into tDestinationPath

put tDestinationPath & tImageName into tHolder
-- put URL("binfile:" & the filename of img "slideImage"  ) into URL("binfile:" 
& tDestinationPath & tImageName)
put the filename of img "slideImage" into URL("binfile:" & tDestinationPath 
& tImageName)

end mouseUp


On 9/6/20, 8:08 AM, "use-livecode on behalf of Brian Milby via use-livecode" 
 wrote:

 Looks like you need to specify a full path for the source and destination.

 on mouseUp
local tImageName, tDestinationPath
set the itemdelimiter to "/"
put (item -1 of the filename of img 1 ) into tImageName
put item 1 to -2 of the filename of this stack & "/" into 
tDestinationPath
put URL("binfile:" & the filename of img 1  ) into URL("binfile:" & 
tDestinationPath & tImageName)
 end mouseUp


 On Sun, Sep 6, 2020 at 9:59 AM Sannyasin Brahmanathaswami via use-livecode 
<
 use-livecode@lists.runrev.com> wrote:

 > Maybe  it is aphasia...
 >
 > How do we get file from one location to another location
 >
 > on mouseUp
 >  local tRelativeURL
 >  -- repeat with x = 1 to (the number of cards of stack
 > “SlideShowSetUp”)
 >  --go card x
 > set the itemdelimiter to “/”
 >  put (the item -2 to -1 of the filename of img “slideimage” ) 
into
 > tRelativeURL
 > # this works is: there is a path
 > # 1-ellora/dsc1234.jpg
 >
 > # this does not work:
 >  put URL(“binfile:” & tRelativeURL ) into
 > URL(“binfile:_ForWebSite/” & tRelativeURL)
 >
 > put the filename of img “slideimage” into
 > URL(“binfile:_ForWebSite/” & tRelativeURL)
 >
 >  -- end repeat
 > end mouseUp
 >
 > ??
 >
 > Brahmanathaswami
 >
 >
 > ___
 > use-livecode mailing list
 > use-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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: tsnetGetFile() example using HTTP?

2020-07-18 Thread Phil Davis via use-livecode
Thanks Charles. I probably won't get all the way back into this until 
Monday, just FYI.


Also, HostM support has just given me an HTTPS tsnetGetFile download 
example stack. I tried it and my initial test worked! I still have some 
experimenting to do with it to find out which tsnetGetFile() settings 
are required for my case and which ones aren't, but the initial outcome 
is a great encouragement. (I'll be asking them if I can upload a mod of 
it to the livecodeshare site.)


Although I've been developing software since the 70s (and maybe because 
I have been), I still don't know my HTTP headers well at all. That 
spills over into not knowing exactly what tsnet settings to use in 
certain cases. I'm pretty sure that has been a large factor in my 
current challenge.


I'm using LC 9.6.0 on macOS 10.13.6 (my main dev machine) and up 
(Mojave, Catalina).


Thanks again -
Phil


On 7/18/20 5:10 AM, Charles Warwick via use-livecode wrote:

Hi Phil,

You can use the same command with HTTP, just make sure you set any HTTP headers 
accordingly (similar to tsNetGet).

As for the issues with FTP, which version of LC are you using?

Regards,

Charles


On 18 Jul 2020, at 6:48 pm, Phil Davis via use-livecode 
 wrote:

Hi Charles,

Thanks for the response. Yes, my app is doing what is shown in the lesson 
(using FTP) and it's generally successful as long as the files aren't too 
large. Are you saying I can probably just change the protocol to HTTP and it 
will likely work? I'll try it when I'm not so bleary-eyed (it's almost 2 AM 
here in the US Pacific Northwest).

Phil



On 7/18/20 12:54 AM, Charles Warwick via use-livecode wrote:
Hi Phil,

Does this lesson help you?

http://lessons.livecode.com/m/4071/l/853715-how-to-asynchronously-download-via-sftp-directly-to-a-file

It uses SFTP with tsNetGetFile, so while the protocol used is different, the 
concept is the same.

Regards,

Charles


On 18 Jul 2020, at 5:17 pm, Phil Davis via use-livecode 
 wrote:

Does anyone have an working example stack you're willing to share where 
'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to download a 
file? I have had limited success using FTP but it consistently fails (in my 
situation at least) when files are bigger than 200-300 MB (depending I guess on 
network traffic at that moment, or ???).

Today I started with the example described in the lesson:
http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet

The example uses HTTP via 'tsnetGet' to download the text of web pages into a variable, and then uses 
"put tData into url ("file:" )" to make the files. In my real-world 
situation I can't do that. My actual downloads are binary files that can be over 1 GB. I need to download 
them as files to the local disk, so for me 'tsnetGet' is out.

There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm turning 
to you (which I should have done earlier).

(Is there anywhere else I should look for examples? I did look on stackexchange 
and stackoverflow but no joy.)

Thanks for any and all responses.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: tsnetGetFile() example using HTTP?

2020-07-18 Thread Phil Davis via use-livecode

Hi Charles,

Thanks for the response. Yes, my app is doing what is shown in the 
lesson (using FTP) and it's generally successful as long as the files 
aren't too large. Are you saying I can probably just change the protocol 
to HTTP and it will likely work? I'll try it when I'm not so bleary-eyed 
(it's almost 2 AM here in the US Pacific Northwest).


Phil


On 7/18/20 12:54 AM, Charles Warwick via use-livecode wrote:

Hi Phil,

Does this lesson help you?

http://lessons.livecode.com/m/4071/l/853715-how-to-asynchronously-download-via-sftp-directly-to-a-file

It uses SFTP with tsNetGetFile, so while the protocol used is different, the 
concept is the same.

Regards,

Charles


On 18 Jul 2020, at 5:17 pm, Phil Davis via use-livecode 
 wrote:

Does anyone have an working example stack you're willing to share where 
'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to download a 
file? I have had limited success using FTP but it consistently fails (in my 
situation at least) when files are bigger than 200-300 MB (depending I guess on 
network traffic at that moment, or ???).

Today I started with the example described in the lesson:
http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet

The example uses HTTP via 'tsnetGet' to download the text of web pages into a variable, and then uses 
"put tData into url ("file:" )" to make the files. In my real-world 
situation I can't do that. My actual downloads are binary files that can be over 1 GB. I need to download 
them as files to the local disk, so for me 'tsnetGet' is out.

There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm turning 
to you (which I should have done earlier).

(Is there anywhere else I should look for examples? I did look on stackexchange 
and stackoverflow but no joy.)

Thanks for any and all responses.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


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


tsnetGetFile() example using HTTP?

2020-07-18 Thread Phil Davis via use-livecode
Does anyone have an working example stack you're willing to share where 
'tsnetGetFile' or 'tsnetGetFileSync' is using HTTP (or HTTPS) to 
download a file? I have had limited success using FTP but it 
consistently fails (in my situation at least) when files are bigger than 
200-300 MB (depending I guess on network traffic at that moment, or ???).


Today I started with the example described in the lesson:
http://lessons.livecode.com/m/4071/l/945907-how-to-download-multiple-files-in-the-background-with-tsnet

The example uses HTTP via 'tsnetGet' to download the text of web pages 
into a variable, and then uses "put tData into url ("file:" )" to 
make the files. In my real-world situation I can't do that. My actual 
downloads are binary files that can be over 1 GB. I need to download 
them as files to the local disk, so for me 'tsnetGet' is out.


There are no tsnet examples on http://livecodeshare.runrev.com/ so I'm 
turning to you (which I should have done earlier).


(Is there anywhere else I should look for examples? I did look on 
stackexchange and stackoverflow but no joy.)


Thanks for any and all responses.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Drawing a blank on simple code...

2020-05-19 Thread Phil Davis via use-livecode

You're almost there Paul!

On 5/19/20 2:18 PM, Paul Dupuis via use-livecode wrote:
I have a set of custom properties in stack "X", a lot of which begin 
with "options_"


So I assume these are members of a customPropertySet, whose name I'll 
call "myOptions".




I want to loop through them and get the values, so I have:

  local tDisplayList
  put the customKeys of stack "X" into tProperties

To prevent the unintended, I would do this instead:
  put the customKeys["myOptions"] of stack "X" into tProperties


filter lines of tProperties with "options_*"
  if tProperties is empty then exit to top

  repeat for each line tLine in tProperties
    put the customKeys[tLine] of stack "X" into tProp

This should work:
    put the myOptions[tLine] of stack "X" into tProp


    -- do stuff here
  end repeat


When I walk through this code in the debugger, I see that tProperties 
gets a list of the names of all custom properties in the "X" stack. YEA!


Then I see that that list correctly gets filtered to just those that 
begin with "options_" YEA!


Then I see the in the repeat loop the variable "tLine" get the name of 
each "options" property in succession. YEA!


PROBLEM: put the customKeys[tLine] of stack "X" into tProp DOES NOT 
fetch the value of the indicated property into tProp


I know this is simple - and I have coded it before - but I can seem to 
find my past code in prior projects and obviously am missing something.


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

http://lists.runrev.com/mailman/listinfo/use-livecode


Best -
Phil Davis


___
use-livecode mailing list
use-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: Open printing to pdf

2020-05-12 Thread Phil Davis via use-livecode
What happens if you remove the space from the file path? Does it still 
behave the same?


Phil Davis


On 5/12/20 4:23 PM, GEORGE WOOD via use-livecode wrote:

Here is on example of what I tried:

on mouseup

put “⁩/Desktop⁩/test files/Test.pdf” into temp

open printing to pdf temp

print cd 1 from (topleft of cd 1) to (bottomright of cd 1)

close printing

put the result

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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: on-rev server upgrade-related problems

2020-05-08 Thread Phil Davis via use-livecode
Thanks so much for your interest in this bug, Matthias! I'm just getting 
back into it now, catching up on bug comments posted since yesterday.


Phil

On 5/8/20 5:28 AM, matthias rebbe via use-livecode wrote:

Phil,

i´ve answered already to the bug report, but maybe this is also of interest for 
the others.

As i have also accoun ton the same On-Revi  as you and did some test.
I am sure it´s a tsNet timeout problem.

tsNET has several default timeouts. The defaults are 30, 0, 30, 6, 30, 
1000

  The fifth one defines "the time period in seconds that is used to calculate 
whether or not the transfer has fallen below the low speed limit set by 
pLowSpeedLimit."
It can be set either to 0 to disable the time out or to any other value.

In my first test my LC Server script returned just a 5MB file back to the 
client. That worked.

I then added a "wait 45 seconds"  to the script before outputting/returning 5MB 
file to the client. I got exactly the same error message than youor your  clients,

"tsneterr: (28) Operation too slow. Less than 1000 bytes/sec transferred the last 30 
seconds"
This makes sense as because of the "wait 45 seconds" we exceeded the default 
time-out value of 30.


I then added the following line to the client script.

tsNetSetTimeouts 30, 0, 30, 6, 120, 1000
With it i´ve changed the timeout to 120 seconds.

After adding that line, the 5 MB file was received again by the client w/o the 
tsNet error.

So setting the timeout either to a higher value or to 0 in the client script 
should solve it. I am not sure, but i assume setting it to 0 is not recommended.

Hope this helps.

Matthias

-
Matthias Rebbe
Life Is Too Short For Boring Code


Am 07.05.2020 um 20:35 schrieb Phil Davis via use-livecode 
:

Thank you all for so many great questions and responses! I don't have time to 
give a comprehensive response right now but (1) I'll whittle away at it and (2) 
all your comments renew my hope that a solution is out there waiting for me to 
find it.

Quick responses:

- I too would start by going back to LC 6.6.x on the server if I could, but 
apparently the recent server upgrades - new hardware running LC 9.5.1 - are not 
backward compatible. That's what I'm told at least.

- The LC client app is POSTing a request to an LC CGI system on an on-rev server. 
The server system assembles a data packet (normally an encoded array), encrypts 
& encodes it and writes it back to the client. The packet can be any size up to 
maybe a megabyte or two, but that would be pretty big. Normally the packet size is 
no more than a few hundred KB.

Thanks again -
Phil


On 5/7/20 7:29 AM, Ralph DiMola via use-livecode wrote:

Phil,

I had a problem with a GET request with a url encoded url in a parameter
after the upgrade. There are new security rules. I changed it to a POST and
it then worked. I am changing my apps to use a POST. Robin had lifted the
new security rule for me temporarily until all the apps are updated. One
other thing, the new MySQL server is now Maria DB. It is functionally the
same but I noticed if you have a column with no default value but is
required and the field is not in the SQL update then it throws an error.
MySQL did not do this.

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 Phil Davis via use-livecode
Sent: Thursday, May 07, 2020 3:18 AM
To: How to use LiveCode
Cc: Phil Davis
Subject: on-rev server upgrade-related problems

Has anyone had part or all of an on-rev server-based system stop working
since the server upgrades a month or so ago?

My client has an on-rev.com-based training system. Training delivery is via
web browser, and that part continues to work. But there are several desktop
apps that provide training development, management and real-time monitoring.
All of those apps became non-functional as soon as the upgrades were done,
and remain so. I haven't been able to figure out how to restore
functionality.

Robin in on-rev support has been very helpful, but we still don't have a
solution. This is the bug report:

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

I wouldn't wish this on anyone, but in a way I'm hoping it isn't just us.

Thanks -
Phil Davis

___
use-livecode mailing list
use-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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-liv

Re: on-rev server upgrade-related problems

2020-05-07 Thread Phil Davis via use-livecode
Thank you all for so many great questions and responses! I don't have 
time to give a comprehensive response right now but (1) I'll whittle 
away at it and (2) all your comments renew my hope that a solution is 
out there waiting for me to find it.


Quick responses:

- I too would start by going back to LC 6.6.x on the server if I could, 
but apparently the recent server upgrades - new hardware running LC 
9.5.1 - are not backward compatible. That's what I'm told at least.


- The LC client app is POSTing a request to an LC CGI system on an 
on-rev server. The server system assembles a data packet (normally an 
encoded array), encrypts & encodes it and writes it back to the client. 
The packet can be any size up to maybe a megabyte or two, but that would 
be pretty big. Normally the packet size is no more than a few hundred KB.


Thanks again -
Phil


On 5/7/20 7:29 AM, Ralph DiMola via use-livecode wrote:

Phil,

I had a problem with a GET request with a url encoded url in a parameter
after the upgrade. There are new security rules. I changed it to a POST and
it then worked. I am changing my apps to use a POST. Robin had lifted the
new security rule for me temporarily until all the apps are updated. One
other thing, the new MySQL server is now Maria DB. It is functionally the
same but I noticed if you have a column with no default value but is
required and the field is not in the SQL update then it throws an error.
MySQL did not do this.

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 Phil Davis via use-livecode
Sent: Thursday, May 07, 2020 3:18 AM
To: How to use LiveCode
Cc: Phil Davis
Subject: on-rev server upgrade-related problems

Has anyone had part or all of an on-rev server-based system stop working
since the server upgrades a month or so ago?

My client has an on-rev.com-based training system. Training delivery is via
web browser, and that part continues to work. But there are several desktop
apps that provide training development, management and real-time monitoring.
All of those apps became non-functional as soon as the upgrades were done,
and remain so. I haven't been able to figure out how to restore
functionality.

Robin in on-rev support has been very helpful, but we still don't have a
solution. This is the bug report:

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

I wouldn't wish this on anyone, but in a way I'm hoping it isn't just us.

Thanks -
Phil Davis

___
use-livecode mailing list
use-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



--
Phil Davis
503-307-4363


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


on-rev server upgrade-related problems

2020-05-07 Thread Phil Davis via use-livecode
Has anyone had part or all of an on-rev server-based system stop working 
since the server upgrades a month or so ago?


My client has an on-rev.com-based training system. Training delivery is 
via web browser, and that part continues to work. But there are several 
desktop apps that provide training development, management and real-time 
monitoring. All of those apps became non-functional as soon as the 
upgrades were done, and remain so. I haven't been able to figure out how 
to restore functionality.


Robin in on-rev support has been very helpful, but we still don't have a 
solution. This is the bug report:


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

I wouldn't wish this on anyone, but in a way I'm hoping it isn't just us.

Thanks -
Phil Davis

___
use-livecode mailing list
use-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: sqLite delete memory database

2020-05-01 Thread Phil Davis via use-livecode
Is there an LC function that clears trash from memory? Does "hasMemory"? 
If not, it seems like that would be a nice feature.


Phil Davis


On 5/1/20 12:25 PM, Tom Glod via use-livecode wrote:

hmmmyou can try set the pragma to zero out flag (i am pretty sure there
is one) .. and drop all tables on close?

its strange that it does not 'delete' from memory.  Are we sure on
this?. is this dependent on the garbage collector in LC?





On Fri, May 1, 2020 at 7:14 AM JB via use-livecode <
use-livecode@lists.runrev.com> wrote:


I have been testing SQLite 3 using the command line interface and it
looks to me like SQLite is designed to securely delete the memory of
the database automatically after it closes the database.

I could be wrong but if you can’t read the memory it is probably already
securely deleted when the database was closed.

JB



On Apr 30, 2020, at 6:43 PM, Bob Sneidar via use-livecode <

use-livecode@lists.runrev.com> wrote:

I can create memory databases, but how do I delete it once created?

revdb_disconnect still leaves it in memory. revCloseDatabase is just a
synonym of revdb_disconnect.

Bob S


___
use-livecode mailing list
use-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





--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Learned my lesson

2020-04-17 Thread Phil Davis via use-livecode
I feel your pain! I switched to using "of me" or "of the owner of me" 
whenever possible which works very well in many/most cases, but 
sometimes it just isn't enough.


Phil Davis


On 4/17/20 6:41 PM, Bob Sneidar via use-livecode wrote:

I just spent 2 hours purging the detestable “this stack” from my entire list of 
projects. If you use substacks, if you hide and show stacks, this stack simply 
unreliable. Instead put this at the head of every script that needs to know 
what the parent stack is:

put getParentStack(the long id of me) into tParentStack

and have this in a library or active script somewhere:

function getParentCard pObjectID
put offset("card id", pObjectID) into tStartChar
put char tStartChar to -1 of pObjectID into tCardID
return tCardID
end getParentCard

function getParentStack pObjectID
put offset("stack ", pObjectID) into tStartChar
put char tStartChar to -1 of pObjectID into tParentStack
return tParentStack
end getParentStack

Now you will know ABSOLUTELY which stack you are in from any object on any 
card. And no, I’m not senile (much yet) I know I already posted this some time 
ago.

Bob S

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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Socket Help

2020-04-06 Thread Phil Davis via use-livecode

Hi Bob,

I'm realizing now that your system connects client and server via the 
internet. Mine connects them via LAN. Big security difference!


In another system I wrote that connects client & server over the 
internet, the server does this upon receiving a request:


   does a 'wait flag' (temp file) exist for this data source?
   - no:
  - is this an update request?
 - no: select/assemble data & put it
 - yes: set a 'wait flag', do the update, delete the wait
   flag, put the response
   - yes: put 'busy'  (client tries again in a few ticks, up to x
   attempts)

In the case of this system, the traffic is low enough so this approach 
has worked fine for years. In a higher volume system you might want to 
see if any other CGI transactions are in progress against the requested 
data source before you start changing data.


That's all I got.
I realize it probably isn't new news.

Phil



On 4/6/20 7:49 AM, Bob Sneidar via use-livecode wrote:

Hi Phil. Thanks for the reply.

I’m curious how this client server method handles multiple simultaneous 
connections? I had the idea of having a listener agent spawn an SQL Agent stack 
the first time a client connected, that would then listen on a random port. The 
listener agent would return the random port to the client which would then in 
the future communicate with the random SQL agent directly. A kind of passive 
connection if you will. I’m not sure all that is necessary though.

I kept waking up all night thinking of ways to implement the encryption so that 
even a person with time to decipher the method would not be able to use it in 
subsequent captures.

Of course, nothing is uncrackable, even Fort Knox, given the time, resources 
and resolve. The trick to encryption is to make the process of foreign 
decryption so tedious and time consuming that it isn’t worth the effort.

And of course the reward for the foreign agent has to be considered when 
determining the level of complexity. There is no hacker in the Ukraine poring 
over the encrypted packets of my SQL transactions to access my data, so I don’t 
think I need go to extreme measures! I simply need to be able to reassure the 
principles of my company that their data is secure in transit.

One more note, to secure passwords that I store in SQL, I encrypt those 
separately with a different key and seed before creating the SQL. That way, 
even if someone got physical access to the database, they couldn’t decipher the 
passwords.

Bob S

On Apr 5, 2020, at 11:25 PM, Phil Davis via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi Bob,

I created a client-server business system for a client some years ago. It too uses data 
encryption. What I did on the server side was prep the data for net transfer 
(base64Encode it as the final prep step, I think), then transfer length(data) & CR 
& data.

On the client side, the app reads from the socket for 1 line (which goes into a variable, 
say "X"), then read from socket for X bytes. This keeps it simple - no need for 
special terminators etc - and seems to always work.

Phil Davis

___
use-livecode mailing list
use-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: Socket Help

2020-04-06 Thread Phil Davis via use-livecode

Hi Bob,

I created a client-server business system for a client some years ago. 
It too uses data encryption. What I did on the server side was prep the 
data for net transfer (base64Encode it as the final prep step, I think), 
then transfer length(data) & CR & data.


On the client side, the app reads from the socket for 1 line (which goes 
into a variable, say "X"), then read from socket for X bytes. This keeps 
it simple - no need for special terminators etc - and seems to always work.


Phil Davis


On 4/5/20 12:51 PM, Bob Sneidar via use-livecode wrote:

Hi Kee. Thanks for the response.

I decided to go ahead and bypass the issue of the client and server being on 
the same device. I got my laptop out and created the server app there. I got it 
working as advertised.

[Technical stuff]
One thing I am doing is encrypting the data before sending it. The thing is, I 
needed a delimiter of some kind when reading the data back, because the data 
will be variable in length, and the end char will also be variable.

So what I did is I appended a termination character after the encrypted data 
before sending it, then stripped the termination on the server side before 
decrypting it. I do the same thing when sending data back. This has the effect 
of making any intercepted data in transit impossible to decrypt without knowing 
that there IS a terminator, what the terminator is, the encryption key and the 
seed! Even a brute force method would fail to decrypt the data.

I could get even fancier by sending two transmissions each way, the first being the 
randomized position and "poison pill" character that will be inserted into the 
encrypted data (itself encrypted), and a second the actual encrypted data. Even if the 
client and server stacks aren't password protected, there would be no way to anticipate 
what the poison pill character and position was.

I suppose I could use a web server with SSL certs, but first, I don’t know how, 
and second I would be adding the lag time for the web server to respond. Right 
now it's taking a little over 300 milliseconds for a simple string to return on 
a local area network

My goal is to create a client/server agent that I can securely send database 
queries to and get results back from.

Bob S


On Apr 5, 2020, at 11:55 AM, Kee Nethery via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Here’s how this should work.

Server has an IP and port number that it listens on. Client sends a packet from 
the same IP and some random port.

Computer routes the packet and it doesn’t have to send the packet out on the 
net. It goes out the client port and back in to the server port.

Server replies from its port to the client port (client is waiting for a reply).

Try talking to your server with a browser on your computer and see what the 
server response looks like.

Kee Nethery

On Apr 5, 2020, at 11:22 AM, Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi all.

I am creating a client/server socket based app and I am trying to develop both 
the client and server on the same workstation, and I am having difficulty. I 
*think* the issue is that the client and server cannot both be on the same 
system, but I’m not entirely sure. I’m asking the system to listen and also 
talk on the same port.

Anyone have any insight into this?

Bob S

___
use-livecode mailing list
use-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: The TopLevel Stack

2020-03-27 Thread Phil Davis via use-livecode

Hi Bob,

Is the first stack opened as 'toplevel' or in some other mode? That 
would make a difference.


Best -
Phil Davis


On 3/27/20 3:40 PM, Bob Sneidar via use-livecode wrote:

Hi all.

I’m having fits here. I have a stack that opens another stack invisible. It 
supposedly closes itself, then returns to the first stack.

At that point, it *should* be the topStack… BUT IT’S NOT! Subsequent commands 
like setting the text of a field fail with no such object!

How do I FORCE a stack to be the active stack?

Bob S

___
use-livecode mailing list
use-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: Invalid Image File / Original Image Size

2020-02-17 Thread Phil Davis via use-livecode

Hi Ralph,

Certainly Klaus's approach will work. Here is another that works.

As you know, image files have "signatures" in their headers to identify 
what kind of files they are:


   https://en.wikipedia.org/wiki/List_of_file_signatures
   (the "ISO 8859-1" column)


Once you know the signatures of the image file types you want to allow, 
you could do something like this:


on mouseUp
    answer file "Pick an image file:"
    if it is empty then exit to top

    answer isSupportedImage(it)
end mouseUp


function isSupportedImage pPath
    # Allow JPG, PNG and GIF images.

    put byte 1 to 12 of url ("binfile:" & pPath) into tHeader
    switch
    case "JFIF" is in tHeader
    case "PNG" is in tHeader
    case "GIF" is in tHeader
    return true
    break
    default
    return false
    break
    end switch
end isSupportedImage


I have used this approach in projects before and it seems to work reliably.

Phil Davis



On 2/17/20 1:08 PM, Ralph DiMola via use-livecode wrote:

What's the best way to know if I set the filename of an image control and
the file is either not an image or in an unsupported format? I'm getting
https links to unknown images so I check images before app deployment.

After resizing an image is there a way to know the original dimensions? Just
wondering? I now save the original x/y sizes in properties so I know them
after a resize.

Thanks

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


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



--
Phil Davis
503-307-4363

___
use-livecode mailing list
use-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 this PNG have transparency?

2020-01-27 Thread Phil Davis via use-livecode

I like it! Nice job.

Phil


On 1/27/20 8:21 AM, Bob Sneidar via use-livecode wrote:

Voila!

function pngIsTransparent pImageFile
if not (there is a file pImageFile) then return "ERROR: Invalid file path!"
set the filename of the templateImage to pImageFile
put numtochar(0) into tZero
return (tZero is in the alphaData of the templateImage) OR (tZero is in the 
maskData of the templateImage)
end pngIsTransparent

Another one for the masterLibrary

Bob S



On Jan 27, 2020, at 08:16 , Paul Dupuis via use-livecode 
 wrote:

You should be able to use 'the templateImage' (see dictionary), and numToChar 
probably should be numToByte

As in:

on mouseUp
answer file "Pick an image:"
if it is empty then exit to top
set the filename of the templateImage to it

put numToByte(0) into tZero
put (tZero is in the alphaData of the templateImage) OR (tZero is in the 
maskData of the templateImage)
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



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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 this PNG have transparency?

2020-01-24 Thread Phil Davis via use-livecode

Maybe this? It seems to work in my simple testing. Am I missing something?

on mouseUp
    answer file "Pick an image:"
    if it is empty then exit to top
    set the filename of img "my test" to it

    put numtochar(0) into tZero
    put (tZero is in the alphaData of img "my test") OR (tZero is in 
the maskData of img "my test")

end mouseUp

Phil


On 1/24/20 1:48 PM, Phil Davis via use-livecode wrote:
I usually make things harder than they need to be, so I'm asking: Is 
there a simple way my LC code can determine if a PNG image is 
completely opaque or not?


Thanks -
Phil



--
Phil Davis
503-307-4363


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


does this PNG have transparency?

2020-01-24 Thread Phil Davis via use-livecode
I usually make things harder than they need to be, so I'm asking: Is 
there a simple way my LC code can determine if a PNG image is completely 
opaque or not?


Thanks -
Phil

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: TIFF support in the past?

2020-01-24 Thread Phil Davis via use-livecode

Wow. How soon we (I) forget!
Phil


On 1/24/20 1:28 AM, Richmond Mathewson via use-livecode wrote:

http://runtime-revolution.278305.n4.nabble.com/LiveCode-Import-Tiff-td3432308.html

On Fri, Jan 24, 2020 at 10:43 AM Phil Davis via use-livecode <
use-livecode@lists.runrev.com> wrote:


Thank you Mark!
Phil


On 1/24/20 12:14 AM, Mark Waddingham via use-livecode wrote:

I think the player object would show tiff files back when it was QT

driven - the engine itself has never natively supported tiff.

Warmest Regards,

Mark

Sent from my iPhone


On 24 Jan 2020, at 08:01, Phil Davis via use-livecode <

use-livecode@lists.runrev.com> wrote:

I'm trying to find out if there was a time in the distant past when LC

supported the TIFF image format. I found some TIFF image assets in some
subfolders of a project from back then (maybe 10 or more years ago?) but
can't run a copy of LC from that era to find out.

Any memories?

Thanks -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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

--
Phil Davis
503-307-4363


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





--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: TIFF support in the past?

2020-01-24 Thread Phil Davis via use-livecode

Thank you Mark!
Phil


On 1/24/20 12:14 AM, Mark Waddingham via use-livecode wrote:

I think the player object would show tiff files back when it was QT driven - 
the engine itself has never natively supported tiff.

Warmest Regards,

Mark

Sent from my iPhone


On 24 Jan 2020, at 08:01, Phil Davis via use-livecode 
 wrote:

I'm trying to find out if there was a time in the distant past when LC 
supported the TIFF image format. I found some TIFF image assets in some 
subfolders of a project from back then (maybe 10 or more years ago?) but can't 
run a copy of LC from that era to find out.

Any memories?

Thanks -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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


--
Phil Davis
503-307-4363


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


TIFF support in the past?

2020-01-24 Thread Phil Davis via use-livecode
I'm trying to find out if there was a time in the distant past when LC 
supported the TIFF image format. I found some TIFF image assets in some 
subfolders of a project from back then (maybe 10 or more years ago?) but 
can't run a copy of LC from that era to find out.


Any memories?

Thanks -
Phil Davis

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: shell() and pdftotext

2020-01-12 Thread Phil Davis via use-livecode

To find the full path, this may work - open Terminal and type:

    which pdftotext

and it should display the path to the copy of pdftotext that the OS runs 
when you type the 'pdftotext' command.


Phil Davis


On 1/12/20 2:00 PM, Brian Milby via use-livecode wrote:

My guess is that shell can’t find your executable.  Try using full paths.

Thanks,
Brian
On Jan 12, 2020, 2:54 PM -0500, Hillen Richard via use-livecode 
, wrote:

Hello,

I want to extract .txt from a pdf-file using Livecode 9.5 on macOS Catalina.

Therefore I installed from http://www.xpdfreader.com/
the xpdf-tools-mac-4.02
and using the Terminal with „pdftotext /Users/hillen/Desktop/inter.pdf“
I get a clean text-file inter.txt. Wonderful!

So I hopefully wrote in Livecode:

——
put "/users/hillen/Desktop/inter.pdf" into fn
put "pdftotext " & fn into Kommando

if there is not a file fn then
answer „no SourceFile!"
exit to top
end if

get shell(quote & Kommando & quote)

answer it & return & the result
——

But extracting doesn´t work and I get the answer:

/bin/sh: line 1: pdftotext /users ……pdf: No such file or directory

and the result ist 127.



Typing to Terminal „pdftotext“ I get a List with command-options.

With
get shell(„pdftotext“) with and without quotes

I get the answer „/bin/sh: line 1: pdftotext: command not found“



What is wrong? May you please help?

Richard.
___
use-livecode mailing list
use-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


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Indy 9.5.0. Apple can't search for malware in LC Indy?

2019-11-05 Thread Phil Davis via use-livecode

On 11/5/19 12:26 PM, Paul Dupuis via use-livecode wrote:
I am sure it is possible. I just don't have the 
PHP/HTML/Javascript/whatever skills to do that.


Me neither. I do it either directly in a .lc server page, or else the 
.lc page starts using a stackfile that does it.


(fiddling around with different machines...)

It appears the $_SERVER[HTTP_USER_AGENT] server global might provide an 
adequate distinction between OSes on requesting machines. I just ran a 
'globals.lc' server page from 3 different Macs with different OS 
versions and got this info returned:


   $_SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Macintosh; Intel Mac OS X
   10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87
   Safari/537.36

   $_SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Macintosh; Intel Mac OS X
   10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70
   Safari/537.36

   $_SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (Macintosh; Intel Mac OS X
   10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1
   Safari/605.1.15

My server's globals.lc page looks like this on the inside:

   
   
   "
   after tOutput
    end repeat

    put tOutput
   ?>


   
   


Phil Davis




On 11/5/2019 12:02 PM, Phil Davis via use-livecode wrote:
On this issue, isn't it possible to let a web server detect the OS 
requesting the download? So the server can then do the picking and 
send the right version to the requestor?


Or maybe the info available to the server about the requesting OS 
isn't that detailed. Not sure. At least I'm sure I can use a single 
download link for an app's Mac and Windows installers.


Phil Davis



On 11/5/19 8:33 AM, Paul Dupuis via use-livecode wrote:
I'm not saying YOUR experience is invalid. I guess I am just saying 
we have really really really computer naive customers and Apple has 
gone and complicated things and it creates a support burden for us 
that we would not have had to expend resources addressing if Apple 
had not done this.


Apple has, and there is no going back, so it is what it is, but it 
is really really annoying! :-(




On 11/5/2019 11:23 AM, Bob Sneidar via use-livecode wrote:
But the installers for drivers and the installer you want to use 
are not different. And what else does anyone have to go on but 
their experiences, and other people's experiences? I need to tap 
into that resource! ;-)


Bob S


On Nov 5, 2019, at 08:18 , Paul Dupuis via use-livecode 
 wrote:


On 11/5/2019 10:41 AM, Bob Sneidar via use-livecode wrote:
First, your assumption that "it's one everyone is experiencing for 
any installer" is exactly that, an assumption based on your 
experiences.


The vast majority of our customers are computer novices and 
anything but the simplest of steps can cause them problems. Most 
do not know what version of macOS they run, nor how to tell what 
version they are running.


Second, I was not calling for RunRev to "fix" this. It is clearly 
Apple's inane drive for marketing a level or privacy and security 
that is mostly a gigantic lie that is the cause.


And thirdly, drivers are a bit different than research apps.


___
use-livecode mailing list
use-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




--
Phil Davis
503-307-4363

___
use-livecode mailing list
use-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: Indy 9.5.0. Apple can't search for malware in LC Indy?

2019-11-05 Thread Phil Davis via use-livecode
On this issue, isn't it possible to let a web server detect the OS 
requesting the download? So the server can then do the picking and send 
the right version to the requestor?


Or maybe the info available to the server about the requesting OS isn't 
that detailed. Not sure. At least I'm sure I can use a single download 
link for an app's Mac and Windows installers.


Phil Davis



On 11/5/19 8:33 AM, Paul Dupuis via use-livecode wrote:
I'm not saying YOUR experience is invalid. I guess I am just saying we 
have really really really computer naive customers and Apple has gone 
and complicated things and it creates a support burden for us that we 
would not have had to expend resources addressing if Apple had not 
done this.


Apple has, and there is no going back, so it is what it is, but it is 
really really annoying! :-(




On 11/5/2019 11:23 AM, Bob Sneidar via use-livecode wrote:
But the installers for drivers and the installer you want to use are 
not different. And what else does anyone have to go on but their 
experiences, and other people's experiences? I need to tap into that 
resource! ;-)


Bob S


On Nov 5, 2019, at 08:18 , Paul Dupuis via use-livecode 
 wrote:


On 11/5/2019 10:41 AM, Bob Sneidar via use-livecode wrote:
First, your assumption that "it's one everyone is experiencing for 
any installer" is exactly that, an assumption based on your 
experiences.


The vast majority of our customers are computer novices and anything 
but the simplest of steps can cause them problems. Most do not know 
what version of macOS they run, nor how to tell what version they 
are running.


Second, I was not calling for RunRev to "fix" this. It is clearly 
Apple's inane drive for marketing a level or privacy and security 
that is mostly a gigantic lie that is the cause.


And thirdly, drivers are a bit different than research apps.


___
use-livecode mailing list
use-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




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: server push to desktop client

2019-11-05 Thread Phil Davis via use-livecode

Thanks for sharing your insight Richard. Great food for thought.

Phil


On 11/5/19 12:29 AM, Richard Gaskin via use-livecode wrote:

Phil Davis wrote:

> I need to make a desktop app (Mac only for now) that receives pushed
> data from a LC server. I've never done this - all the desktop <->
> server interactions I've programmed have used the traditional client-
> server model. So I'm looking for approaches/tips/ideas from anyone
> who has experience with other approaches.

I'd stick with simple polling for this.  Anything else requires either 
opening a socket (with all the firewall/router changes needed to allow 
that), or creating a dependency on a separate process like push 
notifications, which would likely require LCB.


Polling can get the job done well enough, and is secure and requires 
no router changes or external dependencies.  And if down the road you 
find a convenient way to switch to something else you can change that 
part, but at least it lets you get it out the door now using reliable 
features and your existing skillset.



> And maybe I'm making it too hard. Can FTP watch a server folder, and
> detect and respond to the creation of a file in the folder? Maybe I
> could use a method like that, if that's a capability of FTP.

You could poll from the client using FTP, but compared to HTTP it's a 
noisy protocol, with many more steps internally.  The inefficiency of 
FTP is more than offset by its utility when ad hoc access to remote 
file stores are needed.  But when the goal is more specific, HTTP will 
often beat it for both efficiency and client implementation cost every 
time.


On the server, an LC Server script that reports any changes to a 
folder from the last time it was called would be straightforward to 
write, give you reliably consistent results*, and would run quickly.



* Years ago when I was monitoring folders with FTP I learned more than 
I cared to about FTP date representations.  They vary.  A lot.  By 
different rules, according to a vastly flexible set of config options. 
So you can never know which server will use month-and-day only up to a 
certain cutoff, and then one of several month-day-year options for 
anything older.  Sometimes the cuttoff is a month.  Sometimes it's the 
year break.  Other times it's a specific number of days.  "Hey man, 
it's all about flexibility!" In all cases it can mean a listing in 
which date representations take on at least two different formats.


Even if you just had LC Server return "the detailed files" at least 
you'd have solid consistency in the format of every file, every time.




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: server push to desktop client

2019-11-05 Thread Phil Davis via use-livecode

Thank you Kee! This is extremely helpful.
Phil


On 11/5/19 12:38 AM, Kee Nethery via use-livecode wrote:

Normal data flow is Mac app contacts a central server and sees if there is 
updated data to acquire. If yes, it acquires it.

This is the normal flow because of firewalls and ports.

For the server to really push data to a Mac client, the Mac client has to be a 
server, with a routable IP address / port. Most client machines are behind 
firewalls that allow them to initiate contact, but do not allow random external 
machines to contact them.

So the normal setup is, server has a dns entry on an IP address that anyone can 
reach from anywhere on the Internet. Server is listening on a single port for 
incoming connections.

Assuming the same data (updates) goes to each client, server has a text page 
containing a single integer. That integer is the number of the latest update. 
Client hits that web page periodically to see if its internal integer is 
different from the server. It’s a very quick exchange.

Client sees their internal integer isn’t the same. Let’s say client has 92 and 
server has 103.

Client then hits pages 93 to 103 to get all the updates. For example:

http://my.server.com/updates/93.txt
All the way to:
http://my.server.com/updates/103.txt

On the server side, you create update pages and increment the integer at 
something like:

http://my.server.com/updates/last.txt

The server is fast because it serves up static pages and the fastest page is 
last.txt because it’s only (in this example) three characters “103”.

I’m assuming all clients get the same data.

When each client gets unique data, you’ll probably have a database on the 
server and clients will do hits against the server to see if they have new data 
to gather, and if yes, they’ll do their query with their userid to gather their 
data.

  The trade off between server text pages and server database responses is one 
of those things you’ll need to figure out which is most efficient for you. 
Could be you ship a client that can do both and the very first hit to the 
server is a static page that tells the client “text” or “database” and then the 
client does the right thing. Could periodically check that page and perhaps you 
have a flag on it like “database always” that tells the client to stop 
checking, all updates forever will be the database update process.

But ... client pulls from the server because most servers cannot push through 
firewalls and routers an NAT servers to initiate first contact with a client.

Kee Nethery


On Nov 4, 2019, at 11:26 PM, Phil Davis via use-livecode 
 wrote:

I need to make a desktop app (Mac only for now) that receives pushed data from a LC 
server. I've never done this - all the desktop <-> server interactions I've 
programmed have used the traditional client-server model. So I'm looking for 
approaches/tips/ideas from anyone who has experience with other approaches.

I'm not sure what protocol to use.

And maybe I'm making it too hard. Can FTP watch a server folder, and detect and 
respond to the creation of a file in the folder? Maybe I could use a method 
like that, if that's a capability of FTP.

Thanks for any input you may offer.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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


--
Phil Davis
503-307-4363


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


server push to desktop client

2019-11-04 Thread Phil Davis via use-livecode
I need to make a desktop app (Mac only for now) that receives pushed 
data from a LC server. I've never done this - all the desktop <-> server 
interactions I've programmed have used the traditional client-server 
model. So I'm looking for approaches/tips/ideas from anyone who has 
experience with other approaches.


I'm not sure what protocol to use.

And maybe I'm making it too hard. Can FTP watch a server folder, and 
detect and respond to the creation of a file in the folder? Maybe I 
could use a method like that, if that's a capability of FTP.


Thanks for any input you may offer.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: identifying text chars in an image

2019-10-29 Thread Phil Davis via use-livecode
Thanks for your great ideas Hermann. In my next experiment I think I'll 
start by looking for any scrabble tile by looking for its [known] 
background color, and then work out to its edges. That should give me 
both the grid cell size and a starting point for discovering all cells 
in the grid.


Unless anyone knows of something simpler?

Thanks -
Phil



On 10/28/19 5:43 PM, hh via use-livecode wrote:

Phil D. wrote:
So maybe I should first be asking about detecting the grid
established by the scrabble letters.

You need some criteria to find the topleft of the grid and the
size of one letter: color/transparency/a marker(fixed image part)...
You could also use pattern recognition for that.

Then it's the easy part to get all possible letters by computing the
grid and crop (get from imageData) the grid elements by script.
Then doing the OCR for each single char.

If you need that for a standalone, then 'tesseract' with its huge
language packs is probably not appropriate and 'ocrad' could be
good enough for that.

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




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: identifying text chars in an image

2019-10-28 Thread Phil Davis via use-livecode
One thing I found is when I cropped my test image to include only one 
horizontal word, tesseract handled that fine. So... if I could detect 
the grid pattern in which all the letters are laid out, maybe I could 
feed the letters to an OCR tool one word or char at a time and get the 
results I'm looking for. That would also give me clear info about 
spatial relations between the letters, so I could group them correctly 
into words.


So maybe I should first be asking about detecting the grid established 
by the scrabble letters.


(It's actually Bananagrams letters. My nerdy grandkids like to use 
Scrabble letters when playing Bananagrams so they can see who gets high 
score.)


Thanks -
Phil


On 10/28/19 2:23 PM, Phil Davis via use-livecode wrote:
Thanks for the followup on this. I experimented some with tesseract 
and came to the same conclusion.


Since the values assigned to each character are standard wthin 
Scrabble, I don't really need to detect those tiny numerals. But the 
alpha chars are of course essential.


I believe there must be a way to get there. Thankfully no one is 
pressuring me to finish it, so I can explore.


Phil


On 10/28/19 1:57 PM, hh via use-livecode wrote:

After a second read I think it will be hard to find a service to do that
for you. And this is not doable using tesseract or similar from 
LiveCode:


AFAIK, no "ordinary" OCR software is able to detect and read horizontal
*and* vertical text and distinguish clearly between the board's "Score
text" and the "Scrabble letters". You (or your service) would have to
write an own "learning routine" for that.

E.g. the algorithm described here:
http://rasdasd.com/projects/Scrabble_Detector/Scrabble_Paper.pdf

There are also approaches for own specialized boards like here
https://github.com/eladj/ScrabbleOCR
You could try to use the java from there via LC Builder's FFI.


Phil D. wrote:
I want to [programmatically] take a picture of a Scrabble board and 
then

take from that image the characters displayed in it, and maintain the
organization of the text. In other words, I want to convert the text
displayed in the image to text strings.

Any ideas where I should start?

I would love to be able to do it in my app. However I'm not completely
against uploading the image to a service that would do it for me; I am
only mostly against 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






--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: identifying text chars in an image

2019-10-28 Thread Phil Davis via use-livecode
Thanks for the followup on this. I experimented some with tesseract and 
came to the same conclusion.


Since the values assigned to each character are standard wthin Scrabble, 
I don't really need to detect those tiny numerals. But the alpha chars 
are of course essential.


I believe there must be a way to get there. Thankfully no one is 
pressuring me to finish it, so I can explore.


Phil


On 10/28/19 1:57 PM, hh via use-livecode wrote:

After a second read I think it will be hard to find a service to do that
for you. And this is not doable using tesseract or similar from LiveCode:

AFAIK, no "ordinary" OCR software is able to detect and read horizontal
*and* vertical text and distinguish clearly between the board's "Score
text" and the "Scrabble letters". You (or your service) would have to
write an own "learning routine" for that.

E.g. the algorithm described here:
http://rasdasd.com/projects/Scrabble_Detector/Scrabble_Paper.pdf

There are also approaches for own specialized boards like here
https://github.com/eladj/ScrabbleOCR
You could try to use the java from there via LC Builder's FFI.


Phil D. wrote:
I want to [programmatically] take a picture of a Scrabble board and then
take from that image the characters displayed in it, and maintain the
organization of the text. In other words, I want to convert the text
displayed in the image to text strings.

Any ideas where I should start?

I would love to be able to do it in my app. However I'm not completely
against uploading the image to a service that would do it for me; I am
only mostly against 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




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: identifying text chars in an image

2019-10-28 Thread Phil Davis via use-livecode
Thanks Richmond and hh - really appreciate these ideas. I'll be looking 
into them.


Phil


On 10/28/19 7:26 AM, hh via use-livecode wrote:

There are also emscripten ports to javascript you could use via
a browser widget (and a CDN if online).

https://tesseract.projectnaptha.com
https://antimatter15.com/ocrad.js/demo.html

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




--
Phil Davis
503-307-4363


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


identifying text chars in an image

2019-10-28 Thread Phil Davis via use-livecode
I want to [programmatically] take a picture of a Scrabble board and then 
take from that image the characters displayed in it, and maintain the 
organization of the text. In other words, I want to convert the text 
displayed in the image to text strings.


Any ideas where I should start?

I would love to be able to do it in my app. However I'm not completely 
against uploading the image to a service that would do it for me; I am 
only mostly against it.


Thanks for any ideas to may have.

--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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 I find out what handler I am in?

2019-10-25 Thread Phil Davis via use-livecode

Tom, param(0) contains the name of the handler you're in.

on mouseUp
   put param(0)
end mouseUp

Would put into the message box:
    mouseUp


Phil Davis


On 10/25/19 10:00 AM, Tom Glod via use-livecode wrote:

Hey you guys, I have searched high and low and I am pretty sure the answer
is no , but I wanted to make sure before I did a feature request and a
workaround.

But is there a function that I can call inside a handler that will tell me
the name of the handler?

Just like the params() tells me the parameters of the current handler?



--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Possible solution to determine if default network has changed (MacOS only for now)

2019-10-22 Thread Phil Davis via use-livecode
I'm guessing you meant "route -v get default" ? Otherwise I don't get 
much back from the command.


Phil Davis


On 10/22/19 11:05 AM, Bob Sneidar via use-livecode wrote:

Hi all.

MacOS only for now.

I think I put together a way to tell if the default network has changed since 
the last time an internet connection took place. It's no good of course, just 
getting the IP address, as given an identical subnet, you have a 1 in 254 
change of getting the same IP address on a different network. We want to be 
absolutely certain.

Similarly, the gateway, subnet mask and DNS might also be identical. Finally, 
the only adapter we care about is the one that is being used as the default 
route to the internet or local resources. (there may be more than one active 
adapter, as in the Ethernet and Wireless adapters).

The trick is to get the MAC address of the router, then store it and compare it 
each time you attempt to communicate. Here's what I came up with. Feel free to 
chide me if I am overthinking this:

on mouseUp
put "route get default" into tShellCommand
put shell(tShellCommand) into tDefaultAdapter
put lineOffset("Interface: ", tDefaultAdapter) into tInterfaceLine

if tInterfaceLine = 0 then

   answer info "No default interface found!" as sheet
   exit mouseUp
end if

put word 2 of line tInterfaceLine of tDefaultAdapter into tDefaultInterface

put "ipconfig getpacket " & tDefaultInterface into tShellCommand
put shell(tShellCommand) into tInterfaceDetail
put lineOffset("router (ip_mult): ", tInterfaceDetail) into tRouterLine
put word 3 of line tRouterLine of tInterfaceDetail into tRouterAddress
put char 2 to -2 of tRouterAddress into tRouterAddress
put tRouterAddress
put "arp " & tRouterAddress into tShellCommand
put shell(tShellCommand) into tArpReply
put word 4 of tArpReply into tDefaultMACAddress
end mouseUp

Bob S


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




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Where LiveCode is Now

2019-10-03 Thread Phil Davis via use-livecode

Amen Bob!
Phil Davis


On 10/3/19 9:31 AM, Bob Sneidar via use-livecode wrote:

For my part I love what you guys do. As I've mentioned before, Livecode has 
upped my value to my employer, as they see that I am capable of more than what 
they hider me to do. It may even have been responsible for a couple raises in 
the recent past.

Also as I have mentioned before, I have never seen a company so responsive to 
it's users, and also so transparent. We have people *actually* involved in the 
development process come on list and tell us what they are doing and planning. 
Seriously, you guys do not get enough credit for how hard you work.

Bob S



On Oct 3, 2019, at 09:25 , Heather Laine via use-livecode 
 wrote:

Dear List Folks,

I'd like to reassure you, the team is anything but idle, and the fruits of 
their labours are coming your way. I don't wish to steal Pano's thunder, but 
you should look for an announcement on 9.0.5 tomorrow (all being well with the 
build, which is currently undergoing final checks. Probably I've just jinxed it 
by mentioning a release date, in direct contravention of my rules.) 9.0.5 has 
had a fix shoehorned into it for the nasty debugger crashing that was reported 
not long ago.

9.5.1 is well under way and shouldn't be long now, bringing the needed updates 
for iOS among other things. I'm not going to even hint at a release date of 
next week for this, its certain to cause a #fail.

9.6 is in progress with some nice new features and a first dp is not far off. 
Real Soon Now :).

Yes, it has taken a little longer than usual between releases. A major reason 
for this was the server move, which impacted our build bots and delayed all 
test builds. Frustrating, but necessary work, and thankfully that is all done 
now and everything is working smoothly again. One does not appreciate the full 
complexity of these build bots until one attempts to move them intact from one 
place to another.

The suggestion that all our efforts will remain with LCFM Native and never bear 
fruit for LiveCode itself is based on a misconception, an idea that somehow we 
are working on something other than LiveCode. We're not. Everything we are 
building for LCFM Native is built with LiveCode. We cannot do it without 
improving LiveCode. Those improvements will come back to the community (many 
already have). Hermann... its not an infinite effort. FileMaker is very much a 
finite set of code, with relatively slow changes.

I hope you will like 9.0.5, 9.5.1 and 9.6, we're looking forward to bringing 
them to you.

Best Regards,

Heather


Heather Laine
Customer Services Manager
LiveCode Ltd
www.livecode.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




--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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 and Sub Stacks

2019-09-25 Thread Phil Davis via use-livecode



On 9/25/19 7:43 AM, Sannyasin Brahmanathaswami via use-livecode wrote:

Related:

if you have this in the message box.

put the openstacks

you only get the

   1.  presently open binary stacks
   2.  any script only stack that you explicitly  have open in the IDE


Some more options:

put revLoadedStacks()
This returns a list of all [binary] stacks in memory, both main & sub, 
whether they are open or not.


put the mainStacks
Returns a list of all mainstacks in memory, including script-only 
stacks, whether open or not.




But, can you we a list of all stacks available to the message path "right now"

We can query the stack files, but they are included with stack, but not 
necessarily open.


And the stackFiles may list some stacks that no longer exist in those 
locations. ' The stackFiles of stack "myStack" ' is a user-supplied 
setting. It can get out of sync with reality pretty quickly as an app's 
folder tree changes. (but I guess you could script it to keep it current)


My $0.02 -
Phil Davis



Another say to put this is when doing a

start using "MyControls.livecodescript"

…later on, how do you query for all stacks "open" by "start using"

BR

Hi.
You probably mean script-only stacks.
Substacks are just stacks, but they live in the same file as the mainStack. It 
helps with organization, and when you save one, you save them all. You can only 
have one mainStack, but as many subStacks as you like.
For me, I have projects that use substacks for, say, data entry. The subStack 
is built just for that purpose.
When making a standalone, substacks are included in the final package.
Just practice a bit.
Craig
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis
503-307-4363


___
use-livecode mailing list
use-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: Audio Recording with cameracontrol

2019-09-20 Thread Phil Davis via use-livecode

Hi Dan,

I haven't used cameracontrol, but... In a Mac-only app I built for a 
client, I used the 'sox' commandline app for recording. It has been 
quite reliable now for several years.


Like so:


command audio_startRecording*
*    put  into sRecorderApp
    put  into sFilename

    put sRecorderApp \
  && "-q -d -r 22050 -b 16 -e signed -c 1" \
  && sFilename \
      into sCommand -- settings are for recording speech

    open process sCommand for neither
end audio_startRecording


command audio_stopRecording
    -- get the sox process ID
    filter shell("ps -A") with ("*" & sRecorderApp & "*") into tList
    put word 1 of tList into tPID

    -- end the sox process
    put shell("kill -s INT" && tPID) into sCommandStatus
    # Tells 'kill' to send SIGINT to the recorder app - equivalent to 
control-c in Terminal


    -- close the LC process
    put empty into tResult
    try
    close process sCommand
    put the result into tResult
    catch tErr
    put tErr into tResult
    end try

    -- return the filename
    return sFilename
end audio_stopRecording


I imagine there are other commandline apps that would work as well.

Hope this helps -
Phil Davis



On 9/20/19 2:27 PM, Dan Soneson via use-livecode wrote:

I am trying to update audio recording capabilities in LiveCode, now that we
soon won't be able to use QuickTime any longer, even on Macs. I've been
trying to use cameracontrol to do the recording, but have quickly run into
2 major bugs, I think - one an absolute showstopper:

I set the videoDevice to empty, so as to only record the audio. It seems I
am able to record audio only for 10 seconds or less. Once I go beyond 10
seconds the resulting file is unreadable, and simply doesn't play in the
player. Can anyone get a successful, playable audio recording longer than
10 seconds?

When I enable the video recording as well, I get a lovely video recording
with audio if the recording is 10 seconds or shorter. Once the video is
longer than 10 seconds, there is no audio at all but the video is still
lovely. So the file plays, but there is no audio.

Am I alone in experiencing these problems? Is there another way to do audio
recording, since we can no longer do "record sound" (since it is not
available for Windows, and is restricted to 32 bit applications on Mac)?

Platform: MacOS Mojave
LiveCode Business 9.04

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




--
Phil Davis
503-307-4363

___
use-livecode mailing list
use-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: Duplicate card and object command lc 9.0.4

2019-06-07 Thread Phil Davis via use-livecode

Hi Muaadh,

Try this:
Go to the card you want to duplicate and in the Message Box type "clone 
this card". It isn't exactly the answer to your question but it should 
give you the outcome you desire.


Phil Davis


On 6/7/19 11:15 AM, Muaadh Salih via use-livecode wrote:

Until now I was using LC 7.1..4 with very few ( solvable ) problems.
I installed the latest version (9.0.4) and noticed that  "Duplicate Card "
command , form either line command or menu click produced nothing . .
I know I can use copy and paste  but this requires reediting existing
stacks  with , sometime , unwanted problem.
This issue concerns "duplicate  Card" only . It works fine for duplicating
   other stack object.
I have removed old preference fines and this installation is a clean one.
but still can not duplicate card .
His this command being disabled in 9.0.4 ?
We are putting up a course module in "programming for humanities " degree
and want student to be confident on what they are using .
Thanks for the help

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




--
Phil Davis


___
use-livecode mailing list
use-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: Design questions...

2019-06-06 Thread Phil Davis via use-livecode

Hi Glen,

There are some screen resolution stats on the web that may be useful, at 
least for 'general public' app window sizes:


   https://en.wikipedia.org/wiki/Display_resolution

Phil Davis



On 6/6/19 6:47 AM, Glen Bojsza via use-livecode wrote:

Hello,

I was looking for input on the following design questions...I haven't done
anything for years so I am looking for other developers' experiences.

1. what would be considered the smallest stack size for a desktop app?

2. Does the above fill most of the screens in use today ...ie what is the
noraml or considered the standard screen resolution for a desktop laptop?

3. Are apps considered acceptable if the user needs to scroll down to see
the full app.

4. Are menu bars (ie File Open) still necessary or are users familiar
enough with section buttons?

5. If the stack is too large for a user (say they use a lower resoultion
screen notebook then is there a way to detect this and have scroll bars
appear?

I appreciate any insights the list may have.

regards,

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




--
Phil Davis

___
use-livecode mailing list
use-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: Black boxes replace images in Mojave (Was "No subject")

2019-06-04 Thread Phil Davis via use-livecode

As it turns out, the Remove script uses the sips command.

   (*
   Remove
   ©2009 Apple, Inc.

   Use sips to remove embedded profile and color management data from
   an image.
   *)

   on run
    display dialog "Remove the embedded profile from an image."
    set chosenFile to choose file with prompt "Choose an image "
   default location path to desktop folder
    open chosenFile
   end run


   on open draggedItems
    repeat with thisFile in (draggedItems as list)
        try
            -- use 'sips -d profile' to remove an embedded profile
            -- or use 'sips -d profile
   --deleteColorManagementProperties' to remove an embedded profile and
   other color related info
            set filePath to quoted form of POSIX path of thisFile
            set cmdLine to ("sips -d profile
   --deleteColorManagementProperties " & filePath) as string
            do shell script cmdLine
        end try
    end repeat
   end open


Phil Davis



On 6/4/19 2:14 PM, Matthias Rebbe via use-livecode wrote:

Tom,

see answer below




Am 04.06.2019 um 23:02 schrieb tbodine via use-livecode mailto:use-livecode@lists.runrev.com>>:

Mark and Matthias,

This workaround looks promising!

While I don't have Mojave to test against, I do find problem images have
many different colorSync profiles.

Matthias, after you have stripped out the profile, what does Preview's Info
screen show as the ColorSync Profile data?


Both methods,

Marks one terminal command:   sips -d profile 
--deleteColorManagementProperties ~/Downloads/Background_mit_Rand_.png

and my... dragging the image onto Remove.app in  /library/scripts/colorsync/
replaces the ColorSync Profile to sRGB IEC61966-2.1


Regards,

Matthiass



I'm thinking it would be good to have an acceptable default value that I can
tell users is OK, and anything else should be stripped.

Thanks to your both!

Tom Bodine




--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html 


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

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




--
Phil Davis

___
use-livecode mailing list
use-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: button ICON

2019-04-22 Thread Phil Davis via use-livecode

Thanks hh - I concur. Your approach seems cleaner.
Phil


On 4/22/19 9:20 AM, hh via use-livecode wrote:

As Phil said, but don't set the text of the (empty) image
used as icon  of the button but set the filename of the image.

The icon will change accordingly.

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




--
Phil Davis


___
use-livecode mailing list
use-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: button ICON

2019-04-22 Thread Phil Davis via use-livecode

Hi Klaus,

The only method I can think of is where you set the icon of a button to 
the id of an image object, and then set the text of that image object to 
the binfile url of different image files. That does work, but may not be 
what you're looking for.


Best -
Phil Davis


On 4/20/19 9:36 AM, Klaus major-k via use-livecode wrote:

Hi friends,

I have a vague memory that we can use images as icons in buttons WITHOUT
putting them in an image object first. Am I right or was I dreaming? :-)

Thanks for any hints.


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




--
Phil Davis


___
use-livecode mailing list
use-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 is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Phil Davis via use-livecode
Or another approach might be to open the invisible app as a process in 
the UI app.


On 3/29/19 10:50 AM, Phil Davis via use-livecode wrote:

Hi Bill,

It sounds like this is your scenario:
You have an app with UI that is running, and you want it to 
occasionally send/receive info to/from another invisible 'helper' app. 
Is that correct?


If so, can you use sockets in your environment? That would be a simple 
way to get the interaction you want between the 2 apps.


Or maybe I misunderstand your scenario.

Best -
Phil


On 3/29/19 10:41 AM, Bill Vlahos via use-livecode wrote:
Doing this on startup works perfectly but I don’t see how my app can 
get notification any other way while it is running.


I’ve tried openCard, preOpenCard, openStack, preOpenStack, and 
resumeStack but no luck.


Bill



On Mar 29, 2019, at 12:14 AM, Richard Gaskin via use-livecode 
 wrote:


To get the args, just know that any word is an arg, and a quoted 
string counts as one word, so this:


on startup
   put $1 & $2 & $3
end startup

...when call from:

  ./myapp ThisIsArg1 "And this is a multi-word arg" "this,is,delimited"

...would give you:

   ThisIsArg1
   "And this is a multi-word arg"
   "this,is,delimited"

 From there you can parse to your heart's delight.

That is, once we figure out how your app will get notification...


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

http://lists.runrev.com/mailman/listinfo/use-livecode




--
Phil Davis


___
use-livecode mailing list
use-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 is Macintosh equivalent of relaunch handler?

2019-03-29 Thread Phil Davis via use-livecode

Hi Bill,

It sounds like this is your scenario:
You have an app with UI that is running, and you want it to occasionally 
send/receive info to/from another invisible 'helper' app. Is that correct?


If so, can you use sockets in your environment? That would be a simple 
way to get the interaction you want between the 2 apps.


Or maybe I misunderstand your scenario.

Best -
Phil


On 3/29/19 10:41 AM, Bill Vlahos via use-livecode wrote:

Doing this on startup works perfectly but I don’t see how my app can get 
notification any other way while it is running.

I’ve tried openCard, preOpenCard, openStack, preOpenStack, and resumeStack but 
no luck.

Bill




On Mar 29, 2019, at 12:14 AM, Richard Gaskin via use-livecode 
 wrote:

To get the args, just know that any word is an arg, and a quoted string counts 
as one word, so this:

on startup
   put $1 & $2 & $3
end startup

...when call from:

  ./myapp ThisIsArg1 "And this is a multi-word arg" "this,is,delimited"

...would give you:

   ThisIsArg1
   "And this is a multi-word arg"
   "this,is,delimited"

 From there you can parse to your heart's delight.

That is, once we figure out how your app will get notification...


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


--
Phil Davis


___
use-livecode mailing list
use-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 application running on lab computers

2019-03-28 Thread Phil Davis via use-livecode

Hi Peter,

Is it possible you're running LC in a user account that doesn't have 
"admin" permissions? I suggest this because they are lab computers.


You can check Apple menu > System Preferences > Users & Groups > 
[username] to find out.


Phil Davis


On 3/27/19 11:20 PM, Peter Bogdanoff via use-livecode wrote:

In attempting to create this folder in MacOS:

put specialFolderpath("asup") & “/My Folder" into tURL

  [which yields tURL: /Library/Application Support/My Folder ]

create folder tURL

  returns a result: can't create that directory


Why the error?

Peter
ArtsInteractive



On Mar 27, 2019, at 2:38 PM, Peter Bogdanoff via use-livecode 
 wrote:

Thanks all! I’ll check these out.

Peter



On Mar 27, 2019, at 2:28 PM, Ralph DiMola via use-livecode 
 wrote:

These are the public ones on Win 10:

25 C:/Users/Public/Desktop
46 C:/Users/Public/Documents
53 C:/Users/Public/Music
54 C:/Users/Public/Pictures
55 C:/Users/Public/Videos

Used this in the message box:

put empty into msg;repeat with i = 1 to 100;if specialFolderPath(i) contains "public" then 
put i&(i)  after msg;end repeat

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 
Klaus major-k via use-livecode
Sent: Wednesday, March 27, 2019 5:04 PM
To: How to use LiveCode
Cc: Klaus major-k
Subject: Re: LC application running on lab computers

Hi Peter,


Am 27.03.2019 um 21:59 schrieb Peter Bogdanoff via use-livecode 
:

Hi,

My application is being installed on Windows machines in a school lab. The admin is 
having trouble because I’m writing preference files to the Users\\ folder 
and when another user logs in, the file is not available. This may be a problem in 
the future for Macs as well. These same preference files should be accessed by all 
users.

The specialFolderPath functions don’t seem to have one for a root level 
Library/Preferences folder. Is there otherwise a best, or even workable 
practice for this scenario?

you could use these 2 undocumented specialfolderpath() codes for Windows:
-> specialFolderPath(35) -> prefs folder for ALL users
-> specialfolderpath(26) -> dito for the current user only!

Not sure this is still working on Win 10, but worth a try. :-) Check this in 
the IDE with the messagebox:
put specialFolderPath(35)


Peter Bogdanoff
ArtsInteractive

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


___
use-livecode mailing list
use-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


--
Phil Davis


___
use-livecode mailing list
use-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: LiveCode Localization?

2019-03-18 Thread Phil Davis via use-livecode

I considered qualifying that phrase, but... nh.


On 3/18/19 3:52 PM, Bob Sneidar via use-livecode wrote:

The hell I am! ;-)

Bob S



On Mar 17, 2019, at 17:31 , Phil Davis via use-livecode 
 wrote:

To add a new language, we clone an existing YAML file and translate it, and 
adjust the RTL/LTR training UI orientation settings as needed. Add the YAML 
file into the next build of the content editor and Bob's your uncle.


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




--
Phil Davis


___
use-livecode mailing list
use-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: LiveCode Localization?

2019-03-17 Thread Phil Davis via use-livecode



On 3/17/19 5:31 PM, Phil Davis via use-livecode wrote:

Hi Kee,

I support a training development & delivery system that currently 
supports training in English, Spanish and Arabic. The training dev 
environment is English only, but the training content you can create 
with it can be in those other languages. When we added support for 
Arabic a couple of years ago, we switched from trying to maintain 
everything in custom properties and using a separate template stack 
for each language, to storing all language-specific settings (RTL vs 
LTR, etc) and default content in YAML files. Now we can easily add new 
languages with no changes needed to code (at least in theory - it 
seems to work out perfectly).

Oops - should say "it NEVER seems to work out perfectly."


To add a new language, we clone an existing YAML file and translate 
it, and adjust the RTL/LTR training UI orientation settings as needed. 
Add the YAML file into the next build of the content editor and Bob's 
your uncle.


Best -
Phil Davis



On 3/16/19 1:17 PM, kee nethery via use-livecode wrote:
Does anyone on this list have an app that you localize into other 
languages (French, German, Japanese, etc)?


If so, I’d like to ask you how you support localization. Want to see 
if there is a common method since LiveCode does not support the 
techniques used by macOS, iOS, Android, Windows.


Thanks,

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

http://lists.runrev.com/mailman/listinfo/use-livecode




--
Phil Davis


___
use-livecode mailing list
use-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: LiveCode Localization?

2019-03-17 Thread Phil Davis via use-livecode

Hi Kee,

I support a training development & delivery system that currently 
supports training in English, Spanish and Arabic. The training dev 
environment is English only, but the training content you can create 
with it can be in those other languages. When we added support for 
Arabic a couple of years ago, we switched from trying to maintain 
everything in custom properties and using a separate template stack for 
each language, to storing all language-specific settings (RTL vs LTR, 
etc) and default content in YAML files. Now we can easily add new 
languages with no changes needed to code (at least in theory - it seems 
to work out perfectly).


To add a new language, we clone an existing YAML file and translate it, 
and adjust the RTL/LTR training UI orientation settings as needed. Add 
the YAML file into the next build of the content editor and Bob's your 
uncle.


Best -
Phil Davis



On 3/16/19 1:17 PM, kee nethery via use-livecode wrote:

Does anyone on this list have an app that you localize into other languages 
(French, German, Japanese, etc)?

If so, I’d like to ask you how you support localization. Want to see if there 
is a common method since LiveCode does not support the techniques used by 
macOS, iOS, Android, Windows.

Thanks,

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


--
Phil Davis


___
use-livecode mailing list
use-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: Compiling Livecode

2019-03-06 Thread Phil Davis via use-livecode
After using Parallels for a few years, I realized I hate virtual 
environments. What I really do like, however, is having a Windows 10 
physical machine's desktop available in a window on my Mac, much like 
Mac-to-Mac Screen Sharing. (I recently discovered MS Remote Desktop - no 
going back!) I guess I could do something similar with machines running 
earlier versions of Windows but haven't tried yet.


Phil Davis


On 3/6/19 3:39 PM, Bob Sneidar via use-livecode wrote:

Don't have it switch. You can share anything, or else not. You cn use coherence 
view, or not. I personally like sharing my Mac environment with my PC 
environment (folder redirection and all that) because it makes it simple to 
collaborate between the two environments. Recently I was able to IMPORT a 
VMWare VM into Parallels, becaue the VMWare player wouldn't run the Virtual 
Machine I was given because it wasn't able to emulate some kind of processor 
mode! ICK! I hate crap like that!

Bob S



On Mar 6, 2019, at 03:57 , David Bovill via use-livecode 
 wrote:

Thanks Eric, I may well go that route. I've run Parallel before - but I
found all the switching, and space it took up a bit much.


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




--
Phil Davis


___
use-livecode mailing list
use-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: Need crash course in Dropbox library

2019-02-18 Thread Phil Davis via use-livecode
I'm not sure how this would work in your context, but one way to break 
up a file into pieces is to use open / read / close like this:


   # assumes LC 9.0.2
   # tMyFolder = path of folder containing the file to upload
   # tMyFileShortFilename = 'short' filename of file to upload - no
   path, just the filename
   # tMyFilePath = full path of file to upload

   filter files(tMyFolder, "detailed") with tMyFileShortFilename & ",*"
   into tFileDescription
   put item 2 of tFileDescription into tBytesRemaining
   put 0 into tBytesProcessed
   put 157286400 into tChunkSize -- 150 MB
   put tChunkSize into tBytesThisRead
   open file tMyFilePath for binary read
   repeat until tBytesRemaining = 0
    read from file tMyFilePath for tBytesThisRead
    subtract length(it) from tBytesRemaining
    _processChunk it
    put min(tChunkSize, tBytesRemaining) into tBytesThisRead
   end repeat
   close file tMyFilePath

Your upload would be done in the '_processChunk' handler.

HTH -
Phil Davis


On 2/18/19 5:21 AM, pink via use-livecode wrote:

I'm getting a little closer...

1. how do I break fileContents into smaller pieces?
2. how do I properly calculate the pOffset value?


Matthias Rebbe via use-livecode wrote

Hey pink
Yes, you are just going to put 150MB at a time into the pData parameter
and
ship it.
I have not uploaded any binary files, just encoded text files, so you may
have to fiddle with encoding to make sure you don't get into any trouble.
You should be able to open/read the files using
put url "binfile:/" into fileContents

On Sun, Feb 17, 2019 at 10:42 AM pink via use-livecode <
use-livecode@.runrev

wrote:
the phxDropbox library is for v1 of the Dropbox API, which has been
deprecated

what I need is to get a handle of the upload session commands, how do I
properly break the file data into seperate sessions, and how do i
determine
the offset value


Matthias Rebbe via use-livecode wrote

Don't know if this works anymore but before i used this:


*on*openstack

*if* thereisnotastack"phxDropboxLib"*then*

*put*GetPathToFile("phxDropboxLib.livecode") intophxLib

*start*usingstackphxLib

*else* *if* "phxDropboxLib"isnotamongthelinesofthestacksinuse*then*

*start*usingstack"phxDropboxLib"

*end* *if*

*--*

*if* "phxDropboxLib"isnotamongthelinesofthestacksinuse*then*

*answer*error"Unable to load phxDropboxLib"

*quit*

*end* *if*

*constant*myAppKey = "appappappapp"

*constant*myAppSec = "secsecsec"

*constant*myTokKey = "toktoktoktok"

*constant*myTokSec = "sectoksectok"

*--*

*if* notphx_DropboxAvailable() *then*

*answer*"Dropbox HTTPS connection NOT available"

*end* *if*

*get*phx_DropboxInitLib(myAppKey, myAppSec, myTokKey, myTokSec)

end openCard

reading

*put*phx_DropboxReadFile("sandbox", ("/folder/some.txt"))
intoField"Name1"ofcard1

writing--

*put*phx_DropboxWriteFile("sandbox", ("/folder/some.txt"), "text/html",
true, myName) intofield"udontcme"ofcard1

--close---

*on*closeStack

*set*theuTokenKey ofthisstacktoempty

*set*theuTokenSec ofthisstacktoempty

*stop*usingstack"phxDropboxLib"

*close*stack"phxDropboxLib"

*pass*closeStack

*end*closeStack

Op 16-2-2019 om 00:23 schreef pink via use-livecode:

under the documentation for dropboxUpload,  it states it shouldn't be
used
for files larger than 150MB, the video files will all be around 800MB

I've been looking through the stack, but cannot find the answers I am
looking for. SO I am still not clear how I should get my file into

pData

and pData is just a chunk of the data? How do I make that chunk out of
the
whole and where do I get pOffset from?


Matthias Rebbe via use-livecode wrote

Hey, pink, thanks for the clarification.
First of all, is there a reason why you are doing it this way instead

of

using dropboxUpload?  If you use dropboxUpload you can do it all in

one

shot.
Gerard's stack explains the process and how to use the various

commands

Doing it the way you are doing it, you would start with sessionStart

and

then you would repeatedly call sessionAppend
pOffset is the length of what you have already sent because there are

no

guarantees that dropbox will get your file stream in order, so if it
gets
them out of order and pData isn't the same length for each call to
append,
the only way dropbox knows where to put the data it just received is

if

you
tell it where to put it.
pData should be at most 150mb per call.
___
use-livecode mailing list
use-livecode@.runrev
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




-
---
Greg (pink) Miller
mad, pink and dangerous to code
--
Sent from:


http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

___
use-livecode mailing list


use-livecode@.runrev

Please visit this url to subscribe, unsubscribe and manage your
subscription 

Re: how to write control-c to an open process?

2019-01-30 Thread Phil Davis via use-livecode

I just found a different way to accomplish the same outcome.

Instead of writing some special form of control-c to the process, I can 
get the ID of the process and issue a 'kill' shell command for that ID 
using the 'kill' format option that sends the same signal as the one 
sent by typing control-c. The outcome is identical to control-c but no 
control chars are required.


So this works:

   kill -s INT 

Where  is the numeric ID of the process I want to end.

*whew*

Thanks -
Phil



On 1/30/19 12:58 AM, Phil Davis via use-livecode wrote:
In a LC script I need to write control-c to an open process so the app 
being run as a process will end. (At least that's how I can end it in 
Terminal). Has anyone had success doing this? Please share what you 
have learned about it.


Thanks -



--
Phil Davis

___
use-livecode mailing list
use-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 to write control-c to an open process?

2019-01-30 Thread Phil Davis via use-livecode
In a LC script I need to write control-c to an open process so the app 
being run as a process will end. (At least that's how I can end it in 
Terminal). Has anyone had success doing this? Please share what you have 
learned about it.


Thanks -

--
Phil Davis


___
use-livecode mailing list
use-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: Should I forget HC? Honestly?

2019-01-26 Thread Phil Davis via use-livecode

So well said! I love this.

On 1/26/19 10:57 AM, dunbarxx via use-livecode wrote:

Treat it like a grandfather. Love it, but do not discard your cell phone and
install a wall phone in your kitchen. You know, the one with the six foot
cord. That was a miracle too, in its day.

Craig Newman


--
Phil Davis


___
use-livecode mailing list
use-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 RGB color of a specific screen location

2018-12-31 Thread Phil Davis via use-livecode

set the screenMouseLoc to globalLoc(tLocWithinMyStack)
put the mouseColor into tTheColorAtThatScreenLoc

Phil Davis


On 12/31/18 9:24 AM, Beat Cornaz via use-livecode wrote:

How do I get the RGB color of a pixel of an image? I know the function the
MouseColor, which gives me the RGB numbers under the cursor. What I need is
to get the RGB of a specific screen location - I need to make an avarage of
e.g. 5x5 pixels. So how do I get the RGB numbers of e.g. location  "30,200"?

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




--
Phil Davis


___
use-livecode mailing list
use-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: Radio Buttons on multiple cards

2018-11-17 Thread Phil Davis via use-livecode
Hmmm. Here is what I tried, and the hilites 'stick' across all cards in 
the stack:

- create stack
- add 2 radio buttons
- group them
- set the sharedHilite of each radio to true
- add another generic button to the card
- group the newest button with the group of radios
- make new card
- place that last group on card 2

Result:
Radio hilites stick across both cards

I'm not sure why your experience would be different than this. Do you 
have any scripts that fiddle with the radio hilites?


Phil


On 11/17/18 8:08 AM, Peter Bogdanoff via use-livecode wrote:

Thanks Phil, that did it. I was trying to set the group sharedHilite, which 
can’t be done.

Peter


On Nov 17, 2018, at 3:04 AM, Phil Davis via use-livecode 
 wrote:

Hi Peter,

Set the sharedHilite of each button to true. That'll give you what you want.

Phil Davis


On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote:

Hi,

A question about LC mechanics:

I have a stack of 10 cards, sharing the same background on each. That 
background group contains a sub group of a 2-button radio set.

When the user selects radio button 2 on any particular card, I want radio 
button 2 of all 10 cards to be also selected. All I see is the button set 
working independently on each card.

I don’t see this universal choice as a button property. Is this to be done by 
scripting?

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

--
Phil Davis


___
use-livecode mailing list
use-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


--
Phil Davis


___
use-livecode mailing list
use-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: Radio Buttons on multiple cards

2018-11-17 Thread Phil Davis via use-livecode

Hi Peter,

Set the sharedHilite of each button to true. That'll give you what you want.

Phil Davis


On 11/16/18 9:28 PM, Peter Bogdanoff via use-livecode wrote:

Hi,

A question about LC mechanics:

I have a stack of 10 cards, sharing the same background on each. That 
background group contains a sub group of a 2-button radio set.

When the user selects radio button 2 on any particular card, I want radio 
button 2 of all 10 cards to be also selected. All I see is the button set 
working independently on each card.

I don’t see this universal choice as a button property. Is this to be done by 
scripting?

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


--
Phil Davis


___
use-livecode mailing list
use-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 update a css file when using the Browser widget

2018-11-04 Thread Phil Davis via use-livecode

Hi James,

Maybe putting a parameter after the URL for the reload would make the 
widget think it's worthy of a complete reload.


like so:
https://my.big.site.com?12345

Haven't tried it, just thought of it.

Phil Davis


On 11/3/18 9:55 PM, James Hale via use-livecode wrote:

Further exploring from my previous post.
Making a standalone of the stack.
Simply reloading the html page still does not use the modified css (as was the 
case in the IDE)
But, deleting the browser widget and recreating it before loading the page and 
the modified css is recognised.

So the deletion/creation will work but can only be seen in a standalone which 
is a pain, but not a deal breaker.

Still, it would be nice to know what's going on.

James




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




--
Phil Davis


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


bizarre DG problem

2018-10-09 Thread Phil Davis via use-livecode

Hi folks,

My client just called me to report one of his customers' data grids in a 
very weird state. I've never seen this before and thought I should ask 
if anyone else has, and how to prevent it if possible.



System:
macOS 10.13.x - High Sierra
LC 8.1.9 Community


Background:
This DG is automatically redefined regularly to display different sets 
of columns for Orders data, Clients data, Purchases data, etc., and is 
then loaded with data of that type. The redefinition/reloading happens 
when the customer clicks a button for that type of data. This has worked 
flawlessly for many years and I don't suspect it as the source of the 
problem.


The DG is in a window that is not resizable. so it's rect is constant.


DG properties:
vScrollbar = true
hScrollbar = auto


Symptom:
Inside the customer's DG, grp "dgList" is horizontally out of alignment 
with the hScroll of the DG. When the hScroll is 0, the left of grp 
"dgList" should be the left of the DG, but instead it's left is near the 
center of the DG. This prevents the display of all whole or partial 
columns that are to the left of the group's left edge.



Fix:
(realign the 'dgList' group with the hScroll of the DG)
set the hScroll of the DG to 0
set the left of grp "dgList" of DG to the left of the DG
refresh the DG


Cause:
?
I'm trying to understand what caused it so I can prevent it in the future.

Any ideas are welcome.

Thanks -
Phil Davis

--
Phil Davis


___
use-livecode mailing list
use-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: Determine if device is a tablet

2018-08-14 Thread Phil Davis via use-livecode

Hi Jacque,

One idea: If your app can reach out to a LC page on a server, that page 
could return $_SERVER["HTTP_USER_AGENT"] which in many cases tells 
something about the kind of device that connected. For example:


An old iPad:
Mozilla/5.0 (iPad;CPU OS 9_3_5 like Mac OS X) AppleWebKit/601.1 (KHTML, 
like Gecko)


My phone:
Mozilla/5.0 (iPhone;CPU iPhone OS 11_4_1 like Mac OS X) 
AppleWebKit/604.1.34 (KHTML, like Gecko) CriOS/68.0.3440.83


An old Samsung tablet:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/65.0.3325.109 Safari/537.36


Just grasping at straws here. Better info is hidden somewhere in the 
bowels of the device. It would be cleaner to just get it directly.


Phil Davis


On 8/14/18 4:15 PM, J. Landman Gay via use-livecode wrote:
I need to determine whether the current mobile device is a tablet or a 
phone. On iOS I can use "the machine" but on Android it only provides 
the manufacturer's name.


Does anyone know a way to do that?



--
Phil Davis


___
use-livecode mailing list
use-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: searching lists.runrev.com

2018-08-08 Thread Phil Davis via use-livecode

Another similar resource:

https://www.mail-archive.com/use-livecode@lists.runrev.com/

Phil Davis


On 8/8/18 8:08 PM, Richard Gaskin via use-livecode wrote:

Douglas Ruisaard wrote:

> When I try to use the link:
>
> http://www.google.com/advanced_search?q=site:lists.runrev.com
>
> with ANY choice of "last update"... the search NEVER finds anything...
> no matter what word(s) I use in the "all these words" or "this exact
> word or phrase"...
>
> AND
>
> without the "last update", the search NEVER seems to find any "recent"
> entries...e.g. try "all these words" with pendingmessages
>
> should find a few messages from July, 2018... but it doesn't.
> Frustrating!  Any better way to search these listings?

Google's big, but the Web is bigger.  To conserve resources they don't 
index everything.  It turns out this list is a bit less popular than 
the latest rumors of Justin Bieber's dating life. :)


Good news:  this site is dedicated to mirroring this list and has a 
better index into the content:


 



Bad news: a glitch makes it appear that Mark Waddingham is the author 
of every message here.




--
Phil Davis


___
use-livecode mailing list
use-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: drawing a Barcode without a Barcode font

2018-07-23 Thread Phil Davis via use-livecode
I wonder what would happen if you turned the bar code by 90 degrees and 
then printed it? Could it be scanned then?


Just a wild thought...

Phil Davis


On 7/22/18 2:43 PM, Matthias Rebbe via use-livecode wrote:

Of course i meant

So the code below shows the settings which allow us to scan the labels when 
printed with a Toshiba B-EV4D and a Zebra LP 2844.


Am 22.07.2018 um 23:18 schrieb Matthias Rebbe via use-livecode 
:

I have to add something.

As I wrote, we were able to successfully scan the labels. This is true as long 
as we print the labels with a laser printer.

If we print the labels with a thermo printer (203 dpi) then the code cannot be 
scanned with the values i posted before.
We  had set the line thickness of the rectangles to 0 and had to increase the 
width of the black bars and decrease the width of the clear ones.

So the code below shows the settings which allow us to scan the labels with a 
Toshiba B-EV4D and a Zebra LP 2844.

put “3" into tNarrow
put “6" into tWide
set the width of grc "narrowC" to (tNarrow - 2)
set the width of grc "narrowB" to (tNarrow -3)
set the width of grc "wideC" to tWide
set the width of grc "wideB" to tWide

Regards,

Matthias Rebbe



Am 20.07.2018 um 13:31 schrieb Matthias Rebbe via use-livecode 
:

We tried here with iPhone and also with an USB scanner. Both devices scanned 
the code successfully.

I have just finished a program for shipment. It fetches customer and invoice 
data from the accounting software and creates then the shipment labels 
including a Code25i barcode and a QR code. The carrier is Trans-o-Flex. I need 
to send some sample labels to their IT department. They will check if the 
labels are readable by their scanners. But i am now confident, that this will 
work on their side also.

Thanks again.

Matthias




Am 20.07.2018 um 11:31 schrieb Mike Bonner via use-livecode 
:

Very cool!  Does it actually produce a code that can be scanned?

On Fri, Jul 20, 2018 at 3:25 AM Matthias Rebbe via use-livecode <
use-livecode@lists.runrev.com> wrote:


Mike

you´re awesome. That is already an almost complete solution to my
question. Never had expected that. Thank you very much.
I´ve made some little changes. One among of them is:
To have all the separate bars of the barcode in a group, i changed the
lines where the grc is cloned
to for examplecopy grc “narrowB” to grp “barcode2of5”

Here´s now my code to convert the nNnNN…. string to Barcode

local tLast
on mouseup
if there is a grp "barcode2of5" then delete grp "barcode2of5"
-- now change the width of the template graphics
put "2" into tNarrow
put "4" into tWide
set the width of grc "narrowC" to tNarrow
set the width of grc "narrowB" to tNarrow
set the width of grc "wideC" to tWide
set the width of grc "wideB" to tWide
put "0" into tHorAdjust -- allows to put a gap beween the separate bars.
put "60,286" into tBarTopLeft -- defines where the first bar is placed
put empty into tLast
put fld "2of5" into tChars -- the field with your wNnnW string
set the casesensitive to true -- to differentiate case of course
create grp "barcode2of5"
repeat for each char tChar in tChars
switch tChar
   case "N"
  -- checks the char, and clones the matching bar.
  --if its the first time through, places it at astart location
  -- then uses the id of the most recent bar forplacement
purposes
  --clone grc "narrowB"
  copy grc "narrowB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "n"
  --clone grc "narrowC"
  copy grc "narrowC" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "W"
  --clone grc "wideB"
  copy grc "wideB" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
   case "w"
  --clone grc "widec"
  copy grc "widec" to grp "barcode2of5"
  if tLast is empty then
 set the topleft of the last grc to tBarTopLeft
  else
 set the topleft of the last grc to horAdjust(tHorAdjust)
  end if
  break
end switch
put the short id of the last grc into tLast -- the id of the most
recently placed bar
end repeat
set the height of grp "barcode2of5" to 69
set the width of grp "barcode2of5" to 360
end mouseup

--This function allows a horizontal adjustment of the single bars.
function horAdjust tHorAdjust
put the topright of grc id tLast into tTMP
set the itemdelimiter to ","
add tHorAdjust to 

Re: [ANN] Release 9.0.1 RC-1

2018-07-09 Thread Phil Davis via use-livecode
Whoa! Here in the Pacific Northwest (Portland area) I downloaded the 
Indy version in 1:43. That's one minute and change.


Phil Davis


On 7/9/18 3:27 PM, J. Landman Gay via use-livecode wrote:

On 7/9/18 5:11 PM, Mark Wieder via use-livecode wrote:

On 07/09/2018 01:41 PM, Richard Gaskin via use-livecode wrote:

Panos wrote:
 > We are pleased to announce the release of LiveCode 9.0.1 RC-1.

Here (Los Angeles) the download is estimated to take three hours. 
Could this be a repeat of the CDN issue you'd corrected a few weeks 
ago?




Here it actually took only about 45 minutes.
That's about 8 megabytes / minute, or 132kbytes / second.
Better than a dialup modem, eh?



Here in the Northland, downloading from the web page, it took about 
five minutes.




--
Phil Davis


___
use-livecode mailing list
use-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 clear residual garbage in a stack?

2018-05-21 Thread Phil Davis via use-livecode

Neville,

Use "compact stack" to get rid of space formerly used by now-deleted 
objects.


See the docs.

Phil Davis


On 5/21/18 5:42 PM, Neville Smythe via use-livecode wrote:

I am constructing a large stack as a test for a bug report (to report the slow 
saving of large stacks for a standalone Windows 10 app under LC 8.x). I start 
with a stack with a single card which saves as a 28 KB file. I then use a 
script to create 299 copies of card 1. The resulting stack saves to a 8.2 MB 
file. As expected.

I then deleted all but the first card, and re-ran the script so it again had 
300 cards. This saves to a 16.4 MB file! Repeating the delete-and-create gives 
a 24 MB file. Evidently the data for the deleted cards has not been removed. I 
can think of efficiency reasons why this might be useful in the IDE, but there 
must/should be a way to reduce the file size to a minimum, otherwise stacks 
which continually delete and create data will just grow in a very 
user-unfriendly way.

I can’t find any command such as clean or purge or free or compress or release 
garbage which will reduce the file size to its actual requirements. I have a 
vague memory of this being raised some years ago but I can’t find the 
reference. Surely there must be a built-in command? Because the only way I can 
see to reduce the size would be to create a new stack and copy over all cards 
and scripts and substacks before saving, which is ridiculous.

BTW The bug: The 8.2MB stack saves on a Mac in 0.27 seconds. On Windows 10 
saving time is 6.4 seconds. Other apps on Windows save an 8 MB file in under a 
second so the problem is not with the Windows OS or antivirus virus software or 
the particular machine. Possibly this bug is related to the reported 
unusablility of LC 9 IDE on Windows 10, of which I have heard no more since it 
was raised in this forum a few weeks ago, although my context is a standalone 
compiled under LC  8.x.

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


--
Phil Davis


___
use-livecode mailing list
use-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: Active window and mouse location

2018-05-10 Thread Phil Davis via use-livecode

Hi Douglas,

Apologies if I'm misunderstanding the problem or if someone already 
suggested this, but won't the stack come to the front if you just say 
"go to stack tMyStack" ?  Seems to me that would make it the topStack, 
which is apparently what you want (as I read it).


Or if the stack is a mainStack, you could say "launch document 
tMyStackFilepath" and the same thing would happen.


Another simple two-line approach:

   push current card of stack tTheOneBehind
   pop card

The push/pop approach should work in any LC version. (I'm working in LC 9)

Thanks -
Phil Davis


On 5/9/18 2:34 PM, Douglas Ruisaard via use-livecode wrote:

Thanks, Mike... but this doesn't make my LC screen active... it does flicker it 
but leaves it in buried under the top window.

I'll check out those links, Lagi... thanks for the research

Thanks to Bob und Klaus for the "Launch" suggestion ... however, I don't want to open, 
launch or startup anything, I just need the LC window which is displaying the card processing to 
become the top-most window ... so I'm not sure exactly what I would use as the "document" 
in the launch command.  I will, however, keep this in mind for other purposes.

As expected, a VERY simple, one-line script to AutoHotKey did the trick... 
which can be compiled into a standalone executable... and then shell'd to.  
Only thing is that it isn't cross-platform... windows only.  If I find the 
time, I'll try Bob's suggestion for the Apple.

Many Thanks!
Doug


Douglas Ruisaard
Trilogy Software
(250) 573-3935


While the solution is not perfect, you can have your script
set the systemwindow of stack "stackname" to true
wait 1 tick
set the systemwindow of stack "stackname" to false

(Saw this on the forums at one time or another, think the thanks go to Lagi)

The only negative of this method is the flicker as it goes system, then
back again.


--




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



--
Phil Davis

___
use-livecode mailing list
use-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: WordReport Help

2018-04-11 Thread Phil Davis via use-livecode
While on a walk just now, I was thinking about line endings on Mac vs. 
Windows - they are different! I think you're right - open your original 
template in Word for Windows, add your tag, and save & close it. Then it 
will probably work as you expect.


Phil


On 4/11/18 10:52 AM, Charles Szasz via use-livecode wrote:

Hi Phil,

Thanks for your input!  The data tag was working before this anomaly occurred.  
The text in the data tag is just regular text.  The font is Times New Roman.  
The text and formatting were not changed in the data tag.  I am hoping that 
someone who uses WordReport can give me insight on this problem.

There are a few general rules in the WordReport for data tags but no 
suggestions to aid in resolving this type of problem.  Since WordReport uses 
brackets for the data tags, I am guessing that it is using merge in creating a 
Word document.  I never used merge in any of my projects.  So, this problem 
could be possibly related to merge.

I paid Curry for the initial WordReport template.  Curry was very helpful in 
setting up the template for WordReport.  It worked on a consistent basis for a 
few days until yesterday.  I am thinking that Word for the Mac may be the 
culprit. I used Word for Mac in adding a data tag to the template.  But no 
other changes were made to the template.

I am going to try Word for Windows today to see if this will fix the problem.  
Curry indicated that he does not think Word for the Mac is the problem, 
however.  But I am pretty sure Curry used Word for Windows in creating the data 
tags in the template.


  



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



--
Phil Davis


___
use-livecode mailing list
use-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: WordReport Help

2018-04-11 Thread Phil Davis via use-livecode

Hi Charles,

On the surface it sounds to me like it might be a text encoding issue. 
You could do an experiment to find out. Since the textEncode() function 
isn't available in LC 6.1.3, you would have to use uniEncode() to encode 
your Word doc content before writing it to disk and handing it off to Word.


I'm rusty, but I believe you would do it like so:

    put uniEncode(tMyContent) into url ("binfile:" & tMyDocPath)

Like I said, this is an experiment to see if it makes the desired 
difference! But at least it might tell you something. And it's possible 
it will change other parts of your document into a form you don't want.


And it's possible I'm altogether wrong!

Best -
Phil Davis


On 4/10/18 9:25 PM, Charles Szasz via use-livecode wrote:

I am having difficulty with a data tag in WordReport.  I am using LC 6.1.3.

How do you keep a data tag from inserting an extra line after the data tag?   I 
have one data tag that keeps inserting an extra line before a non-data tag 
line.  The data tag has a cr immediately after it. When a Word document is 
created, the cr is moved to the next line creating an extra line.  I have look 
at formatting but cannot figure how to fix the problem.

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



--
Phil Davis


___
use-livecode mailing list
use-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: Checkmark for Mac & Windows

2018-03-24 Thread Phil Davis via use-livecode

Another approach:
- find an open source font that has the character you want, plus all 
text looks OK

- include the font (and its license) in your app
- when you start your app, "start using font file tMyFontFile"
- set your table field to use this font
- toggle similar to the way you do now

Phil


On 3/23/18 11:13 PM, Knapp Martin via use-livecode wrote:

Yes I was thinking I could do that and it’s easy enough. Just seems odd that 
such a common character can’t be easily typed in Windows.

For Clarence:
set the imageSource of char 1 of line 1 of fld "SomeField” to 1234 —where 1234 
is the id of the image you want to use.

Marty


On Mar 23, 2018, at 9:12 PM, Clarence Martin via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Phil, can you provide a sample script?

-Original Message-
From: use-livecode <use-livecode-boun...@lists.runrev.com> On Behalf Of Phil 
Davis via use-livecode
Sent: Friday, March 23, 2018 7:20 PM
To: Knapp Martin via use-livecode <use-livecode@lists.runrev.com>
Cc: Phil Davis <rev...@pdslabs.net>
Subject: Re: Checkmark for Mac & Windows

One idea:

- Create or find a checkmark image you like, that looks good within the 
textHeight of your lists
- Import it into your app
- make sure each line of text begins with maybe 3 spaces
- use the ID of the checkmark image as the imageSource of char 1 of each line
- let your (now modified) script support the same toggle action it now supports

HTH -
Phil Davis


On 3/23/18 6:22 PM, Knapp Martin via use-livecode wrote:

I generate lists on the fly with the first item of each line set with a 
checkmark. After I construct the list under script, I just insert it into a 
standard LC table field. The user can then toggle the checkmark of each line 
off or on with a click (a script in the field takes care of that).

On Mac it's just a matter of using the checkmark character (option-v) which I 
can type right into a script. But on Windows it does not display. I don't want 
to rely on a specific font in case the user does not have that installed. Is 
there really not an *simple* way to do this so that it works on both Mac and 
Windows? I’m redoing a currently Mac-only app so I can release for Windows too 
and don’t really want to re-work all this if there’s a simple solution that I’m 
missing.

Thanks,

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

--
Phil Davis


___
use-livecode mailing list
use-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


--
Phil Davis


___
use-livecode mailing list
use-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: Checkmark for Mac & Windows

2018-03-23 Thread Phil Davis via use-livecode

One idea:

- Create or find a checkmark image you like, that looks good within the 
textHeight of your lists

- Import it into your app
- make sure each line of text begins with maybe 3 spaces
- use the ID of the checkmark image as the imageSource of char 1 of each 
line
- let your (now modified) script support the same toggle action it now 
supports


HTH -
Phil Davis


On 3/23/18 6:22 PM, Knapp Martin via use-livecode wrote:

I generate lists on the fly with the first item of each line set with a 
checkmark. After I construct the list under script, I just insert it into a 
standard LC table field. The user can then toggle the checkmark of each line 
off or on with a click (a script in the field takes care of that).

On Mac it's just a matter of using the checkmark character (option-v) which I 
can type right into a script. But on Windows it does not display. I don't want 
to rely on a specific font in case the user does not have that installed. Is 
there really not an *simple* way to do this so that it works on both Mac and 
Windows? I’m redoing a currently Mac-only app so I can release for Windows too 
and don’t really want to re-work all this if there’s a simple solution that I’m 
missing.

Thanks,

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


--
Phil Davis


___
use-livecode mailing list
use-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: height of title bar

2018-03-19 Thread Phil Davis via use-livecode

Thank you Paul! It does indeed work as you said.

Phil


On 3/19/18 10:46 AM, Paul Dupuis via use-livecode wrote:

On 3/19/2018 1:37 PM, Phil Davis via use-livecode wrote:

Is there a way in LC to discover the height of a window's title bar?

I tried comparing item 2 of the card's globalLoc(topleft of this card)
to item 2 of the stack's topleft, but they are the same.

I tried comparing the stack's topleft with no decorations to the same
but with decorations. No joy. Same.

Any other ideas?

Thanks -
Phil


See the use of the 'effective' keyword in the dictionary under the
rectangle property. Essentially the 'effective rect of window X' minus
the 'rect of window x' give you the height of the title bar for teh top
coordinates and the size of the border for left, right, and bottom
coordinates.



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



--
Phil Davis


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


height of title bar

2018-03-19 Thread Phil Davis via use-livecode

Is there a way in LC to discover the height of a window's title bar?

I tried comparing item 2 of the card's globalLoc(topleft of this card) 
to item 2 of the stack's topleft, but they are the same.


I tried comparing the stack's topleft with no decorations to the same 
but with decorations. No joy. Same.


Any other ideas?

Thanks -
Phil

--
Phil Davis


___
use-livecode mailing list
use-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: Dinamyc variables.

2018-03-19 Thread Phil Davis via use-livecode

On 3/19/18 9:29 AM, Mike Bonner via use-livecode wrote:

Use an array instead...
put empty into tCardArrayA[the short name of this card]
Newly created cards where you don't specify the card name on creation, will
have a card name set to the id of the card. (like "card id 1002")


And the array approach allows the card names to contain spaces (consist 
of multiple words), where the "do" approach does not.


Phil Davis



On Mon, Mar 19, 2018 at 9:43 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:


This is what Macro Substitution was created for, but LC doesn't have that
function. Say you have an accounting app where you can load different
companies. The names of the tables and support files on disk are serialized
with a 2 digit number representing the company number. In Foxpro when you
load a new company, you *could* reference the files using macro
substitution:

open file 

Of course there are ways around this. Someone pointed out using an array,
which is a variable containing other variables in essence.


On Mar 18, 2018, at 19:08 , Heriberto Torrado via use-livecode <

use-livecode@lists.runrev.com> wrote:

[This message was identified as a phishing scam. Learn about phishing at

http://aka.ms/LearnAboutPhishing]

Dear Livecode programmers,

I am trying to create a new variable with the name of a dynamically
generated card.
Please note that I would like to create a new variable, not to put the
name of the card inside the variable.

I would like to have something like this (PseudoCode)

"Get the name of this card and create a variable with the name of the

card."

I searched the forum and the dictionary but I cannot find how to do that.

Best regards/ Saludos cordiales/ Cordialement

Heriberto Torrado
​Chief Technology Officer (CTO)
​Director de informática
Directeur informatique

*NetDreams S.C.*
http://www.networkdreams.net

___
use-livecode mailing list
use-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


--
Phil Davis


___
use-livecode mailing list
use-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: Issues with storage of data in stack

2018-03-08 Thread Phil Davis via use-livecode

Hi Peter,

If your app could encrypt the arrayEncoded data before writing to disk, 
and then decrypt it when reading it, that would solve the 
unwanted-access problem. The amount of time used by encrypt/decrypt 
processes is negligible, even for large files.


I love arrays. They have become one of my favorite things about LC.

Phil Davis


On 3/8/18 11:22 AM, Peter Bogdanoff via use-livecode wrote:

Mark,

If the data is written to a file on disk, could someone else arrayDecode the 
file and gain access to it?

Peter Bogdanoff
ArtsInteractive


On Mar 8, 2018, at 10:38 AM, Mark Talluto via use-livecode 
 wrote:


On Mar 8, 2018, at 9:03 AM, Lagi Pittas via use-livecode 
 wrote:

In the first version of the system I save the arrays which held all
the Clerks orders/totals etc and items into an external stack every
time they added an item.

I too use arrays as a data store. You could save the arrays to disk directly 
with arrayEncode(). To save time and not store the entire array to disk, you 
could store only the portions that have been updated on every update. This will 
keep the data store safe and fast. It will also remove the occasional issue of 
stack corruption…since you will not store the data inside of stacks any longer.

All creates/reads/update/writes would be done to memory. Those calls that 
modify data will simply do a follow-up write to disk for that particular 
record. To defeat OS inode limitations, you could group your arrays logically 
into files. Thus, you would have anywhere from 1 to a 100 sub arrays grouped 
together. The loading and storing of arrays is very fast. Even with databases 
in the 100s of thousands to low millions of records counts.

Performance is amazing. The best part is you are speaking to your database 
using LiveCode commands and functions. The only limitation is the amount of RAM 
on a given device. Should you outgrow that limitation then you could move the 
data to the cloud. Or you could load/unload data accordingly from disk. This 
would also be a nice indicator that your business is growing. Of course, it 
could just be that you are storing a lot of data. :)

If you need any help or ideas, let me know.

Best regards,

Mark Talluto
livecloud.io 
nursenotes.net 
canelasoftware.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


--
Phil Davis


___
use-livecode mailing list
use-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: [Completely OT] Withdrawal symptoms from Slashdot

2018-03-05 Thread Phil Davis via use-livecode

Or this:

https://alternativeto.net/software/slashdot/

Phil Davis


On 3/3/18 6:37 PM, Rick Harrison via use-livecode wrote:

Hi Alex,

Try..

https://news360.com 

You can choose a technical focus too.

Enjoy!

Rick


On Mar 3, 2018, at 7:09 PM, Alex Tweedly via use-livecode 
 wrote:

Completely off topic, but I need help ;-)

For many years now my standard "I have 30 seconds (or minutes) to fill in, what's 
happening in the world" web site has been slashdot, but it seems to be completely 
off the air for now.

I'm looking for suggestions for alternates that are worth using while waiting 
for a build, or just to give me some interesting. The less video, the better :-)

Thanks

Alex.


___
use-livecode mailing list
use-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



--
Phil Davis


___
use-livecode mailing list
use-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: Quit Command corrupts standalone (stack called by standalone splash)

2018-02-26 Thread Phil Davis via use-livecode

Hi Roland,

This is the only reply of yours that I see.


On 2/26/18 4:13 AM, R.H. via use-livecode wrote:

Thanks, Phil and Tom

I already replied, but I cannot see my first reply to your answers.

Did it appear in the list?


Phil:

"quitMe" should be sent before 'saveMe' is executed, because the 'save'

command is blocking. It would prevent 'quitMe' from being sent until (in
this case) 1 second after 'saveMe' has finished.

Well, it is blocking. Issuing "quit" just quits if messages are locked.So,
to quit before save would require not to force a quit. Right? I will test.


You're right, but that's not what my code does. It sends 'quitMe' (which 
contains the 'quit') 1 second after 'saveMe' has started. As you may 
know, 'send in x seconds' adds 'quitMe' to the pendingMessages queue, so 
it will execute as soon as the designated time has passed AND no other 
handler is running.


For what it's worth, the correction I made to my own code is still not 
correct. The whole thing should look like this:



local sMyTildeFilename

on closeStack
    -- create a path to the 'tilde' file (which doesn't yet exist)
    put (the filename of me & "~") into sMyTildeFilename

    -- add 'quitMe' to the pendingMessages
    send "quitMe" in 1 second

    -- save this stack
    saveMe
end closeStack


command saveMe
   lock cursor
   set the cursor to watch
   save me -- creates the tilde file at beginning, deletes it at end
end saveMe


command quitMe
   -- wait until tilde file is gone, then quit
   if there is a file sMyTildeFilename -- 'save' has not completed yet
   then -- try again later
   send "quitMe" to me in 0.5 seconds
   else
       unlock cursor
       lock messages
       quit
   end if
end quitMe



Phil



The main problem is that the IDE is ok, even though saving takes a long
time, but no errors I can see. The standalones are the culprit, and I have
limited to access to other peoples computers using my standalones. And on
my machine the problem does not appear regularly.

// I hope this message appears, otherwise I will have to check what is
wrong sending messages to the list. //

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



--
Phil Davis


___
use-livecode mailing list
use-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: Quit Command corrupts standalone (stack called by standalone splash)

2018-02-26 Thread Phil Davis via use-livecode

Let me improve this a bit.


On 2/23/18 4:19 PM, Phil Davis via use-livecode wrote:

Roland,

I believe Tom is exactly right. I would restructure your two closing 
handlers like this:



local sMyFilename

on closeStack
    put the filename of me into sMyFilename
    saveMe
    send "quitMe" in 1 second
end closeStack


on closeStack
    put the filename of me into sMyFilename
    send "quitMe" to me in 1 second
    saveMe
end closeStack


"quitMe" should be sent before 'saveMe' is executed, because the 'save' 
command is blocking. It would prevent 'quitMe' from being sent until (in 
this case) 1 second after 'saveMe' has finished.


Thanks -
Phil




command saveMe
   lock cursor /* Tested with and without locking and showing cursor */
   set the cursor to watch
   save this stack /* auto save, takes a long time, between 10-30 secs */
end saveMe


command quitMe
   if there is a file sMyFilename then
  unlock cursor
  lock messages
  quit
   else
  send "quitMe" to me in 0.5 seconds -- or in your preferred time
   end if
end quitMe


The above was not tested but it should solve the problem.

HTH -
Phil Davis



On 2/23/18 3:20 PM, tbodine via use-livecode wrote:

Hi Roland.

The "~" file is the original  (uncorrupted, unsaved) version of your 
stack
before LC executed your Save cmd. If you remove the "~" from the 
filename,
you'll probably find you can open that. LC creates the "~" file at 
the start
of the save operation and, if all goes well, removes that file when 
save is

complete.

My guess is your problem is rooted in the lengthy save time in the quit
routine. Here are a couple ideas of how you could deal with that:

1) Do the save within a try/catch statement so you can deal with any 
error.


2) If you are just saving some user data like prefs or fairly minor 
stuff,

then why not save that into a separate substack outside of your main
application stack? That should greatly shorten the time it takes to 
save.


Hope that helps.

Tom Bodine



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html


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

http://lists.runrev.com/mailman/listinfo/use-livecode





--
Phil Davis


___
use-livecode mailing list
use-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: Quit Command corrupts standalone (stack called by standalone splash)

2018-02-23 Thread Phil Davis via use-livecode

Roland,

I believe Tom is exactly right. I would restructure your two closing 
handlers like this:



local sMyFilename

on closeStack
    put the filename of me into sMyFilename
    saveMe
    send "quitMe" in 1 second
end closeStack


command saveMe
   lock cursor /* Tested with and without locking and showing cursor */
   set the cursor to watch
   save this stack /* auto save, takes a long time, between 10-30 secs */
end saveMe


command quitMe
   if there is a file sMyFilename then
  unlock cursor
  lock messages
  quit
   else
  send "quitMe" to me in 0.5 seconds -- or in your preferred time
   end if
end quitMe


The above was not tested but it should solve the problem.

HTH -
Phil Davis



On 2/23/18 3:20 PM, tbodine via use-livecode wrote:

Hi Roland.

The "~" file is the original  (uncorrupted, unsaved) version of your stack
before LC executed your Save cmd. If you remove the "~" from the filename,
you'll probably find you can open that. LC creates the "~" file at the start
of the save operation and, if all goes well, removes that file when save is
complete.

My guess is your problem is rooted in the lengthy save time in the quit
routine. Here are a couple ideas of how you could deal with that:

1) Do the save within a try/catch statement so you can deal with any error.

2) If you are just saving some user data like prefs or fairly minor stuff,
then why not save that into a separate substack outside of your main
application stack? That should greatly shorten the time it takes to save.

Hope that helps.

Tom Bodine



--
Sent from: 
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

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



--
Phil Davis


___
use-livecode mailing list
use-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: any tricks to make SHELL non blocking?

2018-02-02 Thread Phil Davis via use-livecode
Run it in a different app that you communicate with via sockets? Or 
maybe run that app as a process?


You said *any* hints, so... be careful what you ask for! :-)

Phil Davis



On 2/2/18 1:41 PM, Klaus major-k via use-livecode wrote:

Hi friends,

I have a command line utility which will process a generated file like:
...
get shell(q(tCommandLineUtility) && q(tGeneratedFile))
...

FYI:
function q tString
  return QUOTE & tString & QUOTE
end q


Any hints on how to make this NON blocking somehow?
I need a solution for Mac and Win.

Thanks for any hint.


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



--
Phil Davis


___
use-livecode mailing list
use-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 Env Variable set when saving standalone?

2018-01-25 Thread Phil Davis via use-livecode

Bob,

Is the problem that at app-login time, the app doesn't know whether its 
opening was caused by the standalone builder or by the user? If so, 
maybe something this would work:


on standaloneSaved
    put true into url (specialFolderPath("temp") & "/saved"
end standaloneSaved


on appLogin -- in card script of login stack
    if there is a file ( specialFolderPath("temp") & "/saved" ) then
    delete file ( specialFolderPath("temp") & "/saved" )
    else
    modal the owner of me -- or whatever mode you want
    end if
end appLogin


It's crude but would probably work. Of course it's always possible I'm 
solving the wrong problem. :-)


Phil Davis



On 1/25/18 3:31 PM, Bob Sneidar via use-livecode wrote:

Trouble is I DO want to open the login stack modally in development, because it 
pulls setup information for each user from the Login database, such as custom 
settings (like local file paths, recent customers list, access level etc). The 
only time I do NOT want to open that stack is when I am saving as standalone.

It's not killing me to set the stack mode to top level each time, it's just 
irritating.

Bob S



On Jan 25, 2018, at 13:57 , J. Landman Gay via use-livecode 
 wrote:

You could try it a different way. Save/keep the login stack as toplevel all the 
time, then in the handler that opens the login stack:

if the environment is not "development" then modal "login"
else go stack "login"


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



--
Phil Davis


___
use-livecode mailing list
use-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: Identifying empty lines of text

2018-01-12 Thread Phil Davis via use-livecode

I wonder if the 202 value would disappear if you did this:

   put textDecode(the clipboarddata["text"], "utf8") into field 1

I don't know the answer, just putting it out there.

Phil Davis


On 1/12/18 4:48 PM, David Epstein via use-livecode wrote:

I use “the number of words in myString = 0” to test whether a line of text 
appears empty, since I want a line with only space characters to be understood 
as empty.
But a line of text I pasted from elsewhere contained an invisible character 
whose charToNum value is 202, and this was counted as a word by my script.
Is there a better way to test for a line of text that has no visible characters?
Many thanks.

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


--
Phil Davis

___
use-livecode mailing list
use-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: preloading an mages dimensions

2017-12-28 Thread Phil Davis via use-livecode

What platform?

On a Mac, you can use sips. It's included with the OS. Example - typed 
on the command line:


   sips -g pixelHeight -g pixelWidth /Users/pdslabs/Desktop/IMG_4411.jpg

The output:

   /Users/pdslabs/Desktop/IMG_4411.jpg
  pixelHeight: 750
  pixelWidth: 1000

Phil Davis


On 12/27/17 9:02 PM, Nicolas Cueto via use-livecode wrote:

Before setting the filename of an image object, how do I get the original
dimensions of an image (jpg)?

Thank you.

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



--
Phil Davis

___
use-livecode mailing list
use-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: use-livecode Digest, Vol 171, Issue 44

2017-12-27 Thread Phil Davis via use-livecode

On 12/27/17 4:26 PM, Peter Reid via use-livecode wrote:

Hi Marc, Paul, Phil, Rick and Richmond

Thanks for your various thoughts.

To put a bit more flesh on this, here's what I'm developing and why...

In the first instance I'm doing this development for a friend who's grandmother 
suffers from aphasia (saying completely the wrong word).  The idea is that her 
family can put together sets of words where each word is spoken by the app 
whilst displaying a relevant picture and optionally a short video clip 
illustrating the correct mouth shape when saying the word.  The app displays 
the word in a very large font with a picture, then the app says the word (with 
the option to see a mouth shape video clip).  The user responds by trying to 
say the same word and (the thing I can't do yet!) the app gives the user a 
percentage score that represents how closely the user matched the sample word. 
If the user's score is above a variable threshold, the user sees a smiley face, 
otherwise a sad face!

I tried contacting Mark Smith as suggested by Paul but his email address 
m...@maseurope.net no longer works.


This Mark Smith was a list member who passed away in 2012. There is/was 
another Mark Smith on this list after that.


Mark created several fine code libraries. We see inquiries here about 
his stuff every now and then, so I just added a page to my web site 
where you can download them:


   http://www.pdslabs.net/the-mark-smith-collection/

If you have a lib of his that isn't listed on this page, please feel 
free to forward it to me and I'll add it.


FWIW, my set includes his 'AudioWaveformMin1.0.rev.zip' file.

Phil Davis




So far I have everything working apart from the comparison of 2 WAV files, in 
particular the following is working:

- the app checks for the presence of a micro SD card as the source of a 
collection of word packs
- a word pack consists of a collection of words in sound (WAV) and picture 
(JPG) form, optionally with supporting video clips (MP4)
- the app lets the user select a word pack at start up and loads the pack into 
RW file space
- the user taps a large arrow icon to go forwards/backwards through the chosen 
list of words
- for each word, the word is displayed in a large font at the top of the 
landscape screen, with its associated picture occupying the lower half of the 
screen
- as the word is displayed, it is spoken
- the user can tap a microphone icon and record their attempt at the word
- currently I simulate the comparison of the 2 WAV files
- the app gives a percentage score and displays a smiley or sad face accordingly

To be honest, my main aim is to help a friend.  At this stage I'm not looking 
beyond this, so licensing, etc. is not on the horizon at the moment.

Thanks again

Peter
--
Peter Reid
Loughborough, UK


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



--
Phil Davis

___
use-livecode mailing list
use-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: Voice Comparison in LiveCode?

2017-12-27 Thread Phil Davis via use-livecode

Hi Peter,

Here is some additional input:

https://stackoverflow.com/questions/17010516/how-to-detect-how-similar-a-speech-recording-is-to-another-speech-recording

HTH -
Phil Davis


On 12/27/17 4:16 AM, Peter Reid via use-livecode wrote:

i'm developing an app for cheap Android tablets (e.g. Amazon Fire 7in) that 
allows a user to practice speaking a set of words.  The app plays a sample of a 
word and the user then tries to say the same word.  So far the app can play 
sample words and capture the user's attempts for the same words.  The sample 
words and user attempts are uncompressed WAV files.

I'm trying to find the code to do the comparison of 2 WAV files.  Ideally, the 
code will be in the following formats (best first):

1. LiveCode
2. Pseudocode
3. Other code (Python, Java, C++ etc.)
4. Academic papers

I'm considering 2 general methods:

a. Compare 2 voice clips directly
b. Convert 2 voice clips to text (using voice-to-text) and then compare the 
words in text format

Note that Ali Lloyd from the LiveCode team has developed various things to 
help.  However I've hit problems as follows:

a. Ali has wrapped a standard Android sound library that compares 2 WAV files 
and gives a percentage match. However the comparison is either far too 
forgiving or far too strict, i.e. highly unreliable.

b. Ali has wrapped a standard Android voice-to-text library which works well 
with the devices he's tried it on.  However, the Amazon tablets do not support 
this Android library!

Given the two developments from Ali both relied on preformed blackbox code 
(Android Java libraries), i may have to implement a comparison algorithm from 
scratch. A solution that's completely in LiveCode would have several benefits:

i. it may work!
ii. it may work cross-platform
iii. it may be understandable!

General reading around this subject produces recommendations such as using FFTs 
(Fast Fourier Transforms), MFCCs (Mel Frequency Cepstral Coefficient), etc. but 
I can't find anything that gives an end-to-end method, from sound in to 
comparative score out!

Any help with this would be gratefully received!

Peter
--
Peter Reid
Loughborough, UK


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



--
Phil Davis


___
use-livecode mailing list
use-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: read larger data streams over sockets - broken?

2017-12-06 Thread Phil Davis via use-livecode

On 12/6/17 6:12 PM, Sannyasin Brahmanathaswami via use-livecode wrote:

May not mean anything for your use case, but I have built an in-house revision 
control system for InDesign documents… it's been in use for several years after 
the death of Adobe VersionCue (which was a night mare anyway) our team loves 
it: super simple, never fails, we never lose data, ever.

I use shell commands for everything.  not sure why you need sockets if you are 
just copy files around…from our Macs to the Synology server in the next room…


Right, a NAS device can work very well as it obviously does in your 
situation. Unfortunately this a point of sale (and more) business system 
where we want to control how much access the users have to the data, 
especially regarding things like customer credit card info. So we don't 
want to have the server mounted on each user's desktop (as would be 
required with a NAS) where they can just go in and poke around.


But thanks for your offer!

Phil



my long stack script just manages different

put format "mv \"someFile\", \"newFileName\"  # into cmdRename
and
cp # similar strings

then

get shell cmdRename

and the OS does everything..

If you want to see the stack you are welcome. It's being used (or was) by some 
publication team in Singapore for the same work.

On 12/6/17, 1:52 PM, "use-livecode on behalf of Phil Davis via use-livecode" 
<use-livecode-boun...@lists.runrev.com on behalf of use-livecode@lists.runrev.com> wrote:

 Is anyone else having problems with moving multi-MB data streams across
 sockets in LC 8?
 
 I support a LAN-based system that relies on sockets to move data between

 server and clients. The server's response to a single client request
 will often consist of several hundred KB to several MB of data. Until LC
 8 the successful approach has been:

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


--
Phil Davis


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

read larger data streams over sockets - broken?

2017-12-06 Thread Phil Davis via use-livecode
Is anyone else having problems with moving multi-MB data streams across 
sockets in LC 8?


I support a LAN-based system that relies on sockets to move data between 
server and clients. The server's response to a single client request 
will often consist of several hundred KB to several MB of data. Until LC 
8 the successful approach has been:


- client sends request to server

- server returns data to client

- client reads the returned data:

   read from socket tMySocket for 1 line -- contains the length of the
   data that follows
   put it into tDataLength
   repeat while length(tData) < tDataLength
    read from socket tMySocket for tDataLength
    wait 1 millisecond with messages
    put it after tData
   end repeat

This approach no longer works in LC 8. There are 2 new issues:
    - large time delays
    - wrong final data size

Here are some actual results from a client that was trying to receive 
151k of data - not that big!


   tDataLength = 151954

   read #1 got 0 chars in 15.25521 secs
   read #2 got 131761 chars in 15.001723 secs
   read #3 got 131761 chars in 0.001813 secs
   actual received data length = 263522
   total elapsed time = 30.259262 secs

I changed the client code to read 'until EOF' and got similar outcomes:

   tDataLength = 151954

   read until EOF #1 got 0 chars in 15.254117 secs
   read until EOF #2 got 131761 chars in 15.004341 secs
   read until EOF #3 got 131761 chars in 0.001733 secs
   actual received data length = 263522
   total elapsed time = 30.260464 secs

Either 'read' structure works fine as long as the data length doesn't 
exceed roughly 128k (that's the max in my world at least - YMMV). I'm 
not sure if the 128k size constraint is coming from LC or from my 
network (a standard gigabit-Ethernet LAN with router, switches, 
computers) or from some other source.


I know this is a bug and plan to file a bug report, but I wanted to see 
if anyone else has experienced something similar.


Thanks -
Phil Davis

--
Phil Davis

___
use-livecode mailing list
use-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: Awful quiet around here

2017-11-14 Thread Phil Davis via use-livecode

That's sort of like saying "Anyone who can't hear me raise your hand."
Oh well. All in a day's fun. Or work.

Phil


On 11/14/17 3:49 AM, Heather Laine via use-livecode wrote:

Just checking if the list is functioning correctly. Seems impossible you all 
stopped talking at once...

If you receive this message, ignore it.

Otherwise, do let me know :)

Best

Heather

Heather Laine
Customer Services Manager
LiveCode Ltd
www.livecode.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



--
Phil Davis


___
use-livecode mailing list
use-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: OT : need help understanding why my web page isn't behaving right :-)

2017-11-07 Thread Phil Davis via use-livecode

Flush your browser cache and try again?

Phil Davis



On 11/7/17 3:27 PM, Alex Tweedly via use-livecode wrote:


I just discovered a problem with one of my web pages - but can't 
figure out just where it's coming from. Anyone know their way around 
chrome tools and able to help ?


If you load the page

   https://www.kilmelford.com/igniter.lc/basic/Services

the links in the body of the page (to "Netherlorn Churches") don't act 
as links, they aren't clickable.


Same page on Safari works fine.

I think the reason they don't work in Chrome is that it won't load the 
font file because it is loaded as an "http" rather than "https", and 
chrome won't downgrade the security level.


Turning on "Developer tools" in Chrome, I see an error, that it is 
failing to load


css?family=Source+Sans+Pro:300,300italic,600,600italic

I don't (afaict) have any unchanged reference to

http://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300italic,600,600italic 



the only reference I have is in the main.css, and has been changed to 
https.


Is there any way to find out exactly where this is being (indirectly) 
loaded from ?


Many thanks,

Alex.

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

http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis


___
use-livecode mailing list
use-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: Getting directory list from web server??

2017-11-06 Thread Phil Davis via use-livecode

Hi Tim,

Here is a wild guess.

I maintain an account on sage too. Late last week I contacted on-rev 
support about an issue and was told this:


   There was an update to cPanel yesterday that overwrote our custom
   apache templates that allow LiveCode Server to work.

They restored the required templates and my site works again, but maybe 
their recent changes have something to do with the new behavior you see.


Regards -
Phil Davis


On 11/6/17 7:24 PM, Tim Selander via use-livecode wrote:

Hi,

Up until now, in my livecode server script,

put URL "http://www.myserver.com/radio/15/; after vlist

has gotten me text list of the directory contents.

Now it gets me a "You don't have permission to access." error 
message.


on-rev hosting, "sage" is the server.

Anyone know what is going on?

TIA

Tim Selander
Tokyo, Japan

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

http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis

___
use-livecode mailing list
use-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: Control properties not included in the Property Inspector

2017-11-06 Thread Phil Davis via use-livecode

put the properties of  into tProps


On 11/6/17 1:47 PM, Phil Davis via use-livecode wrote:

Try:
put the properties of field "fldCustID" into tProps
put the keys of tProps

That will give you all the keys of the properties array, but keep in 
mind that a few of the properties may be arrays themselves.


Phil Davis


On 11/6/17 1:14 PM, Alejandro Tejada via use-livecode wrote:

Bob Sneidar wrote:
put the Properties of field "fldCustID" into tProps;put 
printKeys(tProps)

The Message Box produces an error:
Object does not exists
Hint: fldCustID

Al

On Mon, Nov 6, 2017 at 3:31 PM, Alejandro Tejada 
<capellan2...@gmail.com>

wrote:

Hi All,

Where could I find a list of control properties that
are not included within the Property Inspector?

For example:
clipstoRect (a Boolean (true or false) property of groups)
capsStyle (a property of graphics)
joinStyle (a property of graphics)
miterLimit (a property of graphics)
fillRule (a property of graphics)
and others...

Thanks in advance!

  Al

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

http://lists.runrev.com/mailman/listinfo/use-livecode





--
Phil Davis


___
use-livecode mailing list
use-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: Control properties not included in the Property Inspector

2017-11-06 Thread Phil Davis via use-livecode

Try:
put the properties of field "fldCustID" into tProps
put the keys of tProps

That will give you all the keys of the properties array, but keep in 
mind that a few of the properties may be arrays themselves.


Phil Davis


On 11/6/17 1:14 PM, Alejandro Tejada via use-livecode wrote:

Bob Sneidar wrote:

put the Properties of field "fldCustID" into tProps;put printKeys(tProps)

The Message Box produces an error:
Object does not exists
Hint: fldCustID

Al

On Mon, Nov 6, 2017 at 3:31 PM, Alejandro Tejada 
wrote:

Hi All,

Where could I find a list of control properties that
are not included within the Property Inspector?

For example:
clipstoRect (a Boolean (true or false) property of groups)
capsStyle (a property of graphics)
joinStyle (a property of graphics)
miterLimit (a property of graphics)
fillRule (a property of graphics)
and others...

Thanks in advance!

  Al

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



--
Phil Davis


___
use-livecode mailing list
use-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: not really OT: The Coming Software Apocalypse

2017-10-04 Thread Phil Davis via use-livecode
Except people will always want what they want. As I understand it, that 
drives disagreements far more than the absence/presence of knowledge. 
(James 4:1 )


Sorry, I couldn't resist... I just HAD to respond to your 
tongue-in-cheek comment...

Guess that makes me the poster child of what I just said. :-)

Phil Davis


On 10/4/17 10:10 AM, Bob Sneidar via use-livecode wrote:

To which I will add as a side note, once we know everything, there will be no 
more opinions or opposing views. :-)

Bob S



On Oct 4, 2017, at 09:12 , Jim Lambert via use-livecode 
 wrote:


Richmond wrote:

once a system constructed by humans reaches a certain level of complexity
those humans are unable to predict how it will behave in certain circumstances.

And sometimes we’re unable to explain WHY a system behaved as it did, which is 
increasingly common with certain AI and cognitive computing systems.

Jim Lambert

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


--
Phil Davis

___
use-livecode mailing list
use-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   >