This Question is Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
12 Replies Last post: Dec 30, 2008 1:23 PM by Dave Lorde  
Dave Lorde Novice 469 posts since
Aug 21, 2002
Currently Being Moderated

Dec 28, 2008 6:10 PM

Calculator Tutorial problem

I'm stuck at the point where the input fields have been added to MyCalc in the sandbox, and I need to add a blank line followed by an output field. The tutorial says

 

"We separated input fields from output field with an empty cell in order to divide input fields from output fields. In order to add it, put caret after inputField's cell and press Enter, then choose constant."

 

When I put the caret after the inputField's cell and press Enter, I get a new line with another inputField on it:

 

...

input height

input depth

input <no name>

 

I see no way of 'choosing constant' at this point.

 

What is the trick?

Konstantin Solomatov JetBrains 273 posts since
May 18, 2004
Currently Being Moderated
Dec 28, 2008 9:22 PM in response to: Dave Lorde
Re: Calculator Tutorial problem

Hello, Dave.

 

It seems that you tried to add code to the wrong place. You should open editor's editor, not instance's editor. In order to do so, find Calculator concept in language's node in project view. Open it and go to editor tab

Konstantin Solomatov JetBrains 273 posts since
May 18, 2004
Currently Being Moderated
Dec 29, 2008 2:44 PM in response to: Dave Lorde
Re: Calculator Tutorial problem

You should press Insert or Enter at this point in order to add a new output field. You can read more about how to use editor in Appendix A in our tutorial.

Konstantin Solomatov JetBrains 273 posts since
May 18, 2004
Currently Being Moderated
Dec 29, 2008 5:49 PM in response to: Dave Lorde
Re: Calculator Tutorial problem

In order to show output fields in calculators editors you need to change the calculator's concept editor so it looks like on the screenshot in the attached file. You need to add %outputField% below the empty constant cell.

Attachments:
Konstantin Solomatov JetBrains 273 posts since
May 18, 2004
Currently Being Moderated
Dec 29, 2008 9:50 PM in response to: Dave Lorde
Re: Calculator Tutorial problem

As I can see, you probably declared the wrong kind of child for outputFields. Take a look at outputField child's declaration. You should have OutputField not BaseConcept.

Konstantin Solomatov JetBrains 273 posts since
May 18, 2004
Currently Being Moderated
Dec 30, 2008 10:12 AM in response to: Dave Lorde
Re: Calculator Tutorial problem

Could you send me your project? (at kostik@jetbrains.com) We've tested this tutorial thoroughly and we didn't have any problems which required restarting MPS.

More Like This

  • Retrieving data ...