Thanks, I'd just worked out it was an initialisation arg- I assume it is created something like this<br><br>(define person%<br> (class object%<br> (init name)<br> (define -name name)<br> (super-new)<br> (define/public (say-hello)
<br> (printf "hi, my name is ~a~%" -name))))<br><br>I think I'll use the second option - I don't want to change the value, and I think it is less verbose in the end.<br><br>Thanks(again), <br><br>S.
<br><br><div><span class="gmail_quote">On 10/5/07, <b class="gmail_sendername">Matthew Flatt</b> <<a href="mailto:mflatt@cs.utah.edu">mflatt@cs.utah.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At Thu, 4 Oct 2007 15:09:23 +0100, "Stephen De Gabrielle" wrote:<br>> timeline-selector.ss::158: class*: superclass does not provide field:<br>> min-width for class: timeline-selector%<br>> (note the character offset - rather than the line number/character position
<br>> reported in bug 8954)<br>><br>> I think I am using inherit field correctly, and the pane% I am using as a<br>> superclass does have a 'min-width' field.<br><br>The pane% class has a `min-width' method, not a field.
<br><br>The pane% class also has a `min-width' initialization argument. But you<br>don't need to explicitly inherit it to use `min-width' with `super-new'<br>or `super-initialize'.<br><br>I think you want
<br><br> (define timeline-selector% (class pane% ()<br> (init min-width)<br> ; Make the drawing area<br> (super-new [min-width min-width]
<br> ....)<br> ....<br> (define canvas (new canvas%<br> [parent this]<br>
....<br> [min-width min-width]<br> ....))<br> ....))
<br><br>or maybe<br><br><br> (define timeline-selector% (class pane% ()<br> (inherit min-width) ; inherit method<br> ; Make the drawing area<br> (super-new ....)
<br> ....<br> (define canvas (new canvas%<br> [parent this]<br> ....
<br> ;; call method to get arg:<br> [min-width (min-width)]<br> ....))<br>
....))<br><br><br>Matthew<br><br></blockquote></div><br><br clear="all"><br>-- <br>Cheers,<br><br>Stephen<br><br><br><br>--<br>Stephen De Gabrielle<br><a href="mailto:s.degabrielle@ucl.ac.uk">
s.degabrielle@ucl.ac.uk</a><br>Telephone +44 (0)20 7679 5242 (x45242)<br>Mobile 079 851 890 45<br><a href="http://www.uclic.ucl.ac.uk/annb/MaSI.html">http://www.uclic.ucl.ac.uk/annb/MaSI.html</a><br>University College London Interaction Centre
<br>Remax House - 31/32 Alfred Place<br>London - WC1E 7DP