Converting HyperCard Stacks to Standalone Apps Using Revolution

  Joe Wilkins       February 14, 2007      Tutorials Mac Developer


First of all, I want to say that my recent voyages into the land of Revolution have started taking their toll on me. Something that I, simplistically, had thought I was “up to” as a challenge in teaching has started to become far more. I’m not giving up; I just need to set the record straight: I’m a beginner, just like many of you who are reading my offerings, and my tenet “the best way to learn is by teaching” still remains in place. I just want everyone to know that I’m no expert on Revolution. I’m stumbling through exactly as I initially said I would be. For one thing, I am mining the RevList for all sorts of assistance, and the individuals on that mailing list are performing like the true miracle workers most of them are. The new application upon which I intend starting work in future articles will encompass a number of my discoveries. For now, let’s continue to finalize the Font Stack as a Stand-alone application as promised last week.

At the same time, one of my responders wanted some clarification about the various versions of Revolution that are being made available. It seems that the differences between Media, Studio and Enterprise editions are not as clearly explained as they, perhaps, should be. As I mentioned in my very first Revolution offering, we have been provided with three distinct paths of involvement:

Loath as I am to reinvent the wheel (or much of anything else for that matter), the following has been culled from the Run Revolution website, which we should all revisit from time to time, since its content does change and there are occasionally special offerings that may save you money and/or heartaches:

To some extent the differences are probably not noticeable to most, except that the Media Edition is a lot cheaper than either of the other two Editions. For most who plan to explore Revolution before plunking down the considerable kopeks required for either the Studio or Enterprise Editions, Media is the way to go. I understand the reader’s inability to discern the difference between Media and Studio. Much appears to be implied. Obviously, Studio contains more of something, though from reading what is presented I’m not sure what that something is. It is stated that the Studio Edition can create applications that run natively on five different operating systems, but it doesn’t appear to say anything about what can’t be done with Media. I feel this needs to be clarified. I suspect the difference between the two is much less than it would appear. I know I’ll get some feedback from those who know about this, and I’ll pass it on next week. I’m sure the author of their content was just too close to the subject matter to see that everything is as clear as mud!

Hopefully, I didn’t lose you with the previous side trip. Time to get down to business. Last week, I converted an HyperCard stack into a Revolution stack, and it was easy, but there were a few anomalies. Namely, I had some uncertainties as to exactly what the conversion had done with some of the components in the stack. So we’re going to check out these items, and we’re going to use a most powerful feature of both HC and Rev: the Message Box.

The Message Box (also msg box, or just plain msg) is a vital part of both environments. In Rev, you access it from the Rev Tool Bar or from the Tools Menu. I’ve not completely resolved a certain issue, whether to hold down the shift key along with the command key when trying to access its related menu item.

One of the things I discovered when I was creating HC stacks was that, unlike most other Mac applications, I was able to use both upper and lower case command key combinations in my menus. Other applications eventually started using the Option and Shift and Shift/Option alternatives as well, but with HC I could just build upper or lower case letters into the menus where the Command Key options were shown and that added functionality was automatically provided by HC. From time to time, it appears that is the case with Rev menu Command keys as well, but not consistently based on my brief experience. Either that, or there are some unimplemented items in Rev. I’ll run across and discuss this consideration in the new Rev stack I’ll start creating next week.

Getting back on topic. In both my HC stack and the converted to Rev stack, I showed the msg box with Command/m and typed into them “put the number of backgrounds” (I could also have used bgs). This was going to tell me if there really was a difference between the two. As I had suspected, there was. The Rev version had added a bg to the stack. Now 4 instead of 3. Then “put the number of cards” (or cds). Both the same at 97. Then “put the number of bg buttons”. Both 5. Interesting, since they are not visible on the first card of the HC stack. When I used “put the short name of this bg”; I got bkgnd (also acceptable) id 3194 with HC; and Group id 3194 for the Rev stack. Incidentally, while messing around going back and forth between the Rev stack and AppleWorks, the application I’m using to compose this little tirade, buttons and text in the Rev stack suddenly disappeared; so, figuring they would all come back if I just closed Rev without saving and reopened, I did that and they did. Hmn! Maybe I’ll figure out what’s happening here someday.

The Revolution programming environment for Mac

Continuing with my exploration, I then entered “PUT THE SHORT NAME OF THE NEXT BG” into the msg. In both cases the results were the same as before; just a different id number than with the first one. The short name of the 3rd bg is “Indices” on both stacks; guess I took the time to give it a real name and it was carried over to the Rev stack. Now the mystery deepens. With the Rev stack the first and last bgs have the same short name; but if I enter “put the name of the fourth bg” I get “group HC Icons”; so the fourth and last are not the same with the Rev stack. How can that be, since there are four bgs and the fourth would be the last? Of course, with the HC stack there is no 4th bg and so the first and last have different short names. I’ve just discovered something interesting. It appears that Rev creates a totally “new” and, apparently, “hidden” bg into which the HC Icons for the stack are stored. I have a strange feeling that a lot of people know this and I’ve just found it out the hard way.

Aha! This is the case of multiple bgs that were mentioned by one of the readers last week. In order for all of the cards to share these icons, this bg “Group” must be shared by all of the cards. Not sure exactly how this is either accomplished or implemented, but we’ll find out soon. I plan to spend some more time with the msg box in another article, but you can see that it is invaluable for diagnostic purposes, and we’ve only touched the surface of what can be done with it. As a teaser, here is a screen shot of msg box in multiline mode. Fantastic!

Below, in the multiline msg, I did all of the above at one time.

The Revolution programming environment for Mac

Isn’t that neat? And, as you can see by the “grow” button in the lower right corner, it is growable; and the size of the panes can be adjusted by dragging the bar that runs through the middle of the box.

Now, down to cases. We’re going to create a Standalone application from the “Font Stack”. First, with my belt and suspenders’ philosophy, save a copy of the stack you’re going to use. I’d suggest you do it on a separate drive or disk to relieve you of the likelihood of future complications. I now have a bone to pick with the Rev programmers, who in their infinite wisdom decided to use Save As… instead of the HC way of doing things with a “Save a Copy…”, which is much more useful in a case like this. Immediately, I encounter one more shortcoming: If you command/click on the Stack’s Title bar, you do not see the path popup that appears in most other OSX applications. I use this a lot to find out where I’ve put things. They are not always where I thought I put them, or saved them. This is a serious omission by the Rev Team. Well, kind of!

OK, now I’ve saved a copy on another hard drive by finding the file with Spotlight, control/clicking on the found item to reveal it’s location in the Finder, and then dragged it over to the other hard drive. Not nearly as easy as making a Save a Copy… menu selection.

Clicking File>Standalone Application Settings displays the following dialog which is in the General mode:

The Revolution programming environment for Mac

Then click on the OS X Icon in the tool bar of this dialog to get the following. (Were the stack more complex there would be some other items to address before doing this, but not in this case. The Font Stack is really simple. It doesn’t even have its own menus.)

About the only thing we’re going to do now, since I haven’t had time to come up with a unique icon for this “application” and it will have no documents associated with it, is to select the Answer and Ask Dialog icons that we want used. Everything else is already completed for our inspection; just bookkeeping for the most part.

Again, with a more complex stack we’d need to check out the Stacks and Copy Files modes and make sure we’ve provided all the required information for them. We might also want to make provisions for Bug Reports. See the Dialog next for that.

The Revolution programming environment for Mac

The Revolution programming environment for Mac

There is no problem coming back to alter any of these Settings, since they are just that. So ease up! Now for the serious part of this whole thing: click File>Save As Standalone Application… Apparently it’s going to close the Stack before it does anything since we’re presented with this dialog:

The Revolution programming environment for Mac

If we have already saved the stack before doing this, as I would strongly suggest, then the next thing that happens is you’re asked for a place to put the new application, though it doesn’t say so; consequently you have to guess that is what is going on. It wants to put the new application in your Documents folder, which is OK with me, so I click Save and wait, a very, very short time in this case, while the wristwatch icon tells me that there is a short delay. Then we get this:

The Revolution programming environment for Mac

Outstanding! I haven’t checked it out yet, and the original stack is reopened after we OK this dialog. So lets check out the new application. This is what I see in the Finder:

The Revolution programming environment for Mac

Looks encouraging. It appears that I have both a Mac OS X version and a Windows version. Since I didn’t provide an icon, it used a generic one which is not all that bad, considering it was for free.

The Revolution programming environment for Mac

I’m impressed! My observations are that somehow I should have been able, and just didn’t know how or think, to disable the Zoom feature on the window, since it is inappropriate to this stack. Also, I should have implemented something for the “About” feature, which now does nothing when you choose that from the Apple Menu. I also should have changed the name, eliminating the word Stack, since it no longer is one.

As you can see from the following series of screen shots - both Mac OS X and Windows XP, those infamous icons never made it over to the Standalones. Fortunately, I had implemented the arrow keys for navigation purposes and they work just fine on both platforms. I’ve included some screen shots that you’ve never seen before of some of the other fonts in Joe’s Picture Fonts® from the Windows version. Incidentally, the Windows version was run on one of my older Macs using Virtual PC 6.

Of course, I want to reiterate: this was a VERY, VERY simple stack; but there are a lot of them out there just begging to be converted so the Windows world can see what we’ve been up to for the past decade and a half. Now, can the Media Edition create Standalones like this? I don’t know, but I’m sure someone will be letting me know, and I’ll let you know when I know.

The Revolution programming environment for Mac

The Revolution programming environment for Mac

Almost exactly the same as the Mac version - also without the ugly buttons; but notice that the Mac background is whiter than that for the Windows shots which are very lightly tinged in gray.

The Revolution programming environment for Mac

One of my more useful Fonts. Unfortunately, they are all done as bit-mapped fonts.

The Revolution programming environment for Mac

I made a number of variations on the “plain” font theme.

Well, that’s all for this week. We’re going to start with a brand new Rev stack next week. This is an application that I had completed using Future Basic for the Mac, and so it should move along rather quickly. Lots of color and graphics. It’s a children’s coloring book about the City of San Diego. Eventually we plan to do coloring books about all of the major tourist cities of the world. I needed to create a Windows version and didn’t like the prospects of tuning up my Visual Basic software, so I had been procrastinating for quite some time. No longer!

If you have friends, partners or associates who’ve been chomping at the bit to do the same kind of thing, give them a holler. Tell them we’re having a Revolution. Every Wednesday. If you miss out on Wednesday, you can always check the articles out later by clicking on the Column button at the top of every Macinstruct page.

Subscribe to our email newsletter

Sign up and get Macinstruct's tutorials delivered to your inbox. No spam, promise!


About    Privacy Policy    Terms and Conditions

© 2023. A Matt Cone project. CC BY-NC-SA 4.0. Made with 🌶️ in New Mexico.