[plt-scheme] Using FrTime

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sun Oct 1 15:15:34 EDT 2006

If I require class.ss and fred.ss I get this error

instantiate: unused initialization arguments: (label% "Timer") (visible
#t) for instantiated class: .../aux-mixin-macros.ss:19:16

Where my only line of code( other than the require's ) is

(define frame (new ft-frame% (label% "Timer") (width 200) (height 80)
(visible #t)))

Gregory Cooper wrote:
> Hi Jon,
>
> As you've noticed, class.ss and fred.ss have to be explicitly required
> before you can use the widget set.  However, once you've done so, they
> should all work.  What errors do you get?  Do they happen on
> "require", or when attempting to evaluate something?
>
> Greg
>
> On 10/1/06, Jon Rafkind <workmin at ccs.neu.edu> wrote:
>> Im reading "Crossing State Lines: Adapting Object-Oriented Frameworks to
>> Functional Reactive Languages" by Ignatoff, Cooper, and Krishnamurthi
>> and would like to try out the first example but can't get it working in
>> drscheme 352. I chose the FrTime language and typed this line into the
>> definitions windows:
>>
>>    (define frame (new ft-frame% (label% "Timer") (width 200) (height 80)
>> (visible #t)))
>>
>> Verbatim from the paper( except the paper used 'true' instead of #t ).
>> This led to the error:
>>    reference to undefined identifier: new
>>
>> So I did
>>    (require (lib "class.ss"))
>> But then got a different error:
>>
>>    reference to undefined identifier: ft-frame%
>>
>> Grepping through collects/frtime I found ft-frame% defined in
>> frtime/demos/gui/fred.ss.
>>
>>   ~/tmp/src/drscheme-352/collects/frtime $ grep -r "ft-frame" *
>>   demos/gui/demo/bindec.ss:(current-widget-parent (new ft-frame% (label
>> "Binary<-->Decimal")))
>>   demos/gui/demo/timer.ss:(current-widget-parent (new ft-frame% (width
>> 400) (stretchable-width #t)))
>>   demos/gui/fred.ss:  (define ft-frame%
>>   demos/gui/simple.ss:          (set! fr (new ft-frame%)))
>>
>> If I require 'fred.ss' I get a bunch more errors which probably aren't
>> worth going into. Am I missing something?
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.