This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Triggering when a proc has finished...

Old posts that have not been replied to for several years.
Locked
J
Jimbo

Post by Jimbo »

Is there anything that can trigger 1 proc as soon as the previous proc has finished?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Yes, make the last command in the proc, a call to the next one.

Code: Select all

proc first_proc {arg1 arg2} {
 code1
 code2
 code3
 second_proc $arg1 $arg2
}

proc second_proc {arg1 arg2} {
 command
 command
}
J
Jimbo

Post by Jimbo »

Yes, but I am using lftp inside the tcl script, and is there any way of making it start the next proc, when lftp has stopped listing the dir?
M
Mordred

Post by Mordred »

You could use vwait. Set trigger 0
then after issuing the list command, issue a vwait on trigger. Then after listing has completed, set trigger 1.

The concept is demonstrated here:
http://www.rustybrooks.org/Program/tuto ... ocket.html
J
Jimbo

Post by Jimbo »

That will not work with lftp because it is lftp that is doing the listing, and u cant set the listing to a variable...
The list is ouputted to a txt file!
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

how exactly is lftp being called from the proc in the first place?
J
Jimbo

Post by Jimbo »

doesnt matter now..ive fixed it...thanx a lot!!!
Locked