Stephen Compall <[email protected]> writes: > Benjamin Collins <[email protected]> writes: >> (lambda () >> (let ((tw (make-instance 'toggle-widget :showp t >> :data "Test data.")))))))) > > This is a widget that does not render anything. Strip it down to the > make-instance. > > As a rule, function-widgets are not what you want if what you are doing > isn't trivial or has any dynamic aspects. I would be for removing them, > as they seem to confuse more than help¹, but I am even more against > type-tagging for its own sake. > > ¹ Hint: they should not be side-effecty, except for scribbling on the > output, and their return values are ignored.
I have been thinking along similar lines -- I considered making all widgets be widgets and instead provide a (widget "abcd") function that would create a widget based on a string or a function. It would really simplify a lot of things, remove ensure-widget-methods that is so scary I'm afraid to even look at it, and make testing easier. --J. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/weblocks?hl=en -~----------~----~----~----~------~----~------~--~---
