Re: [racket-users] problems with scribble while trying to document classes

2016-03-10 Thread Axel Schnell
Am Donnerstag, 10. März 2016 17:20:24 UTC+1 schrieb Matthew Flatt:
> You need
> 
>  @(require (for-label racket/class))
> 
> to connect `object%` as used in your documentation to the `object%`
> binding that is defined in documentation.
> 
That works! Thanks for the immediate answer!

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] problems with scribble while trying to document classes

2016-03-10 Thread Matthew Flatt
You need

 @(require (for-label racket/class))

to connect `object%` as used in your documentation to the `object%`
binding that is defined in documentation.

At Thu, 10 Mar 2016 08:15:55 -0800 (PST), Axel Schnell wrote:
> I was writing some documentation about my experiments with classes and types 
> while I encountered some problems.
> The first question came up when I read the scribble documentation because I 
> could not find any information concerning the case when the class I like to 
> document does not implement any interface? In a first attempt I simply tried 
> not to specify any interfaces. This worked but only as long as I did not use 
> @defmodule. To demonstrate the problem I post the code:
> #lang scribble/manual
> @(require racket (file "class-1.rkt"))
> blah blah...
> @defclass[c1% object% ()]{this is class-1 documentation...}
> 
> This works but you get these annoying warnings "No declared exporting 
> libraries...".
> So I added @defmodule and the code looked like this:
> #lang scribble/manual
> @(require racket (file "class-1.rkt"))
> @defmodule[(file "class-1.rkt")]{This is the documentation of module 
> @racket[class-1].}
> blah blah...
> @defclass[c1% object% ()]{this is class-1 documentation}
> 
> Now the result was the following error message:
> ../../../../racket-6.4/share/racket/pkgs/scribble-lib/scribble/private/manual-c
> lass.rkt:127:11: scribble: no class/interface/mixin information for 
> identifier: 
> # 5:14 object%>
> 
> When I now get rid of the @defclass thing (it seems to be a macro but as I am 
> still learning racket I'm not so sure...) then scribble works again:
> #lang scribble/manual
> @(require racket (file "class-1.rkt"))
> @defmodule[(file "class-1.rkt")]{This is the documentation of module 
> @racket[class-1].}
> blah blah...
> 
> Is scribble not applicable to document such small modules? Does scribble need 
> some more preparation to document classes? I ask this because in other 
> circumstances scribble worked fine. Only as I tried to document the classes I 
> created the problems. I also looked at some of the sources of the racket 
> documentation to see how the 'professionals' did it. But that did not help me.
> 
> Thanks in advance for any response!
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[racket-users] problems with scribble while trying to document classes

2016-03-10 Thread Axel Schnell
I was writing some documentation about my experiments with classes and types 
while I encountered some problems.
The first question came up when I read the scribble documentation because I 
could not find any information concerning the case when the class I like to 
document does not implement any interface? In a first attempt I simply tried 
not to specify any interfaces. This worked but only as long as I did not use 
@defmodule. To demonstrate the problem I post the code:
#lang scribble/manual
@(require racket (file "class-1.rkt"))
blah blah...
@defclass[c1% object% ()]{this is class-1 documentation...}

This works but you get these annoying warnings "No declared exporting 
libraries...".
So I added @defmodule and the code looked like this:
#lang scribble/manual
@(require racket (file "class-1.rkt"))
@defmodule[(file "class-1.rkt")]{This is the documentation of module 
@racket[class-1].}
blah blah...
@defclass[c1% object% ()]{this is class-1 documentation}

Now the result was the following error message:
../../../../racket-6.4/share/racket/pkgs/scribble-lib/scribble/private/manual-class.rkt:127:11:
 scribble: no class/interface/mixin information for identifier: 
#

When I now get rid of the @defclass thing (it seems to be a macro but as I am 
still learning racket I'm not so sure...) then scribble works again:
#lang scribble/manual
@(require racket (file "class-1.rkt"))
@defmodule[(file "class-1.rkt")]{This is the documentation of module 
@racket[class-1].}
blah blah...

Is scribble not applicable to document such small modules? Does scribble need 
some more preparation to document classes? I ask this because in other 
circumstances scribble worked fine. Only as I tried to document the classes I 
created the problems. I also looked at some of the sources of the racket 
documentation to see how the 'professionals' did it. But that did not help me.

Thanks in advance for any response!

-- 
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.
For more options, visit https://groups.google.com/d/optout.