Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
During the first part of the application's startup process, before this message is sent, the revCopyFolder command is not yet available. This may affect attempts to use this command in startup, preOpenStack, openStack, or preOpenCardhandlers in the main stack.
Once the application has finished starting up, the library is available and the revCopyFolder command can be used in any handler.
You also need to declare the full paths of the folder you are trying to copy and its destination...
I think, Klaus, it would be better to use 'send' in the oipenCard handler, rather than in openStack... as you don't know what tasks have to be performed in the openCard handler that might take more time than you have allowed send to delay from an openStack handler...
Klaus made a very subtle, but very powerful point. By placing the handler in the card script, he is pretty sure that the stack has fully opened and all resources are loaded, since cards are drawn, and their messages sent, "long" after the stack has loaded. To Dixie's point, this "delay" is inherent in the process of loading stack elements, and therefore not dependent on an arbitrary time delay, which could be either too long, which is wasteful, or too short, which is useless.
Now I ask me an other question:
if to place the handler in the card script guarantees a full opening of stack,
when to favor stack, even mainstack, ( except the interest of cards set)?
If I understand your question, I suppose you can place handlers in the stack script if they do not require very many loaded resources. Where the line between openCard and openStack should be drawn is not clear, I think. I know it is more logical and comforting to place an openStack handler in the stack script, as opposed to the card script. But the process in LC is not instantaneous. You might learn to play it safe, and always use the card script.
You could even use an openCard handler in the card script of the first card, and be assured this will open even later.