Re: Decrypting (and encrypting) Large files

2022-05-16 Thread Phil Davis via use-livecode



On 5/10/22 12:35 PM, Richard Gaskin via use-livecode wrote:

Mark Clark wrote:

> Wondering if anyone has used LiveCode for encrypting-decrypting large
> files?
...
> I’m thinking about using LC for decrypting zip compressed log files
> that can be multiple gigabytes in size. I’d like to use just LC vs.
> resorting to shell if possible.

What is behind the preference to roll your own rather than call 
existing purpose-built command-line tools from LC with shell()?



I like this option. You could use shell("openssl ") to 
encrypt any size file. Also it may be possible to run 'openssl' as a 
process, by which (I believe) you could make it non blocking, running in 
the background. (I haven't tried opening 'openssl' as a process, just 
speculating here.)


Phil Davis




Your chunking described in your latest post seems the way to go, AFAIK 
pretty much how other tools would handle it.


Another option:  if you're in an environment where even log files 
require strong encryption, could you pipe log data to a separate 
secured log server instead?




--
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 to extract a video clip...

2022-03-20 Thread Phil Davis via use-livecode

Hi Paul,

Your app doesn't have to install ffmpeg on the user's system - your app 
can run it from where it resides in your app's bundle. (Just reference 
it in your command line using its full path, not just 'ffmpeg'.)


Phil Davis


On 3/19/22 12:18 PM, Paul Dupuis via use-livecode wrote:

On 3/19/2022 2:55 PM, Matthias Rebbe via use-livecode wrote:

You could use ffmpeg for this.

Here‘s a post where it is described how to do it

https://superuser.com/questions/377343/cut-part-from-video-file-from-start-position-to-end-position-with-ffmpeg 






I have (and still am) considering ffmpeg. It was what I was alluding 
to with the mention of a command line utility called by shell() in my 
original post. To bundle the macOS (~35mb) and Windows (~77mb) adds 
that size (or that compressed) to my Standalone, so my app can install 
it on the users system (I have the sort of computer novice customers 
that you do NOT want to ask to download additional software of). 
That's not too bad a size increase as my App sits at about 200-230mb 
currently.


Still, I asked the USE-LIST as you never know whether some one out 
there has made a widget that could just be part of the standalone app 
or someone knows of a clever technique or a smaller utility


Thank you.

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

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


--
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: Speed up a slow loop

2022-03-02 Thread Phil Davis via use-livecode

Jacque -

Did it ever work as expected, or has it always behaved this way on all 
devices? (If it ever did work right, I guess that points to a change 
that happened outside your code.)


Phil Davis


On 3/2/22 4:35 PM, J. Landman Gay via use-livecode wrote:

On 3/2/22 5:12 PM, Devin Asay via use-livecode wrote:

Have you tried

put the keys of sDictFile into tCorrWdList
repeat for each line I in pList
    if I is among the lines of tCorrWdList then
   put I & cr after tCheckedList
    else
   put I & cr after tNonWords
    end if
end repeat


Yeah. No change. But I do appreciate the reply. I've been trying to 
figure this out for 2 days.




--
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: RIP David Boggs

2022-03-02 Thread Phil Davis via use-livecode
The quote, for those struggling with browsers and paywalls. I was able 
to see it in a Tor browser:


   Before becoming the dominant networking protocol, Ethernet was
   challenged by several other technologies. In the early 1980s, Mr.
   Metcalfe said, when Mr. Boggs took the stage at a California
   computing conference, at the San Jose Convention Center, to discuss
   the future of networking, a rival technologist questioned the
   mathematical theory behind Ethernet, telling Mr. Boggs that it would
   never work with large numbers of machines.

   His response was unequivocal. “Seems Ethernet does not work in
   theory,” he said, “only in practice.”

   
https://www.nytimesn7cgmftshazwhfgzm37qxb44r64ytbb2dj3x62d2lljsciiyd.onion/2022/02/28/technology/david-boggs-dead.html


A keeper indeed.
Phil Davis


On 3/1/22 10:31 AM, Mark Wieder via use-livecode wrote:

On 3/1/22 10:26, Stephen Barncard via use-livecode wrote:

Paywall


Opened without a paywall for me.
That last quote is a keeper.



--
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: Simple? DG question

2022-02-15 Thread Phil Davis via use-livecode
Sean, you hit the nail on the head! Thank you! After updating the 
'answer' field, I added this code:


    -- update the DG internal array
    put fld "answer" of me into tDataA["answer"]
    put fld "question" of me into tDataA["question"]
    set the dgDataOfIndex [ the dgIndex of me ] of the
   dgControl of me to tDataA

Now it works perfectly.

You are the MAN!!!  :-)

Phil


On 2/15/22 3:40 PM, Pi Digital via use-livecode wrote:

When the user clicks on the toggle, do you have script that is overwriting the 
dgData or dgText and then invoking a redraw of the form? Or are you only 
changing the state of the graphic? Ideally you want to change the data and 
allow it to redraw the grid again.

I’m coding the same myself at this very moment for a project I’m on where I 
want layers to be made visible and invisible. I’m allowing the user to mouseUp 
on an SVG widget with the ‘eye open’ iconPresetName which then calls a handler 
with the layer number and the target (which is the ‘visibility’ widget) which 
adjusts the data for the grid and rewrites to it by using ‘set the 
dgDataOfIndex[pLayerNum] to pVisible' or something like it. Once all the 
handlers are complete it redraws the grid with the updated visibility icon.

Does that help?

Sean Cole
Pi Digital Productions Ltd

eMail Ts & Cs



On 15 Feb 2022, at 22:03, Phil Davis via 
use-livecode  wrote:

Hi folks,

I have a 'form' Data Grid where each line's data objects are:
- a 'question' text field whose value is set once and never changed.
- an 'answer' text field whose value is set by the user's interaction with a 
2-state 'answer' group.

When the user clicks/taps the 2-state 'answer' group, its visual state changes 
to acknowledge the tap, and its new state (true or false) is put into the 
'answer' text field. I have verified that this part works, and the toggle 
object is setting the value of the 'answer' text field to reflect the visual 
state of the toggle object.

My problem:
For some reason, the dgText and dgData of the data grid only contain 'false' as 
the answer values from every line in the DG, regardless of the toggle settings 
(and therefore the text values in the 'answer' fields). Like this:

   falseFever above 100°F
   falseUnexplained body aches or pain
   falseCoughing
   falseSore throat
   falseChills

What am I missing?

Thanks for any insight you can 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


Simple? DG question

2022-02-15 Thread Phil Davis via use-livecode

Hi folks,

I have a 'form' Data Grid where each line's data objects are:
- a 'question' text field whose value is set once and never changed.
- an 'answer' text field whose value is set by the user's interaction 
with a 2-state 'answer' group.


When the user clicks/taps the 2-state 'answer' group, its visual state 
changes to acknowledge the tap, and its new state (true or false) is put 
into the 'answer' text field. I have verified that this part works, and 
the toggle object is setting the value of the 'answer' text field to 
reflect the visual state of the toggle object.


My problem:
For some reason, the dgText and dgData of the data grid only contain 
'false' as the answer values from every line in the DG, regardless of 
the toggle settings (and therefore the text values in the 'answer' 
fields). Like this:


   false    Fever above 100°F
   false    Unexplained body aches or pain
   false    Coughing
   false    Sore throat
   false    Chills

What am I missing?

Thanks for any insight you can 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: Mac Multiple Monitor Menubar Management

2022-01-23 Thread Phil Davis via use-livecode
Actually 'the working screenRects' returns that info for all screens. 
Maybe that could work for you.


Phil


On 1/23/22 10:21 PM, Phil Davis via use-livecode wrote:

Hi Mike,

Would this give you what you need?

function menubarHeight
    return item 2 of the working screenRect
end  menubarHeight

Phil Davis


On 1/23/22 7:39 PM, Mike Kerner via use-livecode wrote:

Other than using windowBoundingRect, is there any way to compute the
menubar height? The 2021 MBP's have changed the height of the menubar to
accommodate the notch.
Generally it's 42 pixels on the new MBP, except when it's something 
else,
especially on secondary monitors (e.g. I've seen it at 50 px in one 
case).
I want to constrain the movement of a window to keep the user from 
dragging
it under the menubar. The code I have works great, until you add 
monitor 2.
screenRects (plural) tells you what the rect is for the second 
window, but
it doesn't take the menubar into account. I could just assume it's 
the same

height as the menubar on monitor 1, but that assumes that the menubar is
present on monitor 2, as well.
___
use-livecode mailing list
use-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: Mac Multiple Monitor Menubar Management

2022-01-23 Thread Phil Davis via use-livecode

Hi Mike,

Would this give you what you need?

function menubarHeight
    return item 2 of the working screenRect
end  menubarHeight

Phil Davis


On 1/23/22 7:39 PM, Mike Kerner via use-livecode wrote:

Other than using windowBoundingRect, is there any way to compute the
menubar height? The 2021 MBP's have changed the height of the menubar to
accommodate the notch.
Generally it's 42 pixels on the new MBP, except when it's something else,
especially on secondary monitors (e.g. I've seen it at 50 px in one case).
I want to constrain the movement of a window to keep the user from dragging
it under the menubar. The code I have works great, until you add monitor 2.
screenRects (plural) tells you what the rect is for the second window, but
it doesn't take the menubar into account. I could just assume it's the same
height as the menubar on monitor 1, but that assumes that the menubar is
present on monitor 2, as well.
___
use-livecode mailing list
use-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: Rounding in LiveCode vs Excel

2022-01-09 Thread Phil Davis via use-livecode
Will using "statround()" instead of "round()" give you an 
Excel-comparable outcome?


Phil Davis


On 1/9/22 12:49 PM, Andreas Bergendal via use-livecode wrote:

Hi all,

TLDR;

In LC:
round(0.5,0) = 1 (Excel agrees)
round(5,-1) = 0  (Excel disagrees and makes that 10!)

I agree with Excel, I want the latter rounded to 10, not 0. Is LC doing it 
’wrong’ and if so, why?


Long version:
I’m building software for a client that will do some calculations that are 
currently done in Excel. They want most amounts rounded off by hundred, so e.g. 
1049 is rounded to 1000 and 1050 is rounded to 1100 etc.

In Excel they would use this formula structure: ROUND(1050/100;0)*100 for which 
Excel returns 1100. I pointed out that ROUND(1050;-2) would give the same 
result, which they were unaware of. In Excel it does.

So, I thought I’d be smart and use the shorter form in LiveCode: round(1050,-2)
Astonishingly though, for that LiveCode returns 1000.
While round(1050/100,0)*100 returns 1100 also in LiveCode, which is what we 
want.

So I ended up having to use the cumbersome, long version in LiveCode to get 
what Excel gives in both versions.

Is LiveCode (or Excel) doing it ’wrong’, or what is going on?
Why does LiveCode round decimals with one logic and integers with another?

/Andreas
___
use-livecode mailing list
use-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: New user

2021-12-20 Thread Phil Davis via use-livecode

Welcome to the list, Alex!

There are people here who are a LOT more familiar with Windows <-> 
device communication than I am, but I can at least ask questions.


Are you familiar with the "open driver" command and 
"serialControlString" property? They might give you some of what you need.


I confess I haven't worked in a Windows environment in many years, so 
what I used to know may now be obsolete. Ahh, technology!


Best regards -
Phil Davis


On 12/20/21 8:33 PM, Alex Hughson via use-livecode wrote:

Hello all. I am a beginner user of LiveCode. I’ve managed to work my way 
through a project which I think I can complete. However the project has to be 
able to communicate with an I/O board (Numato 16 channel USB GPIO Module for 
example) from a Windows Standalone application. I have not been able to find 
any guidance or samples for how to do this. This has led me to wonder if it is 
even possible to creat some kind of serial communication using LC or whether I 
should start over with a different platform. I am doing the LC work using a 
Mac. Any help or advice would be much appreciated.

___
use-livecode mailing list
use-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 directory of a running script

2021-11-12 Thread Phil Davis via use-livecode
Also, maybe try "the filename of me". It seems like that should work, 
though I could be wrong.


Phil Davis


On 11/12/21 2:46 AM, jbv via use-livecode wrote:

Great ! Thank you.

Le 2021-11-12 05:20, Ralf Bitter via use-livecode a écrit :

You might try $_SERVER["PATH_TRANSLATED"]


Ralf



___
use-livecode mailing list
use-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: [OT] Multiple macOS recommendation sought

2021-10-26 Thread Phil Davis via use-livecode

Hi Paul,

Several years ago - 6-8-10 years ago? Not sure when - I left VMs behind 
in favor of minimally-configured actual hardware. I have a couple of 
Windows laptops but almost never use them now. My main development world 
consists of 4 Mac minis of various ages (all Intel or M1) and a couple 
of 2015 MBP laptops (and 2 iPads). Each machine has an external drive 
used by Time Machine, so I can restore my work as needed. I use Screen 
Sharing to manage things on multiple computers from a single 
keyboard/display/mouse and it works great for my purposes. I confess, I 
don't normally reinstall the OSes except for upgrades to the next 
version if needed (e.g. High Sierra to Mojave); I just keep them current 
with Apple updates and have never had a dev issue that damaged the OS.


Obviously my setup doesn't cover every macOS version, but my selected 
hardware+OS combos have been very adequate for my needs. And for me, it 
helps to have a LAN whose physical and conceptual topologies are the 
same. It helps clarify problem sources in a client/server system I maintain.


Hope this helps -
Phil Davis


On 10/26/21 2:08 PM, Paul Dupuis via use-livecode wrote:
A problem I have struggled with for decades is software testing on the 
various versions of operating systems our software deploys on.


For testing on Windows, we use Virtualbox with Virtual Machines (VMs) 
for Windows 7, Windows 8.1, and Windows 10 (we have yet to try to 
build a Windows 11 VM)


For macOS we have tried a multi-boot system, a mac Mini with hard 
disks partitions to boot to OSX 10.9, 10.10, 10.11, 10.12, 10.13, and 
10.14 (Mojave). We tried a partition for 10.15 Catalina, but were were 
already experience problems switching between boot partitions where 
the Mini would forget what Startup disk it should boot from. When we 
added Catalina, the problem became worse, trying to go from Catalina 
to an older OS on reboot or vice versa would fail.


So we tried a Mojave (10.14) laptop with Virtualbox and build a 
Catalina VM. This worked well for Catalina testing. We like VMs for 
the ability to reset to a snapshot or to clone them. We added a Big 
Sur VM, but playing video does not work in the VM and Virtualbox's 
latest release has not fixed this and macOS VMs are not really 
supported, even on mac hardware. We just tried a Monterey VM and it is 
unstable. It will crash and reboot after a random amount of time.


Some sort of virtual machine is very appealing because of the ability 
to restore the machine to a snapshot after testing or to clone it. If 
testing messes something up, you can always get back to a known state 
without rebuilding a computer.


What have other people's experiences been? Does anyone have a more 
stable, easier solution?


___
use-livecode mailing list
use-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: Whatever happened to on-rev?

2021-08-19 Thread Phil Davis via use-livecode
And yet our individual subdomains are still up and running:

http://phildavis.on-rev.com/

Phil Davis


On 8/19/21 4:50 PM, Bob Sneidar via use-livecode wrote:
> Well I'll be Pavlov's Lapdog! So it is! 
>
> Bob S
>
>
>> On Aug 19, 2021, at 16:43 , Mark Wieder via use-livecode 
>>  wrote:
>>
>> ?
>> looks like it bit the dust.
>>
>> http://on-rev.com/
>>
>> -- 
>> Mark Wieder
>> ahsoftw...@gmail.com
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

-- 
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: Need to populate array into datagrid

2021-08-10 Thread Phil Davis via use-livecode
Hi Skip,

First, make sure your array uses the format required by the datagrid. It
should be a numeric-indexed array, where each key (index) represents a
DG row (line), with that key's subkeys representing the DG columns of
the row.

Then:
set the dgData of grp "my grid" to tMyDataA

That's it!

It might be helpful to manually put a couple of lines of values into a
DG and then do something like this so you can have a visual depiction of
how the array should be organized:

-- in a test button
on mouseUp
   put the dgData of grp "my grid" into tDataA
   breakpoint
end mouseUp


Phil Davis



On 8/10/21 11:52 AM, Skip Kimpel via use-livecode wrote:
> What is the best way to do this?  I have searched my old code, online
> results, etc and cannot find a clear cut answer.  Having said that, it has
> been a VERY long time since I have done this so I am part of the "use it or
> lose it" club right now.
>
> Any help would be greatly appreciated!
>
> SKIP
> ___
> use-livecode mailing list
> use-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 to include Apple's SF Pro font in an iOS app?

2021-07-30 Thread Phil Davis via use-livecode
Thanks Jacque! I'll try '(System)' out and see what happens.

Phil


On 7/29/21 10:55 PM, J. Landman Gay via use-livecode wrote:
> I don't know why it wouldn't be allowed. Apple provides the fonts on
> their developer site and says you can download and use them:
> https://developer.apple.com/fonts/
> Fonts are often named one thing but listed differently in the font
> files. This post mentions it's named "SFUI-Regular" on iOS 13:
> https://developer.apple.com/forums/thread/126548
>
> If that's the case then you probably do have the font on the iPad and
> assigning LC's "system" font will automatically use it. In fat, that
> seems to be the preferred method according to that post.
>
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On July 29, 2021 11:19:06 PM Phil Davis via use-livecode
>  wrote:
>
>> Functionally speaking, I understand how to include it, but... will Apple
>> let me release the app with that font included? I don't speak their
>> brand of legalese very well.
>>
>> I can see the list of fonts that reside on my iPad and the SF fonts are
>> not there. (I'm running iOS 14.6. ) But Apple makes it sound like
>> they're ready for use. So I don't know what I'm supposed to do if I want
>> to use the font in my app.
>>
>> Do you have experience with this issue? I could use some guidance.
>>
>> Many 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


how to include Apple's SF Pro font in an iOS app?

2021-07-29 Thread Phil Davis via use-livecode
Functionally speaking, I understand how to include it, but... will Apple
let me release the app with that font included? I don't speak their
brand of legalese very well.

I can see the list of fonts that reside on my iPad and the SF fonts are
not there. (I'm running iOS 14.6. ) But Apple makes it sound like
they're ready for use. So I don't know what I'm supposed to do if I want
to use the font in my app.

Do you have experience with this issue? I could use some guidance.

Many 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: the systemversion shows wrong version # on Mac

2021-05-07 Thread Phil Davis via use-livecode
If you want the actual macOS system version, you can use the 'sw_vers'
shell command.

phils-macbook-pro:~ pdslabs2$ sw_vers -productVersion
10.15.7

or

phils-macbook-pro:~ pdslabs2$ sw_vers
ProductName:    Mac OS X
ProductVersion:    10.15.7
BuildVersion:    19H1030

Phil Davis



On 5/7/21 7:25 AM, Andre Garzia via use-livecode wrote:
> Tiemo,
>
> This is not a bug.
>
> MacOS Big Sur will identify itself as both 10.16.0 and 11.x. This is by 
> design so that scripts checking for version compatibility can see Big Sur as 
> just a minor version of 10.x
>
> The version seen depends on both which SDK was used to compile the app, and 
> also on the value of the environment variable called SYSTEM_VERSION_COMPAT.
>
> Best
> Andre
>
>> On 7 May 2021, at 13:00, Tiemo via use-livecode 
>>  wrote:
>>
>> Hello,
>>
>>
>>
>> I am on macOS 11.2.3 and the systemversion shows 10.16.0?
>>
>> It shows the same at least going back to 8.1.7
>>
>>
>>
>> Do I have to multiply the systemversion by 1.1053 to get the real one?
>>
>>
>>
>> Tiemo
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> use-livecode mailing list
>> use-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: notarizing DMG fails - solved

2021-05-05 Thread Phil Davis via use-livecode
Thank you Matthias! Your tools make my life SO much easier! You have
done a great service for this community.

Phil Davis


On 5/5/21 2:20 AM, matthias rebbe via use-livecode wrote:
>> Am 05.05.2021 um 11:10 schrieb Tiemo via use-livecode 
>> :
>>
>> Thank you all for helping my lost soul in Apples notarizing nirvana
>>
>> Tiemo
>>
>> P.S.
>> Matthias, perhaps you want to add this in your great helpfile - without that 
>> it would have taken weeks for me!
>>
> I am currently working on it. ;) 
> First i will just add a note, but later, when i have more free time  i will 
> enhance it to describe all more detailed.
>
> The Helper Stack will also get an update to support package installers. But 
> it takes some time.
>
>
>
>> -Ursprüngliche Nachricht-
>> Von: use-livecode  Im Auftrag von 
>> matthias rebbe via use-livecode
>> Gesendet: Mittwoch, 5. Mai 2021 10:31
>> An: How to use LiveCode 
>> Cc: matthias_livecode_150...@m-r-d.de
>> Betreff: Re: notarizing DMG fails
>>
>> Tiemo,
>>
>> i think i found the solution. I tried here myself and did als get the error 
>> "this identity cannot be used for signing code" when using the Developer ID 
>> Installer certificate for signing the .pkg.
>> According to Apple (see point 2)
>> https://help.apple.com/xcode/mac/current/#/deve51ce7c3d
>>
>> you have to use the tool productsign to sign the package installer. 
>>
>> So the syntax is like this
>>
>> productsign --sign
>> 
>>
>> Example
>> productsign --sign "Developer ID Installer: Matthias Rebbe ()"  
>> "/users/matthias/LC/builts/test/test.pkg" 
>> "/users/matthias/LC/builts/test/test_signed.pkg"
>>
>> After successful signing i got this messages in Terminal
>>
>> productsign: using timestamp authority for signature
>> productsign: signing product with identity "Developer ID Installer: Matthias 
>> Rebbe ()" from keychain 
>> /Users/matthias/Library/Keychains/login.keychain-db
>> productsign: adding certificate "Developer ID Certification Authority"
>> productsign: adding certificate "Apple Root CA"
>> productsign: Wrote signed product archive to 
>> /users/matthias/LC/builts/test/test_signed.pkg
>>
>>
>> Regards
>>
>> -
>> Matthias Rebbe
>> Life Is Too Short For Boring Code
>
> ___
> use-livecode mailing list
> use-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: [bug] strange memory leak in LC

2021-03-26 Thread Phil Davis via use-livecode
I created a little "leak test" stack that runs the "leaks" shell command
against the processID of the LC engine that runs the stack. It checks
for new leaks every 60 seconds and lists the number and size of each new
leak found. I'm running it in LC 9.6.1 on 3 Macs right now - Catalina,
High Sierra and Big Sur.

After about 30 minutes:
- LC on Big Sur (M1) has 10 leaks for a total of 688 bytes.
- LC on Catalina (Intel) has no leaks.
- LC on High Sierra (Intel) has no leaks.

Just FYI -
Phil Davis


On 3/26/21 7:33 PM, John Balgenorth via use-livecode wrote:
> I am not personally using Bug Sur but if you make a standalone does
> it leak  memory too or is this only with the development system?
>
> JB
>
>> On Mar 26, 2021, at 7:29 PM, scott--- via use-livecode 
>>  wrote:
>>
>> I’m running Big Sur and just got a warning from the OS that I was out of 
>> application memory. Livecode was using 133.52 GB of memory.  It had been 
>> open for a couple days but it wasn’t doing anything.
>> --
>> Scott Morrow
>>
>> Elementary Software
>> (Now with 20% less chalk dust!)
>> web   https://elementarysoftware.com/
>> email sc...@elementarysoftware.com
>> booth1-360-734-4701
>> --
>>
>>> On Mar 26, 2021, at 6:53 AM, Andre Garzia via use-livecode 
>>>  wrote:
>>>
>>> Sean,
>>>
>>> The stack was not running anything. It was simply opened. I don’t believe 
>>> it would leak like that. Anyway, I’m monitoring to see if it happens again.
>>>
>>> A
>>>
>>>>> On 26 Mar 2021, at 13:01, Sean Cole (Pi) via use-livecode 
>>>>>  wrote:
>>>> Wow, Andre, that's impressive. That amounts to about 34MB per minute over
>>>> 48hrs. I've had a pretty massive stack (226MB file at the moment) on my Mac
>>>> sitting here over the last week. Looking in the activity monitor, LC has
>>>> 987MB associated with it. and watching it over a period of time it remains
>>>> stable and even went down a tiny bit.
>>>>
>>>> I wonder if this is more an issue with Rosetta2 in this instance. Maybe
>>>> something in LC leaks because of the Rosetta transformation of the binary.
>>>> Perhaps, as a test, open the same stack on a non-AppleSilicon Mac and watch
>>>> them both for how much memory they expend over a period of time.
>>>>
>>>> All the best with that.
>>>>
>>>> Sean
>>>>
>>>> On Fri, 26 Mar 2021 at 10:03, Andre Garzia via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>>
>>>>> I have no idea what happened. I’m running LC 9.6.2-rc-3 on macOS Big Sur
>>>>> on M1 ISA (so it is running under Rosetta 2). I kept the IDE opened for a
>>>>> couple days, I was working on a gaziliion stacks at the same time and was
>>>>> not yet ready to close them.
>>>>>
>>>>> The stacks were not doing anything, they were not running “send in time”
>>>>> commands or doing any kind of processing, they were just opened. Then 
>>>>> macOS
>>>>> showed me a dialog I have never ever seen on macOS 10.x, a memory
>>>>> exhaustion dialog. Looking closer at it, LiveCode was using 100 GB of
>>>>> memory, as in Gigabyte, as can be seen on this screenshot:
>>>>>
>>>>> http://andregarzia.com/img/shots/lc-memory-leak.png <
>>>>> http://andregarzia.com/img/shots/lc-memory-leak.png>
>>>>>
>>>>> I remember things like the “default button” causing leaks due to the
>>>>> animation and so on, but all I had was a bunch of custom stacks open and
>>>>> the script editor focused. Thats it. It was open since yesterday.
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-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: Setting Creation Date of file to a past date?

2021-03-14 Thread Phil Davis via use-livecode
On Mac or Linux you can use the "touch" shell command - not sure if it's 
available on Windows. You can download the "Shell Command Help" LC 
plugin to simplify access to info about it.


Phil Davis


On 3/14/21 1:04 PM, Michael Kristensen via use-livecode wrote:

Hi there

I want to create/export some images from Livecode to fit into a slideshow that 
is sorted by creation date.

It means that the files I export shall have a creation date of the past. So 
that when they are put into the folder of the slideshow, the images are placed 
automatically at the desired places.

How would you go about to set the creation date of a file to a date in the past 
with Livecode (maybe with the help of shell or applescript)

Thanks
Michael
___
use-livecode mailing list
use-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: mergFTPd example?

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

Thanks Håkan -
Phil

On 3/10/21 2:05 AM, ha...@exformedia.se wrote:
I would go for a REST API on the desktop and then use the https 
protocol. On the mobile app you can then just use the powerful url 
command. Take a look at ”post data to URL” in the dictionary. And 
maybe also the ”put url … into” for getting data in the opposite 
direction.


:-Håkan
On 10 Mar 2021, 08:29 +0100, Phil Davis via use-livecode 
, wrote:

I'm anticipating the need to connect an iOS app with a companion desktop
app so the desktop app can get data from the mobile app and do some
reporting and recordkeeping. It should also be able to transfer data
back to the mobile app. Does anyone have an example of how to make that
happen? I can't find one anywhere.

The data connection & transfer don't have to be made with mergFTPd but I
see it's an LC option.

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


--
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: mergFTPd example?

2021-03-10 Thread Phil Davis via use-livecode
Thank you Matthias! I haven't played with 9.6.2 yet but will now be 
doing so very soon. I'll look into it tomorrow (it's almost 2 AM here) 
and see what I can learn.


Thanks again -
Phil


On 3/10/21 1:47 AM, matthias rebbe via use-livecode wrote:

Hi Phil,
i would say mergFTPd is the easiest way to accomplish that.

Did you already check  the mergFTP Demo stack which is inside the Livecode app 
bundle, e.g.  here for LC 9.6.2

/Applications/LiveCode Business 9.6.2 (rc 
2).app/Contents/Tools/Ext/mergFTPD-1.0.56

You just need to set/select the correct provisioning profile in the standalone 
settings under iOS and you could test that stack on your iOS device or in the 
simulator.

Now regarding fetching data from the iOS device.

Let's say the ip of the iOS device is 192.168.0.25, the username and password 
for the ftp access are the same as in the demo stack and the file we want 
retrieve is report.xlsx and want to store it on the desktop, then the command 
to fetch the file is

put URL "ftp://hello:world@192.168.0.25/report.xlsx; into URL 
"binfile:~/desktop/report.xlsx"

To upload a file to the server the following would be used

put URL "binfile:~/desktop/report.xlsx" into URL 
"ftp://hello:world@192.168.0.25/report.xlsx;


Regards,
Matthias

-
Matthias Rebbe
Life Is Too Short For Boring Code


Am 10.03.2021 um 08:27 schrieb Phil Davis via use-livecode 
:

I'm anticipating the need to connect an iOS app with a companion desktop app so 
the desktop app can get data from the mobile app and do some reporting and 
recordkeeping. It should also be able to transfer data back to the mobile app. 
Does anyone have an example of how to make that happen? I can't find one 
anywhere.

The data connection & transfer don't have to be made with mergFTPd but I see 
it's an LC option.

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


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


mergFTPd example?

2021-03-09 Thread Phil Davis via use-livecode
I'm anticipating the need to connect an iOS app with a companion desktop 
app so the desktop app can get data from the mobile app and do some 
reporting and recordkeeping. It should also be able to transfer data 
back to the mobile app. Does anyone have an example of how to make that 
happen? I can't find one anywhere.


The data connection & transfer don't have to be made with mergFTPd but I 
see it's an LC option.


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: Multidimensional array issue

2021-03-08 Thread Phil Davis via use-livecode
When I want to determine whether or not an array element contains 
non-whitespace, I usually say:


    if word 1 of tDataA["item"] is empty then ... (or is NOT empty)

Just another option.

Phil Davis



On 3/8/21 5:36 PM, Bob Sneidar via use-livecode wrote:

Are you testing for empty, or are you testing if there is a value in an array 
variable? If there is no key matching your array variable, LC will return an 
empty string. An empty string is a value.

Mark is using a different method, seeing if a key of an array is itself an array. If bobtest ["value"] contains another 
array so that bobtest ["value"] ["anumber"] contains 1, then bobtest ["value"] is an array. If 
bobtest ["value"] contains 1 then it is not an array.

But getting the value of bobtest ["value"] ["number"] will return empty whether or 
not bobtest '{value"] is an array. This is why Mark is testing for an array rather than the value.

It seems a bit wonky, you might think, "Why not return an error?" But trust me, 
when you work with arrays, especially when it comes to datagrid data, this is the best 
course.

Bob S



On Mar 8, 2021, at 16:25 , HENRY LOWE via use-livecode 
 wrote:

Thanks Mark. There are two possible states:

tArray[“status”] holds a value and tArray[“status”][“text”] does not

or

tArray[“status”][“text”] holds a value and tArray[“status”] does not


My code is trying to do the following:

If tArray[“status”] does not hold a value then check if 
tArray[“status”][“text”] holds a value


The crux is how one reliably determines that an array member (e.g. 
tArray[“status”]) holds a value?

I would have assumed that if the array member does not hold a value then  - if 
tArray[member] is empty would always return true. However that does not appear 
to be the case if the array is multidimensional.


It appears that both tArray[“status”] is an array and tArray[“status”][“text”] 
is an array are true. Am I missing something about using this syntax?

Thanks,

Henry



On Mar 8, 2021, at 3:56 PM, Mark Wieder via use-livecode 
 wrote:

On 3/8/21 3:46 PM, HENRY LOWE via use-livecode wrote:


I have often used the form 'if tArray[“key1”] is empty' to determine whether an 
array element hold a value but this breaks if tArray[“key1”][“key2”] holds a 
value.

Same here. Not that I've every liked that paradigm, just that it's been that 
way since life crawled out of the ocean.

However this should do the trick.

if tArray["status"] is an array then
put tArray["status"]["text"] into tStatus
else
put tArray["status"] into tStatus
end if

--
Mark Wieder
ahsoftw...@gmail.com

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


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

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


--
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: Did I dream this ?

2021-03-04 Thread Phil Davis via use-livecode
There's mouseH, mouseV, clickH, clickV but those are the only partial 
loc things I'm aware of.


Phil Davis


On 3/4/21 10:54 AM, jbv via use-livecode wrote:

Hi list,

I thought I remembered a property like xloc or yloc
in LC that would return only the horizontal or
vertical location of an object...
Or was it before, in Metacard or even in OMO ?

jbv

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

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



--
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: 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<mailto:use-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 
<http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html>

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

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:


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



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 tLa

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


  1   2   3   4   5   6   7   >