[racket-dev] Fwd: Re: [racket] Couldn't find a step matching that criterion

From: David Van Horn (dvanhorn at ccs.neu.edu)
Date: Sun Jan 9 20:57:43 EST 2011

Why are the "< Step" and "Step >" buttons enabled when there are no 
steps to take in a given direction?  The "Couldn't find a step matching 
that criterion" message seems awfully confusing for a beginner.  If the 
buttons are going to be enabled, something along the lines of "There are 
no further steps to take" and "There are no previous steps to take" 
would be better, IMO.


-------- Original Message --------
Subject: Re: [racket] Couldn't find a step matching that criterion
Date: Sun, 09 Jan 2011 20:48:49 -0500
From: David Van Horn <dvanhorn at ccs.neu.edu>
To: Sayth Renshaw <flebber.crue at gmail.com>
CC: users at racket-lang.org

On 1/9/11 9:02 AM, Sayth Renshaw wrote:
> I am having a real issue with the stepper. Maybe the programs are too
> simple so far for the stepper, but it doesn't step.
> The check syntax feature is great. for the check-color game should the
> stepper work? What is the trick? I just wanted to check the flow by
> stepping through.
> Each time I use it I get "Couldn't find a step matching that criterion"
> No matter what I change select or do.
> ;check-color
> ;colour guessing game (target target)(guess guess)
> ;symbol symbol symbol symbol -> string
> ;four color symbols
> (define (check-color target1 target2 guess1 guess2)
>    (cond
>      [(eq? target1 guess1) 'Perfect]
>      [(or (eq? target1 guess1)(eq? target2 guess2))
> 'OneColorAtCorrectPosition]
>      [(or (eq? target1 guess2)(eq? target2 guess1)) 'OneColorOccurs]
>      [else 'NothingCorrect]))
> ;(check-color 'red 'green 'green 'red)
> ;'OneColorOccurs


You need to have at least one expression to step through in order for
the stepper to work.  The program you've given consists of a single
definition and *no* expressions.

The fix is easy: uncomment the check-color expression you have and step
through its computation.

  For list-related administrative tasks:

Posted on the dev mailing list.