Classes & Modules
The following selection was made entirely
by myself. Some items were based on the works of others, but most or
my own idea. You may use any of them in your own project(s), perhaps
with a little credit to me in the about box or similar. :)
Also appended to this is a section
containing example projects I've made, which you can look at to learn
how to do something in particular.
Note that I haven't updated this site in
ages (other than adding this little note), and most of the
classes/modules/projects are ancient. They all come with a life-time
guarantee of support, though, so feel free to contact me about them
if you want.
I have a lot more items than this now
(100's of custom classes and modules in just about every area
imaginable - none of which I can really be bothered documenting here.
Check the RealBasic Café (hotline://cafe.realbasic.com/) for
all my publicly available items as well as hundreds by others
too.
Classes:
BetterProgressCircle
- a canvas class that acts like a progress bar, with value and
maximum properties. But it draws the progress in the form a pie graph
type thing, rather than some boring old bar. This version, version
1.2, has few of the bugs found in the original, and inludes various
new features and speed increases.
CustomProgress
- a canvas class that acts like a progress bar with a difference - it
allows you to build your own progress bars, using pictures you give
it. The example project includes 4 bars, and instructions for making
your own. Very arty, and surprisingly effective. Definitely worth a
peek.
HeadingField
- an EditField class, this simply adds a new method, AddItem, which
has two parameters, the heading and the text. It then puts the
heading and text into itself, with linebreaks between previous
entries, and makes the heading bold. When I made it this was quite an
accomplishment. Sad, isn't it. :)
MultiTracker
- a socket class, this is an extension of Hotline tracker, another
socket class. But the difference is, this one allows you to give it
the address of multiple servers, and it'll go through them all, one
by one, getting a server list from each.
Pyramid
Progress - This is a very simple
canvas class that draws a pyramid and fills it up, as a kind of
abstract progress bar. There's also a second class included which
draws an upside-down pyramid, just for the fun of it.
Modules:
Binary
stuff - this module simply converts
text you give it to binary, and vice versa. It's reasonably quick,
and has no bugs, although you're better off using the new
MultiFunction plugin available at the Café, which has this
ability, but a lot lot faster.
BookmarkPrefs
- this modules is designed specifically for managing bookmarks and
saving them to prefs. Useful in any internet program, it's quick and
easy to use. It's not really object orientated, and I have since
created several modules, but useful for those just starting
out.
FileCode
- a simple module that encodes a file, and then decodes it. When it
encodes, it removes the resource fork and stores it instead in the
data fork, which means you can send the encoded file over the
internet or via PC's, and decode it at the other end and you'll get
the entire file, including resource fork.
OT
ErrorDecode - a simple module which
returns a string error message for the error number you give to it. A
must have for all socket programs.
PassHandlers
- a simple handler which does 3 things. The first two are to return
bullets and stars for the string passed to them, for use when
displaying hidden passes, and the third item encrypts and decrypts
the password in one of 3 very quick methods. Similar things can be
achieved with the MultiFunction plugin.
PrefHandler
- a simple module that allows you to get and save items to a prefs
file. Not too difficult to create yourself, but useful to look at it
if you don't know how or have hit a problem.
SizeClean
- a single function which returns a string nicely formatted to
display the size in bytes you pass to it. E.g. 1025837 becomes "1.11
Mb", thereabouts. Tried and proven in many of my programs.
Examples:
Backdrop
Window - shows you how to tile a
picture onto the background of a window, to make your projects more
interesting and visually pleasing. Not terribly fast, but better than
any other RB-coded alternatives I've found.
Background
music - shows you how to use a
NotePlayer object and a timer to create atmospheric, calming or just
plain interesting background music, with a random beat and
fluctuation.
Krypter
- an old project of mine, shows you how to do simple
encryption/decryption. Although it has been far surpassed by other
RealBasic encryption programs available, and now that damn
MultiFunction plugin (I'm really losing ground here, aren't I?
:)
QuickTime
Music - shows you how to play audio
files in the background. Using QuickTime 3, it works on midi, mod,
sound, aiff and similar files. With QuickTime 4 it also works on
mpeg's, mp2's, mp3's and many more sound formats.
SelectVolume
- shows you an example of a very simple dialog box which lets the
user select a volume. Perhaps has uses in niche areas, but not very
stimulating visually, so you'll have to improve on it to use in a
proper program.
TipsWindow
- contains a complete tips window you can use in your own projects.
Includes the ability to use styled text in the tips, and has no limit
as to length and number of tips. Loads from a text file the tips. A
newer version of this loads from the resource fork, and is far far
faster, but is available only through the RealBasic Café
(sorry).