Menu

Error: 'nil' does not exist...

Help
2005-09-28
2013-05-28
  • Bill Thorpe

    Bill Thorpe - 2005-09-28

    I just tried to upgrade from 4.1.0 to 4.2.2 but the generated C# code compiles with an error:

    The name 'nil' does not exist in the class or namespace...

    In 4.1.0 the generated function is...
    internal override void ControlFailed(ControlContext context)
    {
      context.PushState(MainMap.Wait);
      context.State.Entry(context);
      return;
    }

    In 4.2.2 the generated function is...
    internal override void ControlFailed(ControlContext context)
    {

      context.State = nil;
      context.PushState(MainMap.Wait);
      context.State.Entry(context);
      return;
    }

    The compiler is complaining about the line "context.State = nil;".

    Am I doing something wrong?

    Thanks,
    Bill

     
    • Bill Thorpe

      Bill Thorpe - 2005-11-03

      I'm still having this problem.  Any suggestions?

      Thanks,
      Bill

       
      • Charles Rapp

        Charles Rapp - 2005-11-03

        Bill,

        1. This is definitely an SMC bug. I have opened ticket 1347654 to track its correction.

        2. As for a short-term work around, you could change your FSM to:

        YourState
        {
            ControlFailed
                FailedState/push(Wait)
                {}
        }

        FailedState
        {
            // Handle pop transitions here.
        }

        This will get around the "context.State = nil" bug until release 4.3.0 gets out (RSN!).

        Charles Rapp

         

Log in to post a comment.

MongoDB Logo MongoDB