What Can Be Done Using Revolution?
Joe Wilkins January 30, 2007 Tutorials Mac Developer
Since this column is going to be an evaluation and, hopefully, a guide to using Revolution to assist you in solving your problems, the very first thing we need to do is cover some of the most important general programming tenets.
When an idea for resolving a problem or issue that we encounter in everyday life occurs to us, our first hurdle is to come up with a method of “doing it” with our computer. In my career as an architect, I found designing buildings or groups of buildings presented a similar set of circumstances, so it is not unusual that we have come to give the name of architect to some individuals who plan and/or design computer programs. In fact, until I learned how to assemble computer programs, I found this process to be quite painful in my architectural practice; something that caused me to procrastinate far too much. At least, that is what I thought I was doing.
Initially, I thought I was just putting off the inevitable, and felt rather guilty at that fact; but I now realize that I was merely wrestling with my problems in my mind, in the attempt to figure out an approach. Before the Mac’s appearance, it didn’t really seem as if I was getting much accomplished during these periods. I now understand that I was mentally processing my projects’ data in an attempt to find the best way to assemble and present my solutions, something that may not even have been apparent at the time.
Before computers (“BC”), whether with a client or an instructor, architects wasted tons of tissue paper making sketches and overlays to sketches of their concepts. The difference being that they can now perform these trial efforts so much more easily that they don’t have the same reluctance toward “Getting Started.” At least I don’t.
When I first started acquainting myself with programming techniques, the “big deal” at that time, particularly among those who really weren’t programmers themselves, and probably didn’t want to be, was the “flow chart.” Frankly, I thought that was a real waste of my time. I suppose it was probably a necessary tool when the project was large, and the number of individuals involved in the process was substantial; but with a tool such as HyperCard or Revolution, where huge strides may be made at the drop of a hat, the best team is a small team; preferably consisting of a single person with the ability to entice a few friendly cohorts into performing the needed alpha and beta testing. Of course this assumes that the single person is a talented individual with an eye for good design. I believe that I had a chapter in my HyperCard series on that very consideration and I may resurrect it for this series, since it is still quite applicable. There may even be one of you reading this who would care to contribute their vision on this topic. If so, please do so, we are always looking for helpful, new, relevant content.
You should begin as soon as you feel you have a good idea. Break the problem down into a series of smaller problems, essentially creating an outline. Keep breaking these smaller problems into ever smaller ones. Whether you use a word processor or scripts within a new stack you create for that purpose - as I normally do - is unimportant. Start by making some statements in ordinary english that describe what you think you might want to get done.
These statements may eventually become Handlers within an object’s script. Most of the time a script consists of a series of related handlers, each one addressing some smaller issue. With most objects the main handler is an “on mouseup” handler which is activated by clicking and releasing the mouse on the object. Within that handler, the others in that script are called, addressing them by name; however handlers in other scripts may also be called so long as they are in a higher position in the object hierarchy. Before long, you’ll find that you know how to handle/resolve some of these smaller statements. Once you reach that point, you can start some actual scripting; and with Revolution doing so will be quite easy; certainly, much easier than with any other scripting or programming tool.
I hesitate to refer to Revolution as a programming language, although that is “kind of” what it is. Even Transcript is not a “language” in the conventional sense of the expression. With other “languages” the creator of a computer solution would probably find themselves using a number of different tools to resolve their challenges. Revolution is an IDE (Integrated Development Environment). You will find, in most instances, that you can do everything needed using Revolution itself; although from my current understanding there are also a number of third party tools that may be used in conjunction with Revolution. They may or may not make your life easier. For the time being we will stick with Revolution right out of the box.
Should you buy Revolution: Is it worth the asking price?
For now, I want to fulfill one of my promises, or at least start to do so. What do I think about Revolution? Is it worth the required investment of money and time? We have been provided with three approaches:
- The Free Demo: Frankly, if you’re serious about doing something with your Mac - or PC, if you must - there’s really no sense in wasting your time on a Demo. If you must kick the tires before you buy, then go that route; otherwise go ahead and shell out the money for the basic model.
- The Media or Studio Versions: Check out the pricing; realize that you are making a commitment for your computer’s future. Even though both versions appear to be somewhat expensive, you’ll end up saving so much time in the development process that you will find that either one will be an excellent investment. Realize, however, that there is an anually recurring expense for new versions - upgrades they’re called.
- The Enterprise Version: This probably won’t appeal to many of you, but there will be a segment who see that having the features and services this version provides will also be profitable in the long run.
The most expensive part of using Revolution will be your time. That will also be the least expensive part. You will seemingly spend a good portion of your waking hours using it. It may well become an addiction. You’ll get hooked, not unlike how you may have been hooked on HyperCard. Just don’t think about it; do it!
Does Revolution work as I had anticipated it should and live up to my expectations?
Does anything? Married twice, divorced twice! I’m real picky and very demanding. Does Revolution still have a chance? At this point I’ve just scratched the surface, but it’s looking better and better all the time.
I find, in my still limited exposure to Revolution with its scripting language, Transcript, that it is a skillfully designed implementation of a product tailored after HyperCard with some overtones of Visual Basic; though I probably would have done quite a number of things differently had it been my own creation. There are, understandably, quite a few major differences between HyperCard and Revolution. I find the most egregious of them to be the loss of HyperCard’s Background Layer; something that existed between the Stack and the Card. Revolution manages to provide similar functionality with Grouping; but to me it appears to be an afterthought and is somewhat awkward to use, a patch to replace something that was initially overlooked. I can’t imagine how that could have happened, but it did. I also don’t see that it was something that was compromised for the sake of cross platform compatibility, but that may be the case. Regardless, I believe it was the wrong decision.
Another item that bothers me to some extent is the inability to clone fields and buttons by dragging them, using both the option and shift keys, to restrain their horizontal or vertical positions. And when you shift/option/click instead of just opening an object’s Inspector, it should open an object’s script, and do so whether you have the Browse or Pointer as the current Tool. Speaking of which, since the Tool menu command keys are 9 and 0 for those two tools, I’d like to see them have that same relationship in the Tools palette, since it is a bit tedious having to switch back and forth between the two and having to constantly remember which is which. I told you I was picky. I guess that comes from having been a beta tester for a few other applications over the years.
I feel confident that I will eventually find a fair number of other elements equally dissatisfying. On the other hand, I love Revolution’s Message Box, with its multiline mode. Excellent! In fact, I may devote an entire chapter on how the Message Box can or should be used. Not just for working with Revolution either. Being familiar with Visual Basic, I can see Rev borrowed some features from it which should make PC users more comfortable.
Back to shortcomings: The User Guide is almost crippled with its missing references and they seem to be very slow to fix this deficiency. The Documentation’s Dictionary is both well conceived and fairly well implemented. The entire Product is a growing mass of information and there is still a lot to be done, although what has been done is really huge. I haven’t discussed this with anyone; but, in my opinion, future upgrades to the Documentation should be provided free to all licensees, regardless of the status of their license. If I haven’t mentioned it yet, once you obtain a Revolution License, you are not obligated to purchase additional ones as new versions become available.
Keep your eyes and ears open. In future chapters, I will reveal other features that I either really like or find severely lacking. I welcome comments from readers in this area.
Getting down to work with Revolution
With respect to documentation, as you create your own applications it is absolutely mandatory that you document as you go. Otherwise it just doesn’t get done. Plus it gives you time to think about your next step and where you’re going. In my own HC stacks, whenever I created an object, along with its script, I always started the on mouseup handler with something like this:
on mouseup if the shiftkey is down then answer "a description of what this object did" with "Cancel" or "OK" -- Sometimes you'll want to actually create a new scrolling field to describe the current object, since -- an answer dialog is somewhat limiting in capacity and tricky to use. There follows a couple of -- snapshots of some I used in one of my HC modules. else if the optionkey is down then -- some variation of the main function else if the commandkey is down then -- another variation else -- the main function of the object end if end mouseup
This is the Dialog that appears when the Print Menu button is shift/clicked.
And this one appears when the Update Menu button is shift/clicked.
Doing this provides running documentation while assisting you with the layout of the stack’s functionality. I haven’t gone looking for it yet, but hopefully Revolution has provided a method of building default handlers for all objects. If not, you can provide a similar skeleton that you can paste into each script when you create objects. I just noticed the Card’s Business title doesn’t display properly now. Hmn!
The First Step in Constructing a Stack
I’m not going to run you through all of the details of creating a new Stack. It is very easy; just open Revolution and click “New Mainstack” from the file menu. You’ll immediately have a brand new, Main Stack showing in front of everything else you may have open. The name in the Title Bar will be “Untitled 1” or perhaps 2 or 3. It will remain that way until you click “Stack Inspector” from the “Object Menu”, at which time the following Dialog will appear. Enter a name for this stack and once you close the Inspector Dialog, the new name will appear in the Title Bar. Once you’ve done this, Saving will save the stack with that name.
While the Inspector Dialog is open you may wish to change; or, at least, investigate some of the other properties that you may set. The side popup menu is shown above for access to other features. Once you have done this, in my opinion, you should start building your menus. This is something much more easily accomplished with Revolution than with HC. First, select Menu Builder from the Tools Menu. This presents the following Dialog. Click “New” and you get yet another Dialog as shown immediately below. Note the checkbox “Move objects down to accommodate the menu-bar.”
Once again, I’m not going to hold your hand here. You’ll probably learn a lot more about how to set up your menus by doing as I did - stumbling around a bit, discovering the Menu Builder’s idiosyncrasies. The following is what you could have if you’ve added some other menus to the Menu Bar. Don’t worry. If you don’t get it right the first time, you can always go back and change or modify them - at any time. You should probably work with the menus at the top of the Card rather than at the Top of the Screen as we do with Mac applications. That way, things will look great for Windows users. There is something to be done in this respect, but right this minute my mind has drawn a blank. We’ll leave that as the proverbial lesson for the student to solve.
Once you’ve clicked OK in the left Dialog, you’ll see the revised MB Dialog that now has all of your goodies in it. By clicking (selecting) the various Menus, you may then click on the Edit Script button in the lower left corner to reveal a blank script, ready for you to indicate what that item is to accomplish when selected. Clicking on the Auto Script button puts a Switch statement in the selected script, showing you what will be there when you choose to Edit that Script as I’ve shown below. This is VERY good!
Well, folks, I’m going to have to call it a day. I’ve got some other business that is calling. I genuinely believe that you will enjoy your Revolution experience, though it will present some daunting challenges, almost hourly, but remember there is a wonderful mailing list for you to engage whenever you just don’t find an answer to your current dilemma; so use it. email@example.com Remember to explore. You won’t break anything and you can always take a new direction. Remember to make copies of what you are doing, particularly if you decide to go off on a tangent and think that you may want to trash your current approach and start all over again.
Please do not hesitate to stick your 2 cents worth into the mix and let me know what you think about what I’m doing. This is really much more difficult than I had thought. I don’t mean using Revolution. I mean figuring out what to write so that it makes some sense and is somewhat useful to those who take the time to read my dribblings. Revolution is not as easy as HyperCard, but it does a lot more. Way more!
Subscribe to our email newsletter
Sign up and get Macinstruct's tutorials delivered to your inbox. No spam, promise!