Test TOC
tEST
302. Create some intentional errors, for example, by renaming the CartransferOwnershipDocuments to CartransferOwnershipDocument. Save and practice following the error leads from the red dots and fix the error. 303. Create some intentional errors, for example, by changing the expression of a class action on Car. Save and practice finding the error from the red dots. Fix the errors, save, and ensure you have a clean model with no errors. 304. Find the link class HistoricOwnership. Select the association and change from <Default> to HistoricOwnerships (with a plural s) in the LinkRoleName on both association ends for the associations. Save and check for errors. 305. Fix the errors by clicking on them and updating the expressions to reflect the new name HistoricOwnership -> HistoricOwnerships. 306. Drop the ShowCar action that does not have a ViewModel to show. 307. Create a New ViewModel called ProperCarView. Set the Class to Car and set Requires Root. 308. Add a Class Action to bring the ProperCarView up. 309. Show the RegistrationNumber in the ProperCarView by adding a column. 310. Also, add the State, BrandOfCar, and CarOwner - make them static to avoid editing. 311. Add the multilink for CarTranserOwnershipDocuments as a grid. 312. Add columns in this grid, Seller and Buyer, and remove the AsString default column. 313. Start the web prototype. Search cars and open the ProperCarView on a Car that has CarTranserOwnershipDocuments. 314. Add a Class action: ProduceDocument, and give the ExecuteExpression the value of self.opendocumentreportshow(CarTransferOwnershipDocument.ViewModels.TheTemplateForCarTransferOwnershipDocumentReport) Expect the error due to not having the TheTemplateForCarTransferOwnershipDocumentReport ViewModel yet. 315. Create a TheTemplateForCarTransferOwnershipDocumentReport ViewModel. Set the class to CarTransferOwnershipDocument and check the Requires Root box. 316. Right-click the menu in the ViewModel tree. Add the columns needed for a report. Expect the TemplateUrl and ReportFileName ViewModelColumns. 317. Verify that the action that was faulty before now finds the TheTemplateForCarTransferOwnershipDocumentReport. 318. In the TheTemplateForCarTransferOwnershipDocumentReport ViewModel, click on the UsePlacingHints to hide the UI part of the ViewModel. (also see the Turnkey Live Editor below) 319. In the FileMenu ShowCurrentModelDirectory, check the model file name: "Start.modlr". Create a folder named Start_AssetsTK and read about AssetsTK on the Wiki. 320. Create a folder called Content in Start_AssetsTK. Start Word, click on a new document, and write: this will be my template. Save as ODT format in Start_AssetsTK/Content and call the file: ThisWillBeMyTemplate.odt
321. Close Word to avoid file lock while MDriven Designer tries to access it. 322. Check that your app URL is starting with http://localhost:... Test http://localhost:<port>/content/ThisWillBeMyTemplate.odt - Ensure you can access the template (you must use the port number you often use). 323. In the ViewModel for the template, in the Template URL, set the string value 'http://localhost:<port>/content/ThisWillBeMyTemplate.odt' Solving issues[edit | edit source] If downloading the template doesn't work, doublecheck the model name. The name of the "AssetsTK" folder is based on the model name, except the ".modlr" part. If the model file is called "MyStart.modlr", then the folder name should be "MyStart_AssetsTK". Avoid additional dots and other special characters in the model name. Using the Turnkey Live Editor avoids these problems by creating the co
Test
302. Create some intentional errors, for example, by renaming the CartransferOwnershipDocuments to CartransferOwnershipDocument. Save and practice following the error leads from the red dots and fix the error.
303. Create some intentional errors, for example, by changing the expression of a class action on Car. Save and practice finding the error from the red dots. Fix the errors, save, and ensure you have a clean model with no errors.
304. Find the link class HistoricOwnership. Select the association and change from <Default> to HistoricOwnerships (with a plural s) in the LinkRoleName on both association ends for the associations. Save and check for errors.
305. Fix the errors by clicking on them and updating the expressions to reflect the new name HistoricOwnership -> HistoricOwnerships.
306. Drop the ShowCar action that does not have a ViewModel to show.
307. Create a New ViewModel called ProperCarView. Set the Class to Car and set Requires Root.
308. Add a Class Action to bring the ProperCarView up.
309. Show the RegistrationNumber in the ProperCarView by adding a column.
310. Also, add the State, BrandOfCar, and CarOwner - make them static to avoid editing.
311. Add the multilink for CarTranserOwnershipDocuments as a grid.
312. Add columns in this grid, Seller and Buyer, and remove the AsString default column.
313. Start the web prototype. Search cars and open the ProperCarView on a Car that has CarTranserOwnershipDocuments.
314. Add a Class action: ProduceDocument
, and give the ExecuteExpression the value of self.opendocumentreportshow(CarTransferOwnershipDocument.ViewModels.TheTemplateForCarTransferOwnershipDocumentReport)
- Expect the error due to not having the TheTemplateForCarTransferOwnershipDocumentReport ViewModel yet.
315. Create a TheTemplateForCarTransferOwnershipDocumentReport ViewModel. Set the class to CarTransferOwnershipDocument
and check the Requires Root box.
316. Right-click the menu in the ViewModel tree. Add the columns needed for a report. Expect the TemplateUrl and ReportFileName ViewModelColumns.
317. Verify that the action that was faulty before now finds the TheTemplateForCarTransferOwnershipDocumentReport.
318. In the TheTemplateForCarTransferOwnershipDocumentReport ViewModel, click on the UsePlacingHints to hide the UI part of the ViewModel. (also see the Turnkey Live Editor below)
319. In the FileMenu ShowCurrentModelDirectory, check the model file name: "Start.modlr"
. Create a folder named Start_AssetsTK
and read about AssetsTK on the Wiki.
320. Create a folder called Content
in Start_AssetsTK.
- Start Word, click on a new document, and write:
this will be my template
. - Save as ODT format in Start_AssetsTK/Content and call the file:
ThisWillBeMyTemplate.odt
321. Close Word to avoid file lock while MDriven Designer tries to access it.
322. Check that your app URL is starting with http://localhost:... Test http://localhost:<port>/content/ThisWillBeMyTemplate.odt - Ensure you can access the template (you must use the port number you often use).
323. In the ViewModel for the template, in the Template URL, set the string value 'http://localhost:<port>/content/ThisWillBeMyTemplate.odt'
Solving issues[edit | edit source]
If downloading the template doesn't work, doublecheck the model name. The name of the "AssetsTK" folder is based on the model name, except the ".modlr" part. If the model file is called "MyStart.modlr", then the folder name should be "MyStart_AssetsTK". Avoid additional dots and other special characters in the model name.
Using the Turnkey Live Editor avoids these problems by creating the co