[Xcircuit-dev] insertparam without tcl
ldoolitt at recycle.lbl.gov
ldoolitt at recycle.lbl.gov
Sun Jun 4 10:59:56 PDT 2006
Tim et al. -
On Sat, Jun 03, 2006 at 11:03:29PM -0700, R. Timothy Edwards wrote:
>
> >I think I need to add PARAMSEL_MODE to the
> >enum editmode in xcircuit.h. [chop]
>
> The idea of the modes is that you could potentially do
> any mouse, button, or keystroke in the mode, and the
> dispatch routine would interpret the keystroke (or rather
> the function binding of the keystroke) relative to the
> current mode. In this case, though, there is no need,
> because the whole program will hang, waiting for a response.
> This is the way the Tcl version works, which calls the
> procedure "promptselectparam" that pops up a window, then
> waits for a response and returns the answer. To match
> this behavior, the non-Tcl version should at this point
> generate a pop-up window presenting all of the parameters
> belonging to the object and their instance values,
> wait for a selection, and return the string value of
> the parameter key (char *selparm). At this point, the
> Tcl and non-Tcl versions will run the same code (from
> parameter.c line 1619).
That sounds a lot like the strategy that was in 3.1.24.
Although the coding in getkeynum() is local, it's very
invasive -- it temporarily takes over all event handling
with its own local version. That code in event.c is not
used anywhere else in Xcircuit. If that is indeed the
right approach, I'll put it back in.
> I gather from some of your previous emails that the reason you're
> compiling the non-Tcl version is that you want the Python interface.
Well, no, actually. I'm just very used to the look and feel of the
old interface. Plus, while I have used Tcl, it has always seemed
like a horrible little language [*]. I have learned a little Python,
and it's a substantially better language.
The broken-ness of the parameter select code sounds like
a point against staying with the Python version. I tried
the Tcl version of the same code path -- and I don't like
it. It takes a former keystroke and turns it into a mouse
click.
> One could potentially map all the Tk code into Python/Tkinter, and
> turn xcircuit into an extension of Python rather than use it as an
> embedded interpreter. This is a lot more work but ultimately more
> productive.
I'm really looking for less work, not more. All I really
want is a Debian package that works as well as the old
(3.1.19) one.
- Larry
[*] As my old friend Ken Arnold (a Java partisan) says,
"Tcl -- it's not a language, it's a tokenizer!"
More information about the Xcircuit-dev
mailing list