Re: [racket-users] Finding bound occurrences

2020-05-07 Thread Hendrik Boom
On Thu, May 07, 2020 at 10:27:53AM -0500, Robby Findler wrote:
> Does the file without arrows have a syntax error?
> 
> Robby

That was th problem.  Not in the file itself, which the main file 
for the Racket openGL binding, but in a generated file I included.

I forgot I had modified the include linr for debugging that other 
file.

Thanks.  I'm still learning.

-- hendrik

> 
> 
> On Thu, May 7, 2020 at 9:55 AM Hendrik Boom  wrote:
> 
> > I have several tabs open in DrRacket.
> > On two of them, when I mouse over a symbol, it provides very
> > visible links to binding or bound occurrences
> >
> > On the third, it doesn't.  There is a right-click mey item to jump
> > to the binding occurrence, but no menu item to find next bound
> > occurrence.
> >
> > One difference I've noticed is that that third tab has
> >   #lang racket/base
> > instead of
> >   #lang typed/racket
> > of
> >   #lang racket
> > like the first two tabs.
> >
> > Is this a bug or a feature?  Is there soe way I cn persuade it to
> > show me bound occurrences even in the third tab/
> >
> > -- hendrik
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to racket-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/racket-users/20200507145536.sflodxjyu5n72l3s%40topoi.pooq.com
> > .
> >
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/CAL3TdONwrREEwFygXtVT%3D8ZPjWauL1uuEAfCfq5LRdFZTHnX7w%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200507215557.sn4uqkt5w3p27iwz%40topoi.pooq.com.


Re: [racket-users] trickiness about the order of definitions in GUI code

2020-05-07 Thread James Platt
On May 7, 2020, at 12:44 AM, Philip McGrath wrote:

> Rather than designing an ad hoc system of indirection that can handle all of 
> the complexity,* I suggest using the one that already exists: units, Racket's 
> original, first-class (rather than first-order) module system, offer support 
> for cyclic dependencies. In fact, they are used in the implementation of 
> Racket's GUI framework to address precisely this problem.

Thanks.  I need to read up on Units.  Like I said, my production code is much 
more complicated than the example I posted so I'm sure that better organization 
will really help in the long run.  

James

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/55F53C1D-57FB-4EEF-94FB-AC41AC5A2DBD%40biomantica.com.


Re: [racket-users] Finding bound occurrences

2020-05-07 Thread Robby Findler
Does the file without arrows have a syntax error?

Robby


On Thu, May 7, 2020 at 9:55 AM Hendrik Boom  wrote:

> I have several tabs open in DrRacket.
> On two of them, when I mouse over a symbol, it provides very
> visible links to binding or bound occurrences
>
> On the third, it doesn't.  There is a right-click mey item to jump
> to the binding occurrence, but no menu item to find next bound
> occurrence.
>
> One difference I've noticed is that that third tab has
>   #lang racket/base
> instead of
>   #lang typed/racket
> of
>   #lang racket
> like the first two tabs.
>
> Is this a bug or a feature?  Is there soe way I cn persuade it to
> show me bound occurrences even in the third tab/
>
> -- hendrik
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/20200507145536.sflodxjyu5n72l3s%40topoi.pooq.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdONwrREEwFygXtVT%3D8ZPjWauL1uuEAfCfq5LRdFZTHnX7w%40mail.gmail.com.


[racket-users] Finding bound occurrences

2020-05-07 Thread Hendrik Boom
I have several tabs open in DrRacket.
On two of them, when I mouse over a symbol, it provides very 
visible links to binding or bound occurrences

On the third, it doesn't.  There is a right-click mey item to jump 
to the binding occurrence, but no menu item to find next bound 
occurrence.

One difference I've noticed is that that third tab has
  #lang racket/base
instead of
  #lang typed/racket
of
  #lang racket
like the first two tabs.

Is this a bug or a feature?  Is there soe way I cn persuade it to 
show me bound occurrences even in the third tab/

-- hendrik

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20200507145536.sflodxjyu5n72l3s%40topoi.pooq.com.


Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Stephen De Gabrielle
Awesome - keep them coming.

You should feature one in each Racket-News!

Stephen

On Thu, 7 May 2020 at 10:33, Laurent  wrote:

> Have you ever wanted to extract a block of code out of its context and
> wrap it in a function?
>
> Have you ever *not* done it because of the cognitive load(*) of figuring
> out the function arguments and the return values?
>
> Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using
> check-syntax, the extract-function and put-function scripts figure out what
> goes in and out for you.
>
> Video: https://www.youtube.com/watch?v=XinMxDLZ7Zw
> `raco pkg install quickscript-extra` to install, or
> `raco pkg update quickscript-extra` if it's already installed.
>
> (*) a.k.a. laziness ;)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CABNTSaHpOYQM2X3TW%3DHYGP7_CTA8jCaj4Euh0mcjnus1aOdt-g%40mail.gmail.com
> 
> .
>
-- 


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGHj7-%2BLfmfuiPRyPcrVGGUKC1j5JDo4D%3Dr%3DC6dkQ7kxA-jWLw%40mail.gmail.com.


Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Andre Garzia
that is really cool! thanks for sharing!

On Thu, 7 May 2020 at 10:33, Laurent  wrote:

> Have you ever wanted to extract a block of code out of its context and
> wrap it in a function?
>
> Have you ever *not* done it because of the cognitive load(*) of figuring
> out the function arguments and the return values?
>
> Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using
> check-syntax, the extract-function and put-function scripts figure out what
> goes in and out for you.
>
> Video: https://www.youtube.com/watch?v=XinMxDLZ7Zw
> `raco pkg install quickscript-extra` to install, or
> `raco pkg update quickscript-extra` if it's already installed.
>
> (*) a.k.a. laziness ;)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CABNTSaHpOYQM2X3TW%3DHYGP7_CTA8jCaj4Euh0mcjnus1aOdt-g%40mail.gmail.com
> 
> .
>


-- 
http://www.andregarzia.com

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAF3jwTkCkHS7xGCEfsGNQuoSGLs8uXKgv2bzTAVMvQOF_C%2BZDg%40mail.gmail.com.


Re: [racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Dexter Lagan
Nice!! Yay for laziness.

On Thu, May 7, 2020 at 11:33 AM Laurent  wrote:

> Have you ever wanted to extract a block of code out of its context and
> wrap it in a function?
>
> Have you ever *not* done it because of the cognitive load(*) of figuring
> out the function arguments and the return values?
>
> Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using
> check-syntax, the extract-function and put-function scripts figure out what
> goes in and out for you.
>
> Video: https://www.youtube.com/watch?v=XinMxDLZ7Zw
> `raco pkg install quickscript-extra` to install, or
> `raco pkg update quickscript-extra` if it's already installed.
>
> (*) a.k.a. laziness ;)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CABNTSaHpOYQM2X3TW%3DHYGP7_CTA8jCaj4Euh0mcjnus1aOdt-g%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACUENrJhQfB4KWYH%2B8FqD%2BDAkNBNoZWcYitTQsS4336tHmfNJQ%40mail.gmail.com.


Re: [racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Dexter Lagan
Awesome! Thanks. Racket is freaking amazing.

Dex

> On May 7, 2020, at 11:51 AM, Jens Axel Søgaard  wrote:
> 
> 
> You can use syntax/loc to give a piece of syntax location information.
> 
> #lang racket
> (require (for-syntax syntax/parse))
> 
> (define-syntax (assert stx)
>   (syntax-parse stx
> [(_assert ?a ?b)
>  (quasisyntax/loc stx
>(module+ test
>  (require rackunit)
>  #,(syntax/loc stx (check-equal? ?a ?b #'?a]
> [(_assert ?a)
>  (quasisyntax/loc stx
>(module+ test
>  (require rackunit)
>  #,(syntax/loc stx (check-true ?a #'?a]))
> 
> 
> /Jens Axel
> Racket Stories
> https://racket-stories.com
> 
>> Den tor. 7. maj 2020 kl. 11.22 skrev Dexter Lagan :
>> Hi,
>> 
>>   I made a simple macro which saves me the trouble of defining a test 
>> module, requiring RackUnit and then declaring '(module+ test' after each 
>> procedure definition, as I like to keep unit tests close by. The repo :
>> 
>> https://github.com/DexterLagan/assert 
>> 
>>   Here's the macro, apologies for the broken formatting :
>> 
>> (define-syntax (assert stx)
>>   (syntax-parse stx
>> [(_ ?a ?b)
>>  #'(module+ test
>>  (require rackunit)
>>  (check-equal? ?a ?b #'?a))]
>> [(_ ?a)
>>  #'(module+ test
>>  (require rackunit)
>>  (check-true ?a #'?a))]))
>> 
>> The macro works great, and I was able to pipe through an assertion message 
>> through rackunit's check-equal? and other procedures.
>> I have one question however: would there be a way to make DrRacket point to 
>> the failed assertion line instead of the macro itself when a failure occurs? 
>> Here's a screenshot of how it looks like at the moment:
>> 
>> 
>> 
>> 
>>   It would be even better if DrRacket highlighted the (assert ...) line 
>> itself, but I'm asking a bit much :) If assert is an actual module, I'm not 
>> sure where DrRacket would then point at.
>> I also have doubts about whenever Racket will remove the test module once 
>> compiled. Since macros are processed at compile-time, I'm guessing it would 
>> remove the test module right after, but let me know if you have a more 
>> definite answer.
>> 
>> Dex
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to racket-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/racket-users/CACUENrLX%3D9ix2kv9MNpp3nNoSN%3DsWBx%2BFTRdwNyNA7EiVWQ0mA%40mail.gmail.com.
> 
> 
> -- 
> -- 
> Jens Axel Søgaard
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/FC1246E9-81C3-456F-90F6-64467FC097B0%40gmail.com.


Re: [racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Jens Axel Søgaard
You can use syntax/loc to give a piece of syntax location information.

#lang racket
(require (for-syntax syntax/parse))

(define-syntax (assert stx)
  (syntax-parse stx
[(_assert ?a ?b)
 (quasisyntax/loc stx
   (module+ test
 (require rackunit)
 #,(syntax/loc stx (check-equal? ?a ?b #'?a]
[(_assert ?a)
 (quasisyntax/loc stx
   (module+ test
 (require rackunit)
 #,(syntax/loc stx (check-true ?a #'?a]))


/Jens Axel
Racket Stories
https://racket-stories.com

Den tor. 7. maj 2020 kl. 11.22 skrev Dexter Lagan :

> Hi,
>
>   I made a simple macro which saves me the trouble of defining a test
> module, requiring RackUnit and then declaring '(module+ test' after each
> procedure definition, as I like to keep unit tests close by. The repo :
>
> https://github.com/DexterLagan/assert
>
>   Here's the macro, apologies for the broken formatting :
>
> (define-syntax (assert stx)
> (syntax-parse stx
> [(_ ?a ?b)
> #'(module+ test
> (require rackunit)
> (check-equal? ?a ?b #'?a))]
> [(_ ?a)
> #'(module+ test
> (require rackunit)
> (check-true ?a #'?a))]))
>
> The macro works great, and I was able to pipe through an assertion message
> through rackunit's check-equal? and other procedures.
> I have one question however: would there be a way to make DrRacket point
> to the failed assertion line instead of the macro itself when a failure
> occurs? Here's a screenshot of how it looks like at the moment:
>
> [image: assert.PNG]
>
>   It would be even better if DrRacket highlighted the (assert ...) line
> itself, but I'm asking a bit much :) If assert is an actual module, I'm not
> sure where DrRacket would then point at.
> I also have doubts about whenever Racket will remove the test module once
> compiled. Since macros are processed at compile-time, I'm guessing it would
> remove the test module right after, but let me know if you have a more
> definite answer.
>
> Dex
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CACUENrLX%3D9ix2kv9MNpp3nNoSN%3DsWBx%2BFTRdwNyNA7EiVWQ0mA%40mail.gmail.com
> 
> .
>


-- 
-- 
Jens Axel Søgaard

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABefVgyO8hOc7veBwQF7isSPD7YA77wV%3Dxa4y9EhBxB5Z9hQFQ%40mail.gmail.com.


Re: [racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Laurent
Check out `make-check-location` and friends, and maybe `with-check-info*`
https://docs.racket-lang.org/rackunit/api.html?q=define-check#%28def._%28%28lib._rackunit%2Fmain..rkt%29._make-check-location%29%29

You may have to combine with the syntax-information extracted from the
syntax object `stx`.


On Thu, May 7, 2020 at 10:22 AM Dexter Lagan  wrote:

> Hi,
>
>   I made a simple macro which saves me the trouble of defining a test
> module, requiring RackUnit and then declaring '(module+ test' after each
> procedure definition, as I like to keep unit tests close by. The repo :
>
> https://github.com/DexterLagan/assert
>
>   Here's the macro, apologies for the broken formatting :
>
> (define-syntax (assert stx)
> (syntax-parse stx
> [(_ ?a ?b)
> #'(module+ test
> (require rackunit)
> (check-equal? ?a ?b #'?a))]
> [(_ ?a)
> #'(module+ test
> (require rackunit)
> (check-true ?a #'?a))]))
>
> The macro works great, and I was able to pipe through an assertion message
> through rackunit's check-equal? and other procedures.
> I have one question however: would there be a way to make DrRacket point
> to the failed assertion line instead of the macro itself when a failure
> occurs? Here's a screenshot of how it looks like at the moment:
>
> [image: assert.PNG]
>
>   It would be even better if DrRacket highlighted the (assert ...) line
> itself, but I'm asking a bit much :) If assert is an actual module, I'm not
> sure where DrRacket would then point at.
> I also have doubts about whenever Racket will remove the test module once
> compiled. Since macros are processed at compile-time, I'm guessing it would
> remove the test module right after, but let me know if you have a more
> definite answer.
>
> Dex
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CACUENrLX%3D9ix2kv9MNpp3nNoSN%3DsWBx%2BFTRdwNyNA7EiVWQ0mA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABNTSaFdxOGAFw9cZcPqVxb6pXFT68WMuCNMta8dBG5GeLW74A%40mail.gmail.com.


[racket-users] Quickscript of the day: Extract to function

2020-05-07 Thread Laurent
Have you ever wanted to extract a block of code out of its context and wrap
it in a function?

Have you ever *not* done it because of the cognitive load(*) of figuring
out the function arguments and the return values?

Well, now it's as easy as Ctrl-Shift-X and Ctrl-Shift-Y. Using
check-syntax, the extract-function and put-function scripts figure out what
goes in and out for you.

Video: https://www.youtube.com/watch?v=XinMxDLZ7Zw
`raco pkg install quickscript-extra` to install, or
`raco pkg update quickscript-extra` if it's already installed.

(*) a.k.a. laziness ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABNTSaHpOYQM2X3TW%3DHYGP7_CTA8jCaj4Euh0mcjnus1aOdt-g%40mail.gmail.com.


[racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Dexter Lagan
Hi,

  I made a simple macro which saves me the trouble of defining a test
module, requiring RackUnit and then declaring '(module+ test' after each
procedure definition, as I like to keep unit tests close by. The repo :

https://github.com/DexterLagan/assert

  Here's the macro, apologies for the broken formatting :

(define-syntax (assert stx)
(syntax-parse stx
[(_ ?a ?b)
#'(module+ test
(require rackunit)
(check-equal? ?a ?b #'?a))]
[(_ ?a)
#'(module+ test
(require rackunit)
(check-true ?a #'?a))]))

The macro works great, and I was able to pipe through an assertion message
through rackunit's check-equal? and other procedures.
I have one question however: would there be a way to make DrRacket point to
the failed assertion line instead of the macro itself when a failure
occurs? Here's a screenshot of how it looks like at the moment:

[image: assert.PNG]

  It would be even better if DrRacket highlighted the (assert ...) line
itself, but I'm asking a bit much :) If assert is an actual module, I'm not
sure where DrRacket would then point at.
I also have doubts about whenever Racket will remove the test module once
compiled. Since macros are processed at compile-time, I'm guessing it would
remove the test module right after, but let me know if you have a more
definite answer.

Dex

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACUENrLX%3D9ix2kv9MNpp3nNoSN%3DsWBx%2BFTRdwNyNA7EiVWQ0mA%40mail.gmail.com.


Re: [racket-users] trickiness about the order of definitions in GUI code

2020-05-07 Thread Dexter Lagan
Hi James,

  Like others said, Unit is the proper solution, but to add my 2c, I was
able to avoid this problem altogether by using these two simple tricks :
1) add the controls in the order of their requirement (defining table3
before info-menu-item), then re-ordering the controls before displaying the
window, as follows:

(send frame3 change-children
  (λ (children)
(list ...
  info-menu-item
  table3
  ...)))

2) to get around the problem of separating gui and logic code, one solution
is to create an englobing 'display-gui' function which takes the callback
func names as parameters. That allows one to move all the callback
functions outside of the GUI, and pipe them through from another module.
For example:

main.rkt:

;;; defs

(define (menu3-callback-proc param1 ...)
   ...)

;;; main

(show-gui  menu3-callback-proc ...)

gui.rkt:
(define (show-gui menu3-callback-proc-name ...)

  gui code...

  )

Let me know if this helps...

Dex

On Thu, May 7, 2020 at 1:50 AM James Platt  wrote:

> I'm working on organizing and documenting some things and I have some
> code, below, which works but I don't understand why.  Specifically, why
> don't I get an error about table3 not being defined?
>
> This is a very simplified version of what I'm working on.  What I actually
> want to do is put all the code related to creating a standard table editing
> menu in a file which I can then include wherever I want that menu.  The
> full menu will be a lot of code.  Unfortunately I can't seem to get this to
> work without either getting an error that row-edit-menu is not defined or
> that table3 is not defined.  In other words, I want to be able to define
> table3 in one file which requires the file where row-edit-menu is defined
> but I can't seem to figure out how to get this to work.  It works just fine
> when all the code is in one file, however.
>
> James
>
>
> #lang racket
> (require racket/gui/base
>  qresults-list
>  )
>
> ;set up columns
> (define (column1 data) (vector-ref data 0))
> (define (column2 data) (vector-ref data 1))
>
> (define my-columns
>   (list
>(qcolumn "Column1" column1 column1)
>(qcolumn "Column2"
> (lambda (row)
>   ;(displayln row)
>   ;(displayln (db-row-ref row "Column2" headers 1))
>   (if (number? (column2 row)) (number->string (column2 row))
> "");This allows a cell to be blank.
>   ;(number->string (column2 row))
>   )
> column2)
>
>)
>   )
>
> (define frame3 (new frame%
>   [label "myTable 3"]
>   [width 800]
>   [height 600]
>   ))
>
>
> (define row-edit-menu (new popup-menu% ))
>
> (define info-menu-item (new menu-item%
>   (label "info")
>   (parent row-edit-menu)
>   (callback (lambda (menu-item event)
>   (message-box "Info"
>(~a "You have
> selected " (length (send table3 get-selected-row-indexes)) " rows")
>#f)
>   ))
>   ))
>
> (define table3
>(new (class qresults-list% (init) (super-new)
>   [parent frame3]
>   [pref-tag 'preferences-tag]
>   [selection-type 'multiple]
>   [right-click-menu row-edit-menu])
>   )
>
> (send table3 setup-column-defs my-columns)
>
> (send frame3 show #t)
>
> (send table3 add-row (vector "R1C1" 10))
> (send table3 add-row (vector "R2C1" 11))
> (send table3 add-row (vector "R3C1" 12))
> (send table3 add-row (vector "R4C1" 13))
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/F54B34B7-F04F-4DF7-9236-FD6C4FE3C983%40biomantica.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACUENrL0tZx_SYrz1FLWpj4K6FUZOuBmv%2B5L356eN8m9boxb8g%40mail.gmail.com.