First off, let me mention that CanDo 2.0 and the standard edition of VB 2.0 have the same list price ($199 as of this writing). There is a professional edition of VB available for a higher price ($495 list). Also, there is a version of VB available for the DOS environment which I do not own. Therefore, all of my comments about VB apply specifically to the Windows version.
CanDo is called an interactive software authoring tool while VB is called a visual programming system. For all practical purposes, they are the same except that CanDo has its own unique programming language while VB uses a modern structured version of the Basic programming language that we all love and revere (?!?). Therefore, if you are familiar with Basic programming, you would probably be able to come up to speed with VB faster than with CanDo. However, as we shall soon see, there is much more to interactive visual software authoring and programming language tools than keywords and variables. In both CanDo and VB, the user interface is designed visually. No coding by the programmer is needed. This is the great appeal of visual programming: you only have to code the application specific parts, not the generic interface parts common to most programs.
CanDo starts up with a blank card. What is the difference between a blank form in VB and a blank card in CanDo? Well, to make a short story even shorter: nothing. Both are windows that you can use to build an interface for your application. On a separate screen overlaying the bottom of the blank card, the menu bar, toolbar, and toolbox are displayed in a combined way. This is called the Main Control Panel (Figure 2). Everything you need to navigate the CanDo environment is on this panel.
VB supports a Windows feature called Multiple Document Interface (MDI). An MDI form acts as a container for child forms. This allows your application to handle several projects at once and share code in the process. This can be simulated with CanDo, but it is not as easy.
To an Amigan, the method used to display the control panel (one screen over another) is not unusual. However, it points up one of the great advantages that the Amiga has over Windows: multiple resolution screens on the display simultaneously. VB offers no such interface because Windows offers no such interface. Within the Windows environment, you must select a graphics resolution supported by your graphics display card. Once set, all programs run in this resolution. Also, all programs run on one screen. Even though program windows can be made full screen or minimized to an icon, the display can sometimes become quite cumbersome. In contrast, the Amiga can have multiple screens each containing multiple windows. This helps the display stay more organized. The problem with not having multiple resolution screens available to the programmer is that you have to design your interface for the lowest common denominator which is currently VGA (640x480, 16 colors). If you design your interface in SuperVGA (800x600 or 1024x768, 256 or more colors), it may not look right on a computer that only has VGA. Also, you may want your application to have multiple screens at different resolutions. This is easy on the Amiga, but hard or impossible on the PC.
VB includes a combo box control which is absent in CanDo. This control is essentially a text entry box and a list box combined together. Therefore, it can be simulated in CanDo but it takes a bit more work. Also, VB includes some controls that allow you to design a custom file requester. This is more difficult with CanDo; however, CanDo does have a pre-built file requester that can be included in your application. A pre-built file and font requester is available in VB Professional as a custom control.
One particularly nice feature of VB not found in CanDo is the frame control. This control acts as a container for other controls. You can group several controls together in a frame and when the frame is moved, all the enclosed controls go with it. This makes it easy to lay out functional areas of your application interface and then reorganize it later. The appearance of a frame can be simulated in CanDo but the functionality is not there.
VB has a grid control for spreadsheet-like input that is missing from CanDo. Also, your VB application can be an OLE (object-linking and embedding) client and can also exchange data with other applications using DDE (dynamic data exchange). There is no equivalent to OLE on the Amiga that I am aware of. Hotlinks and ARexx are the closest things to DDE on the Amiga. CanDo supports ARexx but not Hotlinks.
CanDo gives you more control over the appearance of objects than does VB. You can easily give your interface a 3-D appearance. VB Professional comes with some 3-D custom controls but they require you to use a set gray color background for them to look right. With CanDo you can create 3-D objects on any color background.
When it comes to drawing shapes such as lines, circles, rectangles, etc. on the screen, VB wins out. You can draw shapes easily and modify their sizes quickly. CanDo will let you draw on the screen, but it writes code for you instead of directly incorporating the shape into the window. When you want to modify the shape, you have to either edit the code or redraw the shape, forcing CanDo to write new code. The old code must then be erased.
VB is much better at handling the resizing and moving of controls than CanDo. In VB, you move a control by clicking on the control and dragging the mouse. Also, when the control is clicked on, an outline box with resizing handles is drawn around the control. By clicking on the resizing handles and dragging the mouse, the control can be resized in any direction quickly and easily. In CanDo, you must click on the object to bring up the object's edit requester. A few more clicks will get the object moved or resized. This is not very efficient.
VB Professional comes with some tools and documentation that help you to create your own custom controls using a C/C++ compiler. Additional controls (objects) can be added to CanDo through the XTras button; however, there is no information with the software about how to do this. The ability to add your own custom controls may not be of interest to the casual programmer, but it is still important. There are tons of custom control packages for VB available from third party companies. I know of no such packages available for CanDo.
In VB, controls have properties, methods, and events. A property is some attribute of the control such as width, font, name, etc. Some properties can be set at design and run time. Others can only be set at one or the other. For instance, if you wanted to set the width of a button control with a name of cmdOK to 300 at run time, the following statement can be used:
cmdOK.Width = 300
The current width could be obtained as follows:
CurrentWidth = cmdOK.Width
All properties would be set or read in a similar way:
Set:ControlName.AnyValidProperty = AppropriateValue Read:CurrentProperty = ControlName.AnyValidProperty
A method provides a functional operation on an object. Anyone familiar with C++ will have no problem with this concept. Suppose I have a list box with a name of lstNames and I want to add another item, in this case a name, to the list. I would invoke the AddItem method of the list box as follows:
lstNames.AddItem "Angus Macgyver"
All methods would be invoked in a similar way:
ControlName.AnyValidMethod AppropriateValue
When you double-click on a control in your VB application interface while in design mode, a code window appears. A drop-down list shows all of the events available to the chosen control. When you select an event in the list, VB creates a subroutine shell as follows:
Sub ControlName_ChosenEvent( ) End Sub
It is up to the programmer to fill in the subroutine to make the program functional.
CanDo takes a different approach. Objects have properties just as VB controls do; however, they are not obtained or set in the same manner. To obtain a property, you sometimes use a command and other times a system variable. For instance, if you want to obtain the current window's size limits, you would use a command as follows:
GetWindowLimits MinXSize, MinYSize, MaxXSize, MaxYSize
However, if you want to obtain the current window's title, you would use a system variable:
CurrentTitle = WindowTitle
Notice that in both of these examples, no reference is made to which window you want the information for. The information can only be obtained for the current window. If you want the information for another window, you must make it the current window. To make things more confusing, the window title is set with a command rather than assigning a value to the system variable WindowTitle:
SetWindowTitle "I Don't Like Titles"
In a similar fashion, if you want to perform an operation on an object, a command is used rather than a method. To disable an object with a name of MyObject, the following statement is used:
DisableObject MyObject
When you click on an object in design mode to bring up its edit requester, there will be a series of command buttons, one for each of the events that can be handled by the object. When you click on one of these event names, an editor appears with a blank page. You can fill in any code you want to execute when the event occurs. This is very similar to VB except for two things: (1) CanDo has less events available to its objects and (2) CanDo does not create a subroutine shell. The latter difference makes it slightly more difficult to call one event routine from another event routine.
As you can see, there are quite a few differences in the way VB and CanDo handle objects. I prefer the method used by VB; however, I am sure others will prefer the method of CanDo.
CanDo has features that makes it far superior to VB when it comes to handling variables. These features are the dynamic sparse arrays and user defined record variables. Arrays are dynamic because they are created as needed and sparse because they are not dimensioned and do not necessarily have consecutive indices. Record variables let you create highly complex user defined variables without ever having to predefine the structure of the variable. This works somewhat like stems do in ARexx. Thus, you can have a variable that looks like the following:
MyData.Account[6].Name
without ever defining the inherent structure of the variable. Also, if Account[1] through Account[5] have not been referenced yet, no space will be taken up for them. This is due to arrays being sparse. These user defined variables are exploited in a very interesting way to allow for easy data entry to your application. Also, highly complex user variables can be saved to and retrieved from disk with one command. I will not discuss these features anymore at this time because I will be covering them in great detail in the second part of this article.
When it comes to stringing pictures together to make an animation, CanDo is the clear winner. VB allows you to sequence several picture files together to create an animation, but the availability of the ANIM file format on the Amiga allows CanDo to excel in this area. (Note: CanDo actually uses BrushAnims rather than Anims. A conversion utility is included in the package.) Commands are available for loading, moving, and removing BrushAnims. Also, individual scripts can be executed as each frame is displayed. This is a very powerful feature for synchronizing events.
VB Professional comes with a help compiler. This allows you to create some rather complex context sensitive help for your own application. However, creating the files that the help compiler needs is not for the light-hearted. You must use a word processor that can write files in the Rich Text Format (RTF). Some rather complex codes are needed. The task is easier if you own Microsoft Word for Windows and custom templates. Even so, the planning and organization that is required for good context sensitive help can be overwhelming to the casual programmer.
CanDo offers no integral way of creating a help system for your application; however, you can design your own. You will have to determine what your file format will look like and how you will access it and display it on the screen. If anyone has developed a way of easily doing this, I would like to hear from you.
VB does not allow you to create a stand-alone executable file. The freely distributable dynamic link library VBRUN200.DLL is always needed. I have heard some professional programmers say that this destroys the effectiveness of the language because, since the DLL file has to be distributed with your program, your users will know the program was created in Visual Basic. Given the stigma Basic has of not being a professional level language, this can be a problem.
CanDo is geared towards just about any kind of application. It excels at database development because of the flexible user variables. The sound and animation capabilities help it excel at multimedia applications and games that don't need the speed of assembly language. However, to ever be used for the development of higher end productivity applications, it needs to have a way for third party companies to add custom objects and a standard way to add context sensitive help.
There you have it. As I continue to program with VB and CanDo, I will be anxiously awaiting both Visual Basic 3.0 with CanDo extensions and CanDo 3.0 with Visual Basic extensions. Well, I can hope, can't I?
(Note: Just before submitting this article for publication, I received notice that VB 3.0 was about to be released. As I feared, it does not have any of the CanDo features I wanted. However, it now has a powerful database engine from the Microsoft Access product, hierarchical lists, and more. Alright, Inovatronics, it's your turn. Let's see a powerful new CanDo 3.0 that'll blow our socks off.)