[racket-users] Resize panels inside panels

2017-02-23 Thread Erich Rast
I have an editor-canvas A subclasses inside a vertical-panel subclass B and below A there is another vertical-panel subclass C in B. C is shown or hidden by removing and adding it via change-children in B. However, even though A has stretchable-height set to #t, it does not resize to fill the who

Re: [racket-users] generate sentences

2017-02-23 Thread Nguyen Linh Chi
Wow, it's really a good curriculum. Just have to drop in to say something, im not doing this exercise for some course, there is no teacher. I was just massively sad and when i got up i need to do something that makes some sense. After lots of thinking, i just assume that there is this kind of exer

Re: [racket-users] Resize panels inside panels

2017-02-23 Thread Matthew Flatt
At Thu, 23 Feb 2017 10:09:59 +, Erich Rast wrote: > I have an editor-canvas A subclasses inside a vertical-panel subclass B > and below A there is another vertical-panel subclass C in B. C is shown > or hidden by removing and adding it via change-children in B. > > However, even though A has

Re: [racket-users] Resize panels inside panels

2017-02-23 Thread Erich Rast
Your example works and made me realize that I've accidentally removed a list-box *inside* the panel rather than the panel itself in my application. No wonder it didn't work! Thank you so much! Best, Erich On Thu, 23 Feb 2017 05:17:23 -0700 Matthew Flatt wrote: > If so, is there a change that

[racket-users] Adding right-click functionality in a list-box%

2017-02-23 Thread Erich Rast
While I'm working on GUI issues another question came up. Is there a way to add right-click functionality to a list-box? I'd like the selection to jump to the respective row on a right-click (btw, right-clicking does change the selection when the list-box gets focus but not afterwards), and *then*

[racket-users] TFPIE 2017 CFP

2017-02-23 Thread Marco Morazan
TFPIE 2017 Trends in Functional Programming in Education, 2017 https://www.cs.kent.ac.uk/people/staff/sjt/TFPIE2017/ The sixth workshop on Trends in Functional Programming in Education, 2017, which is to be held on the Canterbury campus of the University of Kent on Thursday, 22 June, follow

Re: [racket-users] Adding right-click functionality in a list-box%

2017-02-23 Thread Matthew Flatt
You could get approximately the right behavior using `get-first-visible-item` and `number-of-visible-items` to compute the item under the mouse. I think we'd have to add new things to `list-box%` to get the right answer reliably, though. At Thu, 23 Feb 2017 12:59:59 +, Erich Rast wrote: > Whil

[racket-users] TCP listening & custodians

2017-02-23 Thread Jordan Johnson
Hi all, The code below is a simple server based on the web server in the “More: Systems programming in Racket” tutorial. This behavior is puzzling me: I run the server (from the OS X Terminal) and connect a client. After a wait, the client is disconnected by the timeout (shown in red). I halt th

Re: [racket-users] TCP listening & custodians

2017-02-23 Thread Matthew Flatt
The difference is the state that the TCP port is left in at the protocol level as managed by the OS. For more information, look for "TIME_WAIT" in a TCP reference, such as "TCP/IP Illustrated" by Stevens. The "More" tutorial avoids the problem by passing #t as the third argument to `tcp-listen`: