Update to Lesson Six of Simulation Editor Module

This page provides important information related to Lesson Six: Multiple Modes. It also gives a general description of how the Simulation Editor handles objects on a page and background. This information could be important to developers who would be updating a Simulation built in Instructor 8.5/8.6 as well as anyone building a new Simulation in ToolBook Instructor 2004.

First, I will address issues related to Lesson Six. As the lesson is written in the book, you were told to write an On load page action such as that shown here. In this case, the goal was to have the Simulation be reset as the page is loaded for each of the three modes and the initialMode set. The Simulation is then triggered.

If you have done the lesson, you will recall that an Action Method (right)was defined to show a red rectangle named "highlighter" after three incorrect attempts in Practice mode and after an incorrect answer in Assessment mode. Likewise you will recall that an On reset simulation method was defined (below) to hide this object on resetting the Simulation.

In testing this at Reader level in Native mode, you might observe a problem but it looks like in DHTML there is no problem. The problem is that the rectangle "highligher" flashes (shows) briefly as the page is loaded.

First, I will explain what is happening and how to fix it and then go into a general discussion about this issue and how it affects Simulations updated from Instructor 8.5/8.6 and new Simulations.

If you look at the Objects tab for the Properties for Simulation, you will find a list of included objects. This lists all objects on the foreground (except for the Simulation Object) and would also list all of the objects on the background if there were any. Notice then that the rectangle named "highligher" is set to visibe and is an included object.

To solve the problem you can either:

1. Uncheck This rectangle should be visible initially or

2. Uncheck Rectangle "highlighter" : visible at the top to not have this object included in the Simulation.

A simple solution, but let's take a look at why this is happening.

 

If you double-click on any defined Action Method and then edit that method, followed by clicking on that method, you will get a drop-down such as that shown here which shows all the user-defined methods as well as several built-in methods. One of those is Asym_ResetEvaluationObjects.

If you choose this Action Method, you will find something similar that that shown here. Notice that this method resets all the included obects and in this case, all objects visible property is set to true and objects such as buttons have the enabled property set to true.

Thus if the On load page action resets the Simulation, then the rectangle "highligher" will first flash (show) because of this Action Method (right), and then hide because of the On reset simulation Action Method shown below.

The order of execution for the Actions Methods is built-in followed by user-defined which is why the flashing occurs.

If you uncheck the object from the top of the dialog box, then it will not show up in this Asym_ResetEvaluationObjects method and the problem goes away.

Now, perhaps more importantly, why did this happen?

There is a simple answer but something that I feel is very important for all of us to know who either update Simulations from Instructor 8.5/8.6 or create a new Simulation in ToolBook Instructor 2004. The first time that you open the Simulation Editor on a page that has a Simulation, the list of included objects and their properties is built based upon the conditions of the objects on that page when this happens. So, if the rectangle (or any other object) is visible when this happens those initial settings on the Objects tab are fixed and you now have to make changes there to get what you want on a Simulation page with regards to what is initally visible, not visible, enabled, or not enabled, etc. To keep this from happening, one would have to hide the rectangle before opening the Simulation Editor for the first time. This also would apply to a book updated from 8.5/8.6 where you will find that going to a Simulation page and clicking the Simulation Editor icon from the Tool Bar causes an initial updating process to occur where the Simulation is updated to ToolBook Instructor 2004. Likewise, if you have built a page by adding your objects and then do an Insert, New Simulation, this will happen. It does not matter that you might change the properties of an object later on, those initial properties are going to be there until you either change on the Objects tab or exclude the object. This will happen for me a lot since I will often have a shared script that looks something like this for a lot of my objects on a page:

I use this to show my objects at Author level so that I can work with them and then have them hidden when the book is reset or when I go to Reader level. What I could do now that I understand fully what is going it is to change this code to hide the objects at Author level, then open the Simulation Editor or insert the Simulation, then change the code back.

Now, the really good news. So why did this not come up as an issue with the first five lessons or any of the other lessons in the book? In the case of Lesson Six, you will recall it used Lesson Five as a starting file and Lesson Five was built from an earlier lesson. In all of those lessons, we had the same situation: the rectangle "highligher" was visible at Author level when the Simulation was added. Any of those files that you would look at would show that this is an included object and that it is set to be visible. Thus the Asym_ResetEvaluationObjects Method should show it, but then the On reset simulation method hides it. The answer goes back to the On load page action that resets the Simulation for Lesson Six. In the other lessons, the Simulation is reset initially when the book is saved and then reset from the last page if we provide the learner a button to do the Simulation over. Once we get to the Simulation page, the resetting has already occurred. For those other lessons with the exception of the Assessment Simulation, we have chosen to have the Auto reset property for the Simulation set to On unload page but that does not seem to cause anything strange to happen when we leave the page.

Having given the good news for my lessons, you as a developer will still need to really watch the objects that you might have on a Simulation page that you do not want to initially be shown or ever be shown, making sure that they are not visible when you first open the Simulation Editor. The same would be true for enabled/disabled state of an object. I am sure that as you develop a Simulation page, there will be other objects and other properties that you might have to deal with also, so just be aware that this is what is happening and know that you can do things initially to avoid a potential problem, or you can go to the Objects tab later on and make the changes needed.