The easiest way to do this is to use the text:line-numbers-mixin in the
framework. Here's an example of an editor with line numbers:
#lang racket
(require racket/gui framework)
(define text (new (text:line-numbers-mixin text:standard-style-list%)))
(define frame
(new frame%
[label "edit
Sorry for so many small mails on one topic.
In my current project, I implements something similar to line numbers.
At the beginning, I separate them into different canvases so that the GUI
behaves like iTunes(later I found that they do not implement it in a
consistent way), but now I like the way
Okay, in the gui framework, there is an interface text:line-numbers<%>
On Thu, Mar 9, 2017 at 9:46 AM, WarGrey Gyoudmon Ju
wrote:
> But sometimes I happened to see that some one-line codes and their line
> number are overlapped.
> And line numbers are also controlled by the same horizontal scrol
But sometimes I happened to see that some one-line codes and their line
number are overlapped.
And line numbers are also controlled by the same horizontal scrollbar(I
mean, it is contained in the scrollbar's view, if there is another canvas
this should not happen).
Maybe they are displayed in a sp
I think, line numbers are likely displayed in another canvas.
The current implementation of text% does not support advanced font
features, the line height therefore is always the same. Displaying the line
numbers just consists of a bit of arithmetic.
On Thu, Mar 9, 2017 at 8:31 AM, 武晓宇 wrote:
>
I want to implement a text% object. And display the line number when string
is inserted the text/canvas area.
Like the DrRacket IDE in "show line number" mode.
I read the source code of DrRacket but do not find the answer. Could anyone
give a hand?
--
You received this message because
On Wednesday, March 8, 2017 at 11:14:53 AM UTC-8, Jay McCarthy wrote:
>
> (let ([name-i-want (lambda args body)]) name-i-want)
>
Yup, that does it. Thanks!
> Jay
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group
There are a few ways.
procedure-rename works at runtime
Or you can influence the inferred value name ---
http://docs.racket-lang.org/reference/syntax-model.html?q=procedure-rename#%28part._infernames%29
--- by setting the syntax property or expanding to something like
(let ([name-i-want (lambda
On Wednesday, March 8, 2017 at 10:56:48 AM UTC-8, Jay McCarthy wrote:
> You want to use syntax/loc. The error message comes from the lambda,
> not from the keyword argument. It could be possible to change where
>
Yup, that fixes it. Thanks! I experimented with syntax/loc in various places,
but
You want to use syntax/loc. The error message comes from the lambda,
not from the keyword argument. It could be possible to change where
lambda looks for the error srcloc, but if you don't want to do that,
you can just use syntax/loc in the right spot:
http://pasterack.org/pastes/77933
On Wed, Ma
I have a syntax transformer that loses enough syntax context that it's error
message points to the transformer rather than the usage. Here's an example of
what it should do:
http://pasterack.org/pastes/89138
This one gives correct syntax in the error message (not in pasterack, but in Dr
Racke
Racket stickers and t-shirts are now on devswag.com
- https://devswag.com/products/racket
- https://devswag.com/products/racket-t-shirt
Looking for a last-minute St Patrick's Day gift?
Or a Fathers' Day gift for the Racketeer that has it all?
Then LOOK NO FURTHER!
(Half the proceeds from sticker
12 matches
Mail list logo