Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to refresh Tk scripts
Hi,
I have some trouble with refreshing my Tk scripts. The scripts include
some functions that last a long period of time. When they are
executed, the whole program hangs until they complete. And the user
interface is blocking.
I tried "update idletasks", but it just update after the "functions"
complete. What I need is to refresh when  the "functions"  are
execting.
I also tried "thread" and "trace", but in my opinion they didnot work.
Can anyone give me some advice? Thank you!

Regards,
zhoujingyu

Report this thread to moderator Post Follow-up to this message
Old Post
1985zhoujingyu@163.com
04-01-08 09:55 AM


Re: How to refresh Tk scripts
On Mar 31, 11:03 pm, 1985zhoujin...@163.com wrote:
> Hi,
> I have some trouble with refreshing my Tk scripts. The scripts include
> some functions that last a long period of time. When they are
> executed, the whole program hangs until they complete. And the user
> interface is blocking.
> I tried "update idletasks", but it just update after the "functions"
> complete. What I need is to refresh when  the "functions"  are
> execting.
> I also tried "thread" and "trace", but in my opinion they didnot work.
> Can anyone give me some advice? Thank you!
>
> Regards,
> zhoujingyu

See http://wiki.tcl.tk/1526 and http://wiki.tcl.tk/946.

Report this thread to moderator Post Follow-up to this message
Old Post
Aric Bills
04-01-08 09:55 AM


Re: How to refresh Tk scripts
On 4=D4=C21=C8=D5, =CF=C2=CE=E73=CA=B117=B7=D6, Aric Bills <aric.bi...@gmail
=
.com> wrote:
>
> Seehttp://wiki.tcl.tk/1526andhttp://wiki.tcl.tk/946.

Hi,
I went through the two pages, and they tell me to refresh with
"recursion" function. But I cannot make my program a recursion
function, and I have no idea how to make use of "recursion".
My program includes series of sub-functions, that is not my own code,
and packed in DLLs, thus cannot be modefied.
I try to use "recursion", such as a "clock time label" that update
automatically. And at the same time, my program is running in the same
interpreter. However it is still blocking, when a long time function
is executed. And the "clock time label" also blocks.
I'm crying for you help. Thank you!

Regards,
zhoujingyu

Report this thread to moderator Post Follow-up to this message
Old Post
1985zhoujingyu@163.com
04-03-08 04:02 AM


Re: How to refresh Tk scripts
It would be helpful if you could provide some more information about
the program.  How does your program call the functions in the DLLs
(are they in a Tcl extension?)  What do you want the GUI to do while
the functions are running?  If, in addition to answering these
questions, you could post the part of your code that calls the slow
functions, it will be easier to make meaningful suggestions.

Thanks,
Aric

Report this thread to moderator Post Follow-up to this message
Old Post
Aric Bills
04-03-08 11:32 AM


Re: How to refresh Tk scripts
On 4=D4=C23=C8=D5, =CF=C2=CE=E74=CA=B115=B7=D6, Aric Bills <aric.bi...@gmail
=
.com> wrote:
> It would be helpful if you could provide some more information about
> the program.  How does your program call the functions in the DLLs
> (are they in a Tcl extension?)  What do you want the GUI to do while
> the functions are running?  If, in addition to answering these
> questions, you could post the part of your code that calls the slow
> functions, it will be easier to make meaningful suggestions.
>
> Thanks,
> Aric

Hi,Aric
It is a program to test Network devices working with SmartBits. I will
source the library(like lib.tcl), and DLLs are automatically loaded.
And now, I can use library functions, like "NSSocketLink" which is
used to connect my PC to the SmartBits. This function is called when a
"button" in my GUI is clicked, and this procedure will last a period
of time. And now the GUI is blocking. I will raise some trivial codes
later.

Regard,
zhoujingyu

Report this thread to moderator Post Follow-up to this message
Old Post
1985zhoujingyu@163.com
04-03-08 11:32 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Tcl archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:26 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.