2007/11/19, Tom Phoenix <[EMAIL PROTECTED]>:
>
> On 11/18/07, Panda-X <[EMAIL PROTECTED]> wrote:
>
> > But what I want is to insert() each number per second.
>
> > sub RollText{
> >     for ( 1..5 ) {
> >       $_[0] ->{mw}{box} -> insert ( 'end', $_ ) ;
> >       sleep 1;
> >     }
> > }
>
> You probably don't want sleep() there; the after() method is generally
> the way to ask Tk to make something happen after some time interval
> has passed. The interface is different than simply sleeping, but more
> powerful; check the Tk docs for the full story.
>
> Hope this helps!
>
> --Tom Phoenix
> Stonehenge Perl Training
>


Thanks Tom,

As you said, I don't really want to sleep. =)  In this code, I am trying to
prove
the sort of insert () will only prompt after everything is done. And what I
want
to understand more is how can I get an immediate insert(), rather than wait
until all done! Any more clues ?

Thank you very much !

Reply via email to