[ltk-user] Stumper

Peter Herth herth at peter-herth.de
Mon Feb 6 19:36:33 UTC 2006


Hi Kenny,

On 2/6/06, Kenny Tilton <ktilton at nyc.rr.com> wrote:
> Oh. Pity. Symbols are Good Things. I see no problem with symbols and
> wish. Why complicate things with unnecessary rules (Thou shalt use strings.)

Oh, there are no unneccessary rules :). It is just an observation,
that strings tend to work (and keywords for most things), but symbols
can create problems in the communication. But if that can easily be
fixed, I am all for it!

> Actually, I think LTk needs to evolve a little in regard to
> communication with wish. I understand the desire to make things easy for
> casual users, but I do not think that should extend to defining "an
> internal interface", with strictures on communication with wish.

Well, the casual user should only use Ltk, but not poke around within
it. So no especial care needs to be taken in the internals. The
current interface evolved from trying to make the communication as
straight forward as prossible while making it robust and flexible.

> I suggest  refactoring to create a core that makes no assumptions about
> Tk output beginning with :callback/data/event, such that a power
> developer can work as they please. Then recreate the newby-friendly
> layer atop that. One trick might be to have the Dummies layer arrange
> for all dummy traffic to begin (:ltk-for-dummies ....) and if the engine
> gets a message that begins with something else it calls a generic
> function with the unexpected leading symbol as the first parameter. Then
> I can specialize EQL on :kennys-madness and control things while still
> being part of LTk.

Currently, Ltk dispatches on the keyword :callback, :data, :event in
the first element of the list, so I think the simplest solution would
be to call a generic function for every other case.


> Anticipating a possible alternative, the beauty of this is that one does
> not have to be forever tweaking LTk to make power users happy, one just
> stays out of their way by not bogarting the pipe to wish.
>
> Overall, I think LTk is a great project for Common Lisp.

Thanks :)

Peter



More information about the ltk-user mailing list