On Monday, October 15, 2018 at 8:36:49 AM UTC+8, Dan Muller wrote:
>
> Thanks for taking the time to reproduce it, Alex. I assume you saw nothing 
> wrong with the overall approach I took for the table, outside of your 
> suggestion to use queue-callback.
>

I see nothing wrong with your example, in the sense that Racket should not 
fail when running it, or at least Racket should provide a better error 
message.

However, I don't think it is a good idea to create many widgets dynamically 
in event callbacks, than just leave them around to be garbage collected, 
which your example code does.  In a real application, you should consider:

* create all widgets you need before the top-level frame or dialog is 
shown, the widgets that don't need to be visible can be created with a 
'deleted style.  You can than use change-children to add or remove widgets 
as needed, to change the visual contents of the window as needed.
* for displaying tabular data, consider using a list-box% control, as it 
supports multiple columns which can be shown/hidden.

Best Regards,
Alex. 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to