Re: Ventura 1.3 - revcopyfile

2023-04-06 Thread Bob Sneidar via use-livecode
I just use createFolder. I discovered however that the folder you are creating 
the new folder in has to exist already. In other words, if the root folder is 
hdd/users/bob/documents I cannot simply create a folder 
hdd/users/bob/documents/filetransfer/data/forms. I have to create file 
transfer, then create data, then create forms. 

I typically do this by setting the itemDelimiter to "/" then looping through 
the items and checking to see if the folder exists next repeating if it does, 
appending the current item to the path, creating the folder, then rinse and 
repeat. 

Bob S


> On Apr 6, 2023, at 16:53, Chris Heidecker via use-livecode 
>  wrote:
> 
> Hi,
> 
> I had some trouble using revCopyFolder, maybe it is related.
> 
> Looking for a method to move/duplicate folders on MacOS I tried using 
> revCopyFolder.
> 
> The internal LC appleScript seems to use 'copy folder' in LC9.6.8
> On MacOS 12.6.3 that does not work for me.
> 'duplicate folder' does. 
> Not sure since when or what version this changed.
> Maybe it's the same for revCopyFile
> 
> Applescript from LiveCode works  pretty well for me, most of the time.
> Moving and duplicating folders in the Finder by applescript from LC is slow. 
> 
> Adding 'ignoring application responses' get's the beachball away, but also 
> all the results and errors.
> Maybe somebody has a different workaround?
> 
> My script for 'do ... as applescript' looks something like this:
> 
> set sourcePath to "/Users/.../"
> set destinationPath to "/Users/.../"
> tell application "Finder"
>   ignoring application responses
>   set theSource to sourcePath as POSIX file
>   set theDestination to destinationPath as POSIX file
>   duplicate folder theSource to folder theDestination
>   end ignoring
> end tell
> 
> The script works like expected, but getting the results and errors would be 
> helpfull.
> 
> regards,
> Chris Hiedecker
> 
>> Op 6 apr. 2023, om 13:28 heeft Paul Dupuis via use-livecode 
>>  het volgende geschreven:
>> 
>> You may also be able to address this by giving any Standalone if this app is 
>> it's own Standalone) or the Livecode version you are using the "Full Disk 
>> Access" permission, from System Settings
>> 
>> 
>> 
>> On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:
>>> Hi,
>>> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. 
>>> The function revcopyfile does not work anymore.
>>> I have stack to manage files (over 8000 pdf files), which with  revcopyfile 
>>> are getting corrupt. There are not anymore openable
>>> using preview, but also pages dokument are getting lost or corrupt, because 
>>> not anymore reopenable.
>>> 
>>> Some time a file placed in a folder is not anymore openable, moving it on 
>>> the desktop, there is sometime against openable.
>>> 
>>> I pin down the problems on a script, where I do makes on regular basis a 
>>> backup of  about 10 textfiles (Wrangler) and 20 stacks,
>>> so using revcopyfile and rename file to do it. The backup is not longer 
>>> functioning, make no copies of the files anymore. Just one
>>> old stack, which I don not use for year is copied.
>>> 
>>> So I can spend just now the time to go more deeper and investigate on the 
>>> problem, since I have to be careful not to loose my
>>> documents which I will have to deliver within the next 5 days. But at first 
>>> I couldn’t at a time open document, then I was able to
>>> pin down thats was not the system but the function revcopyfile should be at 
>>> the center of the problems. Possibly it has to do with
>>> AppleScript (I hate this app, which was and is almost a copy of hypercard 
>>> in a very bad manner) on which revcopyfile should work.
>>> 
>>> This is an alert, I will be able to go deeper finding the trouble by end of 
>>> next week.
>>> 
>>> Have  a 
>>>  nice 
>>>  Easter 
>>> !
>>> 
>>> Jean-Jacques Wagner
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-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: Ventura 1.3 - revcopyfile

2023-04-06 Thread Chris Heidecker via use-livecode
Hi,

I had some trouble using revCopyFolder, maybe it is related.

Looking for a method to move/duplicate folders on MacOS I tried using 
revCopyFolder.

The internal LC appleScript seems to use 'copy folder' in LC9.6.8
On MacOS 12.6.3 that does not work for me.
'duplicate folder' does. 
Not sure since when or what version this changed.
Maybe it's the same for revCopyFile

Applescript from LiveCode works  pretty well for me, most of the time.
Moving and duplicating folders in the Finder by applescript from LC is slow. 

Adding 'ignoring application responses' get's the beachball away, but also all 
the results and errors.
Maybe somebody has a different workaround?

My script for 'do ... as applescript' looks something like this:

set sourcePath to "/Users/.../"
set destinationPath to "/Users/.../"
tell application "Finder"
ignoring application responses
set theSource to sourcePath as POSIX file
set theDestination to destinationPath as POSIX file
duplicate folder theSource to folder theDestination
end ignoring
end tell

The script works like expected, but getting the results and errors would be 
helpfull.

regards,
Chris Hiedecker

> Op 6 apr. 2023, om 13:28 heeft Paul Dupuis via use-livecode 
>  het volgende geschreven:
> 
> You may also be able to address this by giving any Standalone if this app is 
> it's own Standalone) or the Livecode version you are using the "Full Disk 
> Access" permission, from System Settings
> 
> 
> 
> On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:
>> Hi,
>> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. 
>> The function revcopyfile does not work anymore.
>> I have stack to manage files (over 8000 pdf files), which with  revcopyfile 
>> are getting corrupt. There are not anymore openable
>> using preview, but also pages dokument are getting lost or corrupt, because 
>> not anymore reopenable.
>> 
>> Some time a file placed in a folder is not anymore openable, moving it on 
>> the desktop, there is sometime against openable.
>> 
>> I pin down the problems on a script, where I do makes on regular basis a 
>> backup of  about 10 textfiles (Wrangler) and 20 stacks,
>> so using revcopyfile and rename file to do it. The backup is not longer 
>> functioning, make no copies of the files anymore. Just one
>> old stack, which I don not use for year is copied.
>> 
>> So I can spend just now the time to go more deeper and investigate on the 
>> problem, since I have to be careful not to loose my
>> documents which I will have to deliver within the next 5 days. But at first 
>> I couldn’t at a time open document, then I was able to
>> pin down thats was not the system but the function revcopyfile should be at 
>> the center of the problems. Possibly it has to do with
>> AppleScript (I hate this app, which was and is almost a copy of hypercard in 
>> a very bad manner) on which revcopyfile should work.
>> 
>> This is an alert, I will be able to go deeper finding the trouble by end of 
>> next week.
>> 
>> Have  a 
>>  nice 
>>  Easter 
>> !
>> 
>> Jean-Jacques Wagner
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-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: How to loop through stacks with same name?

2023-04-06 Thread Bob Sneidar via use-livecode
You can supply the full path of a stack to the close stack command, but not to 
the delete stack command. That may be worth a look by the devs. 

Bob S


> On Apr 6, 2023, at 12:35, J. Landman Gay via use-livecode 
>  wrote:
> 
> The best solution would be for LC to use file paths instead of stack names to 
> identify stacks. But the current implementation is so embedded in the IDE 
> that changing it would probably break everything. This has been discussed 
> quite a bit in the past but there's no easy solution.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On April 6, 2023 1:17:59 PM "R.H. via use-livecode" 
>  wrote:
>> 
>> The name conflict could probably only be solved by the Livecode team? It is
>> annoying frequently. But there a side effects to any solution to think
>> about first.


___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread J. Landman Gay via use-livecode
The best solution would be for LC to use file paths instead of stack names 
to identify stacks. But the current implementation is so embedded in the 
IDE that changing it would probably break everything. This has been 
discussed quite a bit in the past but there's no easy solution.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 6, 2023 1:17:59 PM "R.H. via use-livecode" 
 wrote:


The name conflict could probably only be solved by the Livecode team? It is
annoying frequently. But there a side effects to any solution to think
about first.





___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread J. Landman Gay via use-livecode
Sorry, I missed the first part of your post. If destroyStack/Window is true 
then yes, I'd expect it to be completely removed when closed.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 6, 2023 1:57:40 PM Bob Sneidar via use-livecode 
 wrote:


I just tried to close a stack using it's full path and it did sort of, 
BUT... it only closes the window. The Window menu in LC still shows the 
stack! The destroyStack and destroyWindow properties are both true. Is that 
the expected behavior???





___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread J. Landman Gay via use-livecode
Closing a stack is different from deleting a stack. Deleting gets rid of it 
completely as you'd expect. Closing a stack removes it from view, removes 
it from the message path, and does everything a deleted stack does *except* 
it is kept in memory. The window structure and stack content are retained, 
the stacks are listed in the mainstacks (but not the openStacks) and appear 
in the IDE Window menu. Back in the day, this was to allow stacks to 
re-open quickly. With today's computers that's not really necessary any 
more, though it is useful if you have scripts that refer to other stacks 
often but you don't want them visible or in the message path. I have a 
multi-stack project that jumps from one stack to another. Their 
destroyStack property is false so when I close the stacks they are not 
deleted, which keeps them available and avoids excessive disk access.


To completely remove a stack, use "delete" (note that the File menu offers 
"close and remove from memory -- two different actions.) At least, 
theoretically. I've never had trouble with deletion but apparently there's 
a bug in there somewhere.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 6, 2023 1:57:40 PM Bob Sneidar via use-livecode 
 wrote:



Still, closing a stack should CLOSE the stack!





___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread Bob Sneidar via use-livecode
This begs another question, how high can the id of a stack go? Presently mine 
is over 33 million! (I use a lot of datagrids). 

Bob S


> On Apr 6, 2023, at 11:55, Bob Sneidar via use-livecode 
>  wrote:
> 
> I just tried to close a stack using it's full path and it did sort of, BUT... 
> it only closes the window. The Window menu in LC still shows the stack! The 
> destroyStack and destroyWindow properties are both true. Is that the expected 
> behavior??? 
> 
> There are of course other stacks in use, library stacks and behaviors. That 
> may be the issue. Still, closing a stack should CLOSE the stack! 
> 
> In response to someone else's post, the ID of a stack is not really it's ID, 
> it's the ID that gets assigned to the next object created in that stack, and 
> then it gets incremented. There was talk some while back about assigning a 
> REAL ID to a stack so we could deal with just this very issue. 
> 
> Bob S
> 
>> On Apr 6, 2023, at 11:15, R.H. via use-livecode 
>>  wrote:
>> 
>> I had all the same problems running through hundreds of stacks with the aim
>> to take snapshots of each to easily identify a stack visually. The dialog
>> for stacks with name conflicts always popped up. None of the methods worked
>> for me. But I will try again.
>> 
>> I have a lot of stacks with different versions, same name, and I do not
>> want to change the stack name since a stack is mostly not isolated and
>> needs a fixed name to communicate with other stacks. My changes of version
>> numbers are visible in the label name only.
>> 
>> One solution would be if it were possible to address a stack by id. But
>> that does not work even though a stack has an id. And if it were possible,
>> how to ensure that each id is unique?
>> 
>> The name conflict could probably only be solved by the Livecode team? It is
>> annoying frequently. But there a side effects to any solution to think
>> about first.
>> 
>> But I will try whatever may work.
>> 
>> Roland
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread Bob Sneidar via use-livecode
I just tried to close a stack using it's full path and it did sort of, BUT... 
it only closes the window. The Window menu in LC still shows the stack! The 
destroyStack and destroyWindow properties are both true. Is that the expected 
behavior??? 

There are of course other stacks in use, library stacks and behaviors. That may 
be the issue. Still, closing a stack should CLOSE the stack! 

In response to someone else's post, the ID of a stack is not really it's ID, 
it's the ID that gets assigned to the next object created in that stack, and 
then it gets incremented. There was talk some while back about assigning a REAL 
ID to a stack so we could deal with just this very issue. 

Bob S

> On Apr 6, 2023, at 11:15, R.H. via use-livecode 
>  wrote:
> 
> I had all the same problems running through hundreds of stacks with the aim
> to take snapshots of each to easily identify a stack visually. The dialog
> for stacks with name conflicts always popped up. None of the methods worked
> for me. But I will try again.
> 
> I have a lot of stacks with different versions, same name, and I do not
> want to change the stack name since a stack is mostly not isolated and
> needs a fixed name to communicate with other stacks. My changes of version
> numbers are visible in the label name only.
> 
> One solution would be if it were possible to address a stack by id. But
> that does not work even though a stack has an id. And if it were possible,
> how to ensure that each id is unique?
> 
> The name conflict could probably only be solved by the Livecode team? It is
> annoying frequently. But there a side effects to any solution to think
> about first.
> 
> But I will try whatever may work.
> 
> Roland


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


Re: How to loop through stacks with same name?

2023-04-06 Thread R.H. via use-livecode
I had all the same problems running through hundreds of stacks with the aim
to take snapshots of each to easily identify a stack visually. The dialog
for stacks with name conflicts always popped up. None of the methods worked
for me. But I will try again.

I have a lot of stacks with different versions, same name, and I do not
want to change the stack name since a stack is mostly not isolated and
needs a fixed name to communicate with other stacks. My changes of version
numbers are visible in the label name only.

One solution would be if it were possible to address a stack by id. But
that does not work even though a stack has an id. And if it were possible,
how to ensure that each id is unique?

The name conflict could probably only be solved by the Livecode team? It is
annoying frequently. But there a side effects to any solution to think
about first.

But I will try whatever may work.

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


Re: How to loop through stacks with same name?

2023-04-06 Thread J. Landman Gay via use-livecode
You're right, though I assumed the stack names would be sufficiently 
unique. But your way is safer.


Regardless of the method, I have no idea why it isn't working for Håkan. It 
should. Håkan, did you check your LC preferences in Files and Memory? Try 
the various options.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On April 6, 2023 7:00:29 AM Alex Tweedly via use-livecode 
 wrote:



Jacque,

those two code snippets do slightly different things - and I don't think
either of them is doing exactly what's intended; I think the intent is
to delete stack(s) called (exactly) "test".

The first one will (wrongly) catch a stack called "testabc" or "abctest"
- and then will fail on deleting 'test'.

The second one also catches "testabc" - but in this case deletes it
unintentionally.

Alternatively, we could go straight to the point


put the milliseconds into tStart
repeat forever
try
delete stack "test"
catch tmp
exit repeat
end
end repeat
answer the milliseconds - tStart

again, the timings are overlapping - the variation between different
runs far outweighs the difference between the methods. I think that
could be different if there many other mainstacks in play, but I don't
see that it would be significant in any realistic case.

So pick the one that seems  most easily read and understood :-)

Alex.

On 05/04/2023 20:27, J. Landman Gay via use-livecode wrote:

I just created four same-named stacks and ran my suggested handler
wrapped with timer commands. All four were deleted in 67 milliseconds.
LC 10.0.0 DP 4.

put the milliseconds into tStart
repeat while "test" is in the mainstacks
delete stack "test"
end repeat
answer the milliseconds - tStart

Ralph's idea to use filter is good too but slightly slower, at (a
fairly insignificant) 79 milliseconds:

put the milliseconds into tStart
filter the mainstacks with "test*" into tStacks
repeat for each line l in tStacks
delete stack l
end repeat
answer the milliseconds - tStart

On 4/5/23 10:15 AM, Bob Sneidar via use-livecode wrote:

Whoa! No I'm not! There's over 300 mainstacks just from Livecode!

Bob S


On Apr 5, 2023, at 08:07, Bob Sneidar via use-livecode
 wrote:

Oooh Pro Tip #276 from Jacque. I'm gonna use that one.

Bob S

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


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

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





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


Re: How to loop through stacks with same name?

2023-04-06 Thread Jimmieson, Phil via use-livecode
In 2017 I reported a bug related to opening a series of stack files all with 
the same name. The problem was that I could not get the old stacks to go away 
and eventually I would end up in the “duplicate stack name” dialog infinite 
loop.

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

Panos suggested putting a lock messages / unlock messages set of statements 
around the code that opened and accessed each stack and that did seem to fix 
the problem I was having (though not the bug in LiveCode).

Maybe you could do something similar here?

Another thing I considered was to rename each old stack with a unique suffix so 
that the names would no longer clash, even if the stack ended up staying in 
memory for longer than necessary…


> On 6 Apr 2023, at 13:45, Håkan Liljegren via use-livecode 
>  wrote:
> 
> Thanks for the tip! But unfortunately already tried that! I only try to work 
> with one stack at a time.
> 
> If I set a breakpoint and step over the line
> delete stack “teststack"
> 
> And then try to open a new stack with the same name there is no dialog box
> If I run the same code (without any breakpoints). I can wait forever (well 
> kind of) and the stack will still be among the mainStacks. If I run your 
> suggest code with a counter addition:
> 
> repeat while "teststack" is among the lines of the mainStacks
>  delete stack "teststack"
>  add 1 to tCount
> end repeat
> put tCount
> 
> I get an output of 1 but again if I bring up the message box after the code 
> Is executed and do a “put the mainStacks” the stack is back again! If I run a 
> loop over all my 25 stacks (or so) with the same name using the code above it 
> loops through several stacks in quick succession but then I got the dialog 
> again, and again, and again, and again… until I force quitted LiveCode.
> 
> Created there stacks teststack1, 2 and 3 in the same folder all with the same 
> name “teststack”. If I then run the following code from another stack in the 
> same folder:
> 
>   set the itemDelimiter to slash
>   put item 1 to -2 of the filename of this stack into tPath
>   repeat with i = 1 to 3 
>  open stack tPath & "/teststack" & i & ".livecode"
>  repeat while “teststack" is among the lines of the mainStacks
> delete stack "teststack"
>  end repeat
>   end repeat
> 
> Then I get a dialog asking what I want to do with teststack1 before I load 
> teststack2 and teststack2 is still open after the code has run! If I create 6 
> stacks and run the same code (but from 1 to 6 of course) I get into the 
> unstoppable dialog loop and needs to quit LiveCode! 
> 
> I’ve update the bug report https://quality.livecode.com/show_bug.cgi?id=24163 
> with new example ( https://quality.livecode.com/attachment.cgi?id=11421 ) 
> that causes my LiveCode to get into the endless dialog loop. So, don’t run 
> this if you have unsaved work in another stack!
> 
> If it works for you Jacqueline, what platform are you using? Maybe this is a 
> Mac only problem? I’m running MacOS Ventura 13.1 on a MacBook Pro (M1 Max).
> 
> :-Håkan
> 
>> On 5 Apr 2023, at 21:27, J. Landman Gay via use-livecode 
>>  wrote:
>> 
>> I just created four same-named stacks and ran my suggested handler wrapped 
>> with timer commands. All four were deleted in 67 milliseconds. LC 10.0.0 DP 
>> 4.
>> 
>> put the milliseconds into tStart
>> repeat while "test" is in the mainstacks
>>  delete stack "test"
>> end repeat
>> answer the milliseconds - tStart
>> 
>> Ralph's idea to use filter is good too but slightly slower, at (a fairly 
>> insignificant) 79 milliseconds:
>> 
>> put the milliseconds into tStart
>> filter the mainstacks with "test*" into tStacks
>> repeat for each line l in tStacks
>>  delete stack l
>> end repeat
>> answer the milliseconds - tStart
>> 
>> On 4/5/23 10:15 AM, Bob Sneidar via use-livecode wrote:
>>> Whoa! No I'm not! There's over 300 mainstacks just from Livecode!
>>> Bob S
>>> On Apr 5, 2023, at 08:07, Bob Sneidar via use-livecode 
>>>  wrote:
>>> Oooh Pro Tip #276 from Jacque. I'm gonna use that one.
>>> 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
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> 

Re: test

2023-04-06 Thread Craig Newman via use-livecode
Mike.

Why a failure? i see you.

Craig

> On Apr 6, 2023, at 8:22 AM, Mike Kerner via use-livecode 
>  wrote:
> 
> and it's a great, big, gigantic failburger
> end of line.
> 
> On Tue, Apr 4, 2023 at 11:33 AM Bob Sneidar via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> This is a test of the use list.
>> 
>> 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
>> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@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 loop through stacks with same name?

2023-04-06 Thread Håkan Liljegren via use-livecode
Thanks for the tip! But unfortunately already tried that! I only try to work 
with one stack at a time.

If I set a breakpoint and step over the line
delete stack “teststack"

And then try to open a new stack with the same name there is no dialog box
If I run the same code (without any breakpoints). I can wait forever (well kind 
of) and the stack will still be among the mainStacks. If I run your suggest 
code with a counter addition:

repeat while "teststack" is among the lines of the mainStacks
  delete stack "teststack"
  add 1 to tCount
end repeat
put tCount

I get an output of 1 but again if I bring up the message box after the code Is 
executed and do a “put the mainStacks” the stack is back again! If I run a loop 
over all my 25 stacks (or so) with the same name using the code above it loops 
through several stacks in quick succession but then I got the dialog again, and 
again, and again, and again… until I force quitted LiveCode.

Created there stacks teststack1, 2 and 3 in the same folder all with the same 
name “teststack”. If I then run the following code from another stack in the 
same folder:

   set the itemDelimiter to slash
   put item 1 to -2 of the filename of this stack into tPath
   repeat with i = 1 to 3 
  open stack tPath & "/teststack" & i & ".livecode"
  repeat while “teststack" is among the lines of the mainStacks
 delete stack "teststack"
  end repeat
   end repeat

Then I get a dialog asking what I want to do with teststack1 before I load 
teststack2 and teststack2 is still open after the code has run! If I create 6 
stacks and run the same code (but from 1 to 6 of course) I get into the 
unstoppable dialog loop and needs to quit LiveCode! 

I’ve update the bug report https://quality.livecode.com/show_bug.cgi?id=24163 
with new example ( https://quality.livecode.com/attachment.cgi?id=11421 ) that 
causes my LiveCode to get into the endless dialog loop. So, don’t run this if 
you have unsaved work in another stack!

If it works for you Jacqueline, what platform are you using? Maybe this is a 
Mac only problem? I’m running MacOS Ventura 13.1 on a MacBook Pro (M1 Max).

:-Håkan

> On 5 Apr 2023, at 21:27, J. Landman Gay via use-livecode 
>  wrote:
> 
> I just created four same-named stacks and ran my suggested handler wrapped 
> with timer commands. All four were deleted in 67 milliseconds. LC 10.0.0 DP 4.
> 
> put the milliseconds into tStart
> repeat while "test" is in the mainstacks
>   delete stack "test"
> end repeat
> answer the milliseconds - tStart
> 
> Ralph's idea to use filter is good too but slightly slower, at (a fairly 
> insignificant) 79 milliseconds:
> 
> put the milliseconds into tStart
> filter the mainstacks with "test*" into tStacks
> repeat for each line l in tStacks
>   delete stack l
> end repeat
> answer the milliseconds - tStart
> 
> On 4/5/23 10:15 AM, Bob Sneidar via use-livecode wrote:
>> Whoa! No I'm not! There's over 300 mainstacks just from Livecode!
>> Bob S
>> On Apr 5, 2023, at 08:07, Bob Sneidar via use-livecode 
>>  wrote:
>> Oooh Pro Tip #276 from Jacque. I'm gonna use that one.
>> 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
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


Re: test

2023-04-06 Thread Mike Kerner via use-livecode
and it's a great, big, gigantic failburger
end of line.

On Tue, Apr 4, 2023 at 11:33 AM Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> This is a test of the use list.
>
> 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
>


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


Re: How to loop through stacks with same name?

2023-04-06 Thread Alex Tweedly via use-livecode

Jacque,

those two code snippets do slightly different things - and I don't think 
either of them is doing exactly what's intended; I think the intent is 
to delete stack(s) called (exactly) "test".


The first one will (wrongly) catch a stack called "testabc" or "abctest" 
- and then will fail on deleting 'test'.


The second one also catches "testabc" - but in this case deletes it 
unintentionally.


Alternatively, we could go straight to the point


put the milliseconds into tStart
repeat forever
  try
     delete stack "test"
  catch tmp
    exit repeat
  end
end repeat
answer the milliseconds - tStart

again, the timings are overlapping - the variation between different 
runs far outweighs the difference between the methods. I think that 
could be different if there many other mainstacks in play, but I don't 
see that it would be significant in any realistic case.


So pick the one that seems  most easily read and understood :-)

Alex.

On 05/04/2023 20:27, J. Landman Gay via use-livecode wrote:
I just created four same-named stacks and ran my suggested handler 
wrapped with timer commands. All four were deleted in 67 milliseconds. 
LC 10.0.0 DP 4.


put the milliseconds into tStart
repeat while "test" is in the mainstacks
   delete stack "test"
end repeat
answer the milliseconds - tStart

Ralph's idea to use filter is good too but slightly slower, at (a 
fairly insignificant) 79 milliseconds:


put the milliseconds into tStart
filter the mainstacks with "test*" into tStacks
repeat for each line l in tStacks
   delete stack l
end repeat
answer the milliseconds - tStart

On 4/5/23 10:15 AM, Bob Sneidar via use-livecode wrote:

Whoa! No I'm not! There's over 300 mainstacks just from Livecode!

Bob S


On Apr 5, 2023, at 08:07, Bob Sneidar via use-livecode 
 wrote:


Oooh Pro Tip #276 from Jacque. I'm gonna use that one.

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: Ventura 1.3 - revcopyfile

2023-04-06 Thread Paul Dupuis via use-livecode
You may also be able to address this by giving any Standalone if this 
app is it's own Standalone) or the Livecode version you are using the 
"Full Disk Access" permission, from System Settings




On 4/6/2023 1:03 AM, Jean-Jacques Wagner via use-livecode wrote:

Hi,
Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles. The 
function revcopyfile does not work anymore.
I have stack to manage files (over 8000 pdf files), which with  revcopyfile are 
getting corrupt. There are not anymore openable
using preview, but also pages dokument are getting lost or corrupt, because not 
anymore reopenable.

Some time a file placed in a folder is not anymore openable, moving it on the 
desktop, there is sometime against openable.

I pin down the problems on a script, where I do makes on regular basis a backup 
of  about 10 textfiles (Wrangler) and 20 stacks,
so using revcopyfile and rename file to do it. The backup is not longer 
functioning, make no copies of the files anymore. Just one
old stack, which I don not use for year is copied.

So I can spend just now the time to go more deeper and investigate on the 
problem, since I have to be careful not to loose my
documents which I will have to deliver within the next 5 days. But at first I 
couldn’t at a time open document, then I was able to
pin down thats was not the system but the function revcopyfile should be at the 
center of the problems. Possibly it has to do with
AppleScript (I hate this app, which was and is almost a copy of hypercard in a 
very bad manner) on which revcopyfile should work.

This is an alert, I will be able to go deeper finding the trouble by end of 
next week.

Have  a 
 nice  
Easter !

Jean-Jacques Wagner








___
use-livecode mailing list
use-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: Ventura 1.3 - revcopyfile

2023-04-06 Thread panagiotis m via use-livecode
Hello Jean-Jacques,

This sounds like a permissions issue. Which version of LiveCode are you
using? IIRC, I think we fixed a similar issue in LC 9.6.8 - we added proper
permissions to the LC IDE and standalones to use AppleScript to control
other apps in recent MacOS versions.

If you still see the problem in LC 9.6.8+, I suggest you file a bug report (
https://quality.livecode.com) and include a simple sample stack which we
can use to reproduce the problem.

Kind regards,
Panos


On Thu, 6 Apr 2023 at 08:05, Jean-Jacques Wagner via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi,
> Last Sunday I upgrade to ventura 1.3 and since then I am in  big troubles.
> The function revcopyfile does not work anymore.
> I have stack to manage files (over 8000 pdf files), which with
> revcopyfile are getting corrupt. There are not anymore openable
> using preview, but also pages dokument are getting lost or corrupt,
> because not anymore reopenable.
>
> Some time a file placed in a folder is not anymore openable, moving it on
> the desktop, there is sometime against openable.
>
> I pin down the problems on a script, where I do makes on regular basis a
> backup of  about 10 textfiles (Wrangler) and 20 stacks,
> so using revcopyfile and rename file to do it. The backup is not longer
> functioning, make no copies of the files anymore. Just one
> old stack, which I don not use for year is copied.
>
> So I can spend just now the time to go more deeper and investigate on the
> problem, since I have to be careful not to loose my
> documents which I will have to deliver within the next 5 days. But at
> first I couldn’t at a time open document, then I was able to
> pin down thats was not the system but the function revcopyfile should be
> at the center of the problems. Possibly it has to do with
> AppleScript (I hate this app, which was and is almost a copy of hypercard
> in a very bad manner) on which revcopyfile should work.
>
> This is an alert, I will be able to go deeper finding the trouble by end
> of next week.
>
> Have  a <
> https://dict.leo.org/englisch-deutsch/a> nice <
> https://dict.leo.org/englisch-deutsch/nice> Easter <
> https://dict.leo.org/englisch-deutsch/Easter>!
>
> Jean-Jacques Wagner
>
>
>
>
>
>
>
>
> ___
> use-livecode mailing list
> use-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