[racket] display problem

From: Nick Shelley (nickmshelley at gmail.com)
Date: Thu Apr 12 12:03:35 EDT 2012

        Only beside. But how can I then take care that the text are
displayed into the empty-scene.  I think you need overlay or something for
that.

Every image function returns an image, so you can use beside to create an
image of your text with the cursor in the right spot, and then place that
image in your empty scene however you want (you used place-image, which
would work, but I would suggest place-image/align).

In general, I would suggest (as HtDP does) that you experiment with each
piece of the image in the interactions pane, and then experiment with
composing them until you get what you want. For instance, use the
interactions pane to try to get the text and cursor together using
different image functions until you like what you get, then do the same
with composing that result and the background.

On Thu, Apr 12, 2012 at 6:18 AM, Roelof Wobben <r.wobben at home.nl> wrote:

> Op 12-4-2012 14:00, Stephen Bloch schreef:
>
>> On Apr 11, 2012, at 12:03 PM, Roelof Wobben wrote:
>>
>>  I changed the contract to Editor ->  Number.
>>> When I change the make-editor function the value changed.
>>> So I think the check-expect is wrong but I have no clue how to change it.
>>>
>> No, the check-expect is fine; the definition is wrong.  As I recall (I
>> don't have it in front of me), it doesn't actually use its parameter.
>>
>
> The function is this :
>
>
> (define (width editor)
>  (image-width (text (editor-pre verwerker) 11 "black")))
>
> As I understand your remark it doesn't use editor.  So I have to rewrite
> it so it uses the parameter editor-pre verwerker ??
>
> Roelof
>
>
>>  I find the way with overlay and beside more the hard way.
>>>
>> Why do you need "overlay"?  I would think you could do this just with
>> "beside" (unless you wanted to fine-tune the formatting).
>>
>>
> Only beside. But how can I then take care that the text are displayed into
> the empty-scene.  I think you need overlay or something for that.
>
>
>  Stephen Bloch
>> sbloch at adelphi.edu
>>
>>
>>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/**users <http://lists.racket-lang.org/users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120412/3ad5b716/attachment.html>

Posted on the users mailing list.