The problem here is that you did not change the access for name
(or address, or memberNo) from protected to public.
A protected property in the Borrower class can only be accessed by a method of the Borrower class.
JadeScripts cannot access protected properties.
Instructions
- Select the Borrower class.
- Double click the name property (or whichever property is highlighted in the code window).
The Define Attribute dialog is displayed.
- Select the public access option button.
- Click the OK button.
- Select the JadeScript class.
- Select the createBooks method.
- Select the Methods | Compile Method command.
The status line in the Class Browser displays
«Compilation complete - no errors»
- Select the Jade | Execute it menu command.
The status line will then display the message
«Execution complete»
|