Introduction Welcome to The EnterPage newsletter. We are excited to let you know that we have a new book at the printers called "Programming for e-Learning Developers." We urge you to check out the sample chapter and other links. Conference preparations are in swing as well. Jeff will be doing a whole set of "Programming for e-Learning Developers" sessions in addition to all the normal great ToolBook, Flash, and other content. Times are tough but you won't find a better conference deal anywhere. We hope you will be able to join us in Colorado in early August. Beyond book and conference news, this issue has the normal assortment of ToolBook, Flash, and .NET news, tips, and tricks. Enjoy and thanks for reading. |
Pre-order "Programming for e-Learning Developers" Book This new 358-page book by Jeff Rhodes covers the gamut of e-Learning programming tasks in ToolBook (OpenScript and Actions Editor), Flash, JavaScript, and Silverlight. Here is the description from the back cover: As an e-Learning developer since 1993, I have found that even a little programming can go a long way in terms of increasing our ability to create meaningful interactions for our users. To do that, however, entails understanding basic programming concepts like events, properties, and methods. Add to that the requirement to perform more advanced tasks like adding hyperlinks, communicating via SCORM with your Learning Management System, loading media or graphics, and using a web service to send email from your application, and you have the need for some "real" programming. Rather than hiring a pricey consultant, however, you can use this book to learn the concepts to get the job done. The complete sample applications used in the book (including source code) are available for download for those who purchase the book. Many e-Learning developers use multiple tools. Even if you stick to a single tool like Flash or ToolBook, you still likely have the need to make external JavaScript calls in order to get extra functionality. So rather than focus on a single tool, this book takes each of our programming challenges and solves it in ToolBook - OpenScript, ToolBook - Actions Editor, Flash, JavaScript, and Silverlight. Even if you don't use all these environments currently, seeing the similarly of programming concepts across all the environments will enhance your skills in your tool(s) of choice. The book is $45 and should ship by the end of June. You can pre-order using the link below. Your credit card will not be charged until the book ships. Information Table of Contents Sample Chapter Reviewer Comments Pre-Order |
Sign Up Now for the 2009 ToolBook User's Conference / e-Learning Authoring Conference
We're doing pretty well so far on attendance, considering the state of the world economy. But we still have plenty of room and will be happy to fit you in, even if it at the last minute. We have a special promotion where 3 or more attendees from the same company can receive a $50 off each registration. So bring your co-workers! The 11th annual conference boasts the normal great lineup of 18 one-hour session blocks over three days, with all except the last two (when some attendees have to scramble for the airport)containing four sessions to choose from. We also have an outstanding lineup of preconference workshops on ToolBook, Flash, Training Studio, Exam Engine, and programming. In addition to all the scheduled learning, there will be two great receptions, the always popular "Hack Ack" contest, the Help Desk where you can get answers to your individual questions, and the ability to meet with SumTotal's Brad Crain (Vice President, ToolBook) and Sheri Miller (Sr. Director Business Development). For the first time (and by popular demand), we'll give out the Hack Ack theme the week before so that attendees can get organized before they get on-site. Dates August 3 - 5, 2009 Preconference Training August 1 - 2, 2009 Rates (All Options Include Three Meals Per Day Plus Snacks)
Preconference Training
Registration Rates Sessions Faculty Preconference |
Schedule Available for the ToolBook User's Conference / e-Learning Authoring Conference The complete TBCON schedule is now online. You can get the overall view using the Daily Schedule and can build a complete schedule to show the boss just what you would learn using the Scheduler Application. The Scheduler is particularly handy since many of the sessions are repeated twice. It allows you to jump to the next time a session is offered so see if you can squeeze the one you want into that time slot instead. |
ToolBook 10 Preview Available If you aren't already working with the ToolBook Instructor 10 preview version, we recommend trying it out today. Some of the exciting new features include:
Note that SumTotal will be doing two sessions specifically about ToolBook 10 at TBCON: "What's New - Getting the Most Out of the Latest ToolBook Release" and "ToolBook Assessments - Understanding ToolBook's Question Bank Feature." Preview Site New Features |
Special ToolBook Upgrade/Support Pricing With ToolBook 10 on the horizon, it is important for ToolBook developers to be on the current version and have a valid support or maintenance contract in place. Otherwise, 9.5 customers will be paying upgrade price (which is more than the support price) and 9.0 or older customers will be paying full price. Luckily, SumTotal has authorized two special deals through June 15, 2009. Both of these will ensure that you get ToolBook 10 in your hands as soon as it is released.
|
Plug-In Pro Spotlight - List Files In Directory Most of the tools and shortcuts in the Plug-In Pro are for adding functionality or speeding up tasks within ToolBook itself. The List Files in Directory tool is different. We wrote this tool to deal with the sometimes arduous task of listing all the files in a directory. We use this to create "Read Me" files that list every file that our applications install on the computer. Check out the one for the Learning & Mastering ToolBook product for an example. You can also use it for documentation, to find just certain files (wildcards like ? and * are accepted), and much more. You can sort in various ways and include/exclude system and hidden files. To learn more, you can follow these links: Help topic Plug-In Pro web page |
Expert Information from the Learning & Mastering ToolBook Series By Jeff Rhodes, Platte Canyon Multimedia Software Corporation Debugging XML Files When I was first working on the script for the Learning & Mastering ToolBook product to read an XML file into an array, I was getting an error and couldn't figure out why. The original code fragment in question was: fileName = pathOfFile(name of this book) & "media\PlatteBooks.xml" xmlDoc = createAutoObject( "Msxml2.DOMDocument.4.0" ) extAsync of xmlDoc = FALSE result = extLoad( fileName ) of xmlDoc if result = false request "Error in opening file." else -- do actions here end if The XML file looked like this (Editor note: now we need another node to this XML file for the new book): <?xml version="1.0"?> <books> <book> <author>Jeffrey M. Rhodes</author> <price format="dollar">49.95</price> <pubdate>05/27/2002</pubdate> </book> <book> <author>Jeffrey M. Rhodes & Christopher C. Bell</author> <price format="dollar">45.00</price> <pubdate>04/09/2001</pubdate> </book> <pubinfo> <publisher>Platte Canyon Press</publisher> <state>CO</state> </pubinfo> </books> Since I'm lucky enough to have Tim Barham of SumTotal as an instant messaging contact, I sent him the fragment and the XML file and asked if he could see the error. He first suggested getting more info out of the error with this code: request extReason of extParseError of xmlDoc This gave the error "Whitespace is not allowed at this location." Tim then looked at the XML file and saw the & in there. He pointed out that you have to escape it with &. In his words, "So the "whitespace is illegal" error occurs because you have whitespace immediately after the "&"... Kind of cryptic, but makes sense when you know why:)." Of course, I responded that this would make a good "Expert Information" topic for Learning & Mastering ToolBook:) |
OpenScript Tip from the Learning & Mastering ToolBook Series
By Simon Price, University of Bristol, http://simonprice.info Create JavaScript and OpenScript Samples The samples for the "Introduction to JavaScript" sample book from TBCON and the Learning & Mastering ToolBook product use an innovative method for executing JavaScript within a native ToolBook application. We add the WebBrowser control as an ActiveX control to the book. We then take the text of the associated field (which has our JavaScript in it), write that to a temporary HTML page, and then call the extNavigate() method to tell the control to run that HTML page. The code (shared script) is shown below. to handle buttonClick -- show the contents of an html file or a -- url in a browser control -- forward to parent url = my p_url if url = null -- look for a user property specifying an -- html filename htmlfile = my p_htmlfile if htmlfile = null -- defaults to a temporary file htmlfile = "tmp.html" end -- the file is relative to the folder -- that this tbk is in fname = ASYM_PathOfFile(name of this book) & htmlfile -- optionally, create the htmlfile sourceobj = my p_sourceobj if not isObject(sourceobj) sourceobj = self end javascript = javascript of (sourceobj) if javascript <> null -- wrap the javascript in html html = replaceString(my p_wrapper, \ "%JAVASCRIPT%", javascript) -- write the html to the file createFile fname writeFile html to fname closeFile fname end -- use the absolute file path as the url -- (IE will convert to a true URL -- automatically) url = fname end -- load the web page into a browser control -- on this page controlname = my p_controlname if controlname = null controlname = "preview" end get extNavigate(url) of webbrowser controlname end to get javascript return my p_javascript end How to use this shared script:
<html> <head> <script type="text/javascript"> <!-- function test() { %JAVASCRIPT% } //--> </script> </head> <body onload="javascript:test()"> <div id="mainbody"></div> </body> </html>
// JavaScript alert("Hello World");
-- OpenScript to handle buttonClick -- run some OpenScript from a designated -- source forward to parent sourceobj = my p_sourceobj if not isObject(sourceobj) sourceobj = self end openscript = openscript of (sourceobj) tmp = script of (sourceobj) handler = replaceString(my p_wrapper, \ "%OPENSCRIPT%", openscript) sysError = null sysSuspend = false script of sourceobj = handler sysSuspend = true if sysError = null send test to (sourceobj) script of (sourceobj) = tmp else put "Syntax error in script:" & crlf & \ crlf & handler end end to get openscript return my p_openscript end To summarize, we take these steps: Run JavaScript
Run OpenScript
|
Web Hint from the Learning & Mastering ToolBook Series
By Denny Dedmore & Tim Barham, SumTotal Systems, Inc. Item and Word Operators and studentName Property in the Actions Editor Question: I'm wondering if there's a way to edit the studentName text that my LMS sends (which comes in like "Smith, Bob", but without the quotes) such that I have only "Bob". At that point, I'd like to put "Bob" into a text field. The project is DHTML. Denny posted this response: If you are using TB 9 or later, you could use this line of code in the Actions Editor: set text of field "name" to item 2 of studentName of this book This will result in " Bob" appearing in the field. Tim jumped in with this addition: Using "word 2... " instead of "item 2..." should solve the leading space issue. So the line would be: set text of field "name" to word 2 of studentName of this book Editor note: This solution takes advantage of the item and word keywords added in ToolBook 9 and carried through to 9.5. It also uses the special studentName property of the book supported by the Actions Editor. Note also that item and word also work in OpenScript. |
Flash ActionScript Tip
By Jeff Rhodes, Platte Canyon Multimedia Software Corporation Hyperlinking to a URL One of the examples in the new book is a screen where the user can enter a URL and then click a "Show Window" button to display that URL in a new browser window. In Flash, this can be accomplished either via navigateToURL or via the External Interface class. The code below shows the navigateToURL method. runInitialLoad(); stop(); function runInitialLoad() { // set up listener ShowWindowBtn.addEventListener(MouseEvent.CLICK, makeJsCall); } function makeJsCall(eventId:MouseEvent):void { var urlText:String = WindowUrl.text; var requestId:URLRequest = new URLRequest(urlText); navigateToURL(requestId, "URL"); } We call runInitialLoad when we first enter the key frame. In there, we call addEventListener to associate our button's CLICK event with the makeJsCall function. Within that function, we define a new urlText variable that holds the actual URL that the user entered into the field. We then create a URLRequest object, passing in the urlText as its "constructor." Now we have everything we need to actually show the browser window. We call navigateToURL and pass our URLRequest as one parameter and the name of the window ("URL") as the second parameter. Naming the window is handy if the user clicks the button again, as the same browser window will be reused rather than having the code spawn a new window. |
VBTrain.Net Nugget
By Jeff Rhodes, Platte Canyon Multimedia Software Corporation Hyperlinking to a URL Lets look at the same book sample in Silverlight that we did in the previous article for Flash. This small bit of XAML (Extensible Application Markup Language) defines our button and calls the ShowWindowBtn_Click handler when the user clicks the button. <Button HorizontalAlignment="Stretch" x:Name="ShowWindowBtn" Grid.Column="0" Grid.Row="2" Content="Show Window" Margin="10,10,10,10" Click="ShowWindowBtn_Click" /> Here is the implementation code for that button. Private Sub ShowWindowBtn_Click(ByVal sender As System.Object, _ ByVal e As System.Windows.RoutedEventArgs) Dim urlText As String = WindowUrl.Text Browser.HtmlPage.Window.Invoke("tbfunction_showWindow", urlText) End Sub We grab the actual URL that the user entered and put it in our urlText variable. We then make a direct call to a .js (JavaScript) file that is linked to our page. The first parameter is the name of the function ("tbfunction_showWindow") we want to call and the second (and additional if needed) parameter is what we want to pass to that function. Those of you who are ToolBook developers will recognize from the "tbfunction_" prefix that we also call this same function from the Actions Editor. Here is the JavaScript implementation of that function. var openWindowString = "left=0,top=0,width=800,height=600, status=no,resizable=no,scrollbars=no,toolbar=no,menubar=no"; function tbfunction_showWindow(url) { var winId = window.open(url, 'URL', openWindowString); } This accomplishes essentially the same task as our navigateToURL function in Flash but with the additional ability to control the position, size, and characteristics of the browser window. |
The EnterPage is distributed up to four times per year, with occasional special issues. Individuals who have expressed interest in Platte Canyon Multimedia Software Corporation or its products receive The EnterPage. Suggestions for articles or proposals for article submissions are welcome. Send information to ep@plattecanyon.com. Back issues of the EnterPage are available at: http://www.plattecanyon.com/enterpage.aspx |
Platte Canyon Multimedia Software Corporation, 8870 Edgefield Drive, Colorado Springs, CO 80920, (719) 548-1110 |