mfryman (2) [Avatar] Offline
#1
General Comments:

1. It appears that this book is targeting the mature developer and not the beginner. There is very little hand holding (which is fine, but the book needs to be noted that it's not for beginners).
2. The animation stuff is finally making some sense to me. Thanks. I've been reading the Laszlo docs for a while now and just couldn't get my head wrapped around what it was doing.

Chapter 2 Comments:

Keeping in mind that I've already played some with Laszlo and am pretty much skimming this chapter:

1. Listing 2.6 & 2.7 don't generate the end result you show. The planes actually move apart as they fly into the distance (or at least, they do on my 4.0)

2. Not sure if it would be handy or not, but I found it tedious to have to play with the fixed values 40 & 50 and so changed the classes to include the attributes instead of having to type them in (or change them in every place) when I wanted to play with it. The new class looks like:
<class name="jet" resource="jet" stretches="both">
<attribute name="h_offset" value="50" type="number"/>
<attribute name="v_offset" value="40" type="number"/>
<attribute name="timer" value="2000" type="number"/>
</class>
and is used as:
<jet name="LEFTWING" x="${parent.LEAD.x-parent.LEAD.h_offset}" y="${parent.LEAD.y+parent.LEAD.v_offset}" >
width="${parent.LEAD.width}"
height="${parent.LEAD.height}"
opacity="${parent.LEAD.opacity}"
/>

3. Listing 2.8 needs some serious thought. Since I didn't download the original source, I've pretty much just been typing in (well, cut & paste, but anyway) and reading as I go. The problem is that 2.8 implies that you should create a file jets.xml; however, you never show how, why, when, or even what syntax an external dataset would have. The only way that dataset works is to be included inline with the rest of the code. I'm not sure what the intention was, but if you're going to get into external datasets here, you'll need some explanation (or at least sample) to go with it.

4. Listing 2.10 is wrong. First, the code is wrong. You have the datapath set to use elements 1,2,2,4,4 and it should be 1,2,3,4,5. If you fix it, then you wind up with the code not behaving as you document. Instead, you get the missing man formation with the missing piece being whatever pilot isn't defined. Again, I'm doing this on my 4.0 so my results may be slightly different than 3.3.

That's it for now. I'll post more as I hit them.

m