On Tue, Dec 23, 2008 at 01:14:38PM -0600, Stephen Compall wrote: > > Jan Rychter <[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. > > > > 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. > > Setting aside implementation simplicity, would writing (widget > (lambda ...)) above instead of just (lambda ...) have helped > Benjamin or Robin Lee Powell¹ avoid the mistake they made?
Yeah, no question I screwed that up repeatedly. I think it would because I wouldn't have written that; I would have written (widget "string") instead, since that was all I really wanted, or (widget (with-html ...)), which I'd hope this form would support. Furthermore, explaining the pitfalls of lambda form widget bits in the documentation for this form would help a lot, and it seems a good place for it. -Robin -- They say: "The first AIs will be built by the military as weapons." And I'm thinking: "Does it even occur to you to try for something other than the default outcome?" -- http://shorl.com/tydruhedufogre http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
