That's a tricky one.  I think that <<Loaded>> should be sent when the patch is 
all done, so the current situation is a bug.  Since the drawing commands come 
from 'pd', 'pd' would have to trigger the <<Loaded>> event.  I forget how its 
triggered now.

Definitely avoid 'update', I recently refactored my pdwindow.tcl code to switch 
from 'update' to 'after idle'.

.hc

On Nov 17, 2011, at 4:01 PM, Jonathan Wilkes wrote:

> Hi Hans,
>      I'm close to finishing a revision of my tooltips patch.  To properly 
> loadbang a canvas tip 
> 
> I need something like a <<Loaded>> event, but one that tells me when the a pd 
> patch window has 
> 
> finally finished being drawn by Tk.  <<Loaded>> seems to trigger once the 
> procedure for creating 
> 
> a new canvas has finished (technically right before, I guess), but it doesn't 
> tell me when Tk has 
> 
> actually finished drawing the window and setting all the window dimensions 
> that are query-able 
> 
> through winfo.
> 
> I think I could use <Configure>, but it will trigger multiple times-- I just 
> want one event that tells me 
> 
> "Ok, everything that needed to get drawn as a result of creating this patch 
> window is done drawing."  
> 
> (tcl/tk wiki warns against "update idletasks" which can cause subtle bugs.)
> 
> -Jonathan
> 
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list



----------------------------------------------------------------------------

"[W]e have invented the technology to eliminate scarcity, but we are 
deliberately throwing it away to benefit those who profit from scarcity."       
 -John Gilmore



_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to