Conversation with #inferno at Mon Mar 21 18:15:19 2011 on powerman-asdf@irc.freenode.net (irc) (18:50:11) robot12 left the room (quit: Quit: Leaving.). (18:55:17) KillerX [~anant@nat/mozilla/x-hdyihagthponxkgg] entered the room. (19:05:10) KillerX_ [~anant@nat/mozilla/x-mzuhdaznuertdsfl] entered the room. (19:06:21) acmeuser [~acmeuser@173-14-190-30-NewEngland.hfc.comcastbusiness.net] entered the room. (19:06:21) acmeuser left the room (quit: Read error: Connection reset by peer). (19:08:17) KillerX left the room (quit: Ping timeout: 255 seconds). (19:08:17) KillerX_ is now known as KillerX (19:23:47) KillerX left the room (quit: Remote host closed the connection). (19:24:08) KillerX [~anant@2620:101:8003:200:21b:63ff:fea5:86ee] entered the room. (19:29:32) tensai_cirno [~cirno@80.250.216.102] entered the room. (19:43:23) mjl-: hmm (19:43:28) mjl-: anyone here familiar with tk (19:43:30) mjl-: and perhaps some tcl (19:43:43) mjl-: i thought i had a revelation wrt building tk interfaces (19:43:54) mjl-: namely that making grid layouts could be done in little code, like so: (19:44:17) mjl-: tkcmd("grid [label .f.mylabel -text label:] [entry .f.myentry]"); (19:44:20) mjl-: where .f is a frame (19:44:40) mjl-: the []'s are supposed to be executed and replaced by their reponse (i think) (19:44:48) mjl-: and the label and entry commands return the name of the window created (19:45:24) mjl-: so the label & entry should be created, and the then "grid .f.mylabel .f.myentry" should be called, packing them next to each other in a row (19:45:39) mjl-: but my widgets don't show up (19:46:36) mjl-: so the question: should this work, and if so why doesn't it? (19:47:15) tensai_cirno left the room (quit: Ping timeout: 252 seconds). (20:05:03) tensai_cirno [~cirno@80.250.216.102] entered the room. (20:19:29) anth_x: my tk is very rusty. isn't it just cmd(), not tkcmd()? (20:20:02) anth_x: is grid a local modification? (20:23:01) anth_x: at a minimum, you normally need some sort of "okay, now actually display it" command. (20:24:04) mjl-: yeah, it's cmd(topleve, "...") (20:24:06) mjl-: toplevel* (20:24:26) mjl-: but i always have toplevel a global variable and tkcmd() a wrapper around tk->cmd() (20:24:38) mjl-: but "grid" is a packer, like "pack" (20:24:40) anth_x: ah, okay (20:24:55) mjl-: but "grid" makes a table-like layout (20:25:03) mjl-: where you can put widgets in a row,column position (20:26:29) anth_x: i'm not sure i understand your question. is it "should this work out of the box" or "does this look like a sensible thing to try"? (20:26:38) mjl-: the first (20:26:41) mjl-: i think it should work (20:26:50) mjl-: because text in []'s is executed and the output replaced (20:27:05) anth_x: by your tkcmd? (20:27:15) mjl-: on the other hand, http://www.vitanuova.com/inferno/man/9/0intro.html has a BUGS section: (20:27:18) mjl-: The bracket ([]) command interpretation is not applied consistently throughout the Inferno Tk commands (notably, the argument to the send(9) command will not interpret this correctly). Moreover, if the string to be substituted is significantly bigger than the command it was substituting, then it will be truncated. (20:27:23) mjl-: no, it's generic tk functionality (20:27:30) mjl-: it may even be something actually done by tcl (20:27:59) anth_x: oh oh oh! okay, now i'm coming back up to speed. sorry, my tk is rustier than i realized. (20:28:21) mjl-: in the official tk/tcl combination, and that the []'s have just been implemented in libtk to make it more similar to other tk code (20:29:04) mjl-: in the case of "grid [label .f.mylabel]", the widget .f.mylabel is created (another "label .f.mylabel" says "path exists") (20:29:16) mjl-: i'll have a look at the tk code later (20:29:26) anth_x: limbo/tk is the only tk i've used. (20:29:33) mjl-: yeah, me too :) (20:29:43) mjl-: no, i've done python's tk once. tkinter (20:30:26) mjl-: that's different in that it doesn't use strings for all commands, but has python-like dicts and uses numeric constants for some things (20:31:58) anth_x: i can't believe i never knew about grid - i've only ever used pack. (20:49:34) Fish- [~Fish@9fans.fr] entered the room. (20:52:27) mjl-: grid is quite nice. it could be better: specifying stretched cells is still a bit verbose (20:53:12) mjl-: i'm giving up on using grids with [] for now. the widgets are created, and it seems grid is called with the right parameter (20:53:30) mjl-: but probably some kind of state is not flushed/available in the grid command (21:01:11) tensai_cirno left the room (quit: Quit: Leaving). (21:28:30) vsrinivas is now known as me___ (22:46:33) tensai_cirno [~cirno@77.232.15.216] entered the room. (00:47:30) Fish- left the room (quit: Quit: So Long, and Thanks for All the Fish). (02:44:26) KillerX left the room (quit: Quit: KillerX). (06:22:31) tensai_cirno left the room (quit: Ping timeout: 252 seconds). (09:24:48) robot12 [~kazzhilki@proxy10.ts.fujitsu.com] entered the room. (09:56:01) mjl-: good day all (10:39:10) robot12: hello ! :) (10:54:38) tensai_cirno [~cirno@nat.canmos.ru] entered the room. (11:34:34) mjl-: yo robot12, anything happening today? (11:35:34) robot12: nothing :) (11:35:46) mjl-: that's not much :) (11:35:54) mjl-: but same here, just writing some code (11:38:32) robot12: he he :) (11:39:10) robot12: i'm thinking about writing tcp server. that can use http proxy with CONNECT method (11:41:52) mjl-: so you can use it as a replacement for /net/tcp? (11:47:45) tensai_cirno left the room (quit: Ping timeout: 252 seconds). (12:20:06) robot12: Yes (12:22:18) mjl-: that would be nice to have (12:22:21) mjl-: do it! :) (12:36:55) robot12: :) no free time :) (12:45:13) mjl-: :( (12:45:28) mjl-: never enough time (13:02:58) robot12: yep ... (14:19:33) tensai_cirno [~cirno@81.211.0.142] entered the room. (14:22:44) acmeuser [~acmeuser@ihpst-09.univ-paris1.fr] entered the room. (14:23:02) acmeuser left the room. (14:31:41) tensai_cirno left the room (quit: Ping timeout: 260 seconds). (14:34:46) me___ left the room (quit: Quit: leaving). (16:45:16) tensai_cirno [~cirno@77.232.15.216] entered the room. (18:05:01) robot12 left the room (quit: Quit: Leaving.). (18:13:16) The account has disconnected and you are no longer in this chat. You will be automatically rejoined in the chat when the account reconnects.