#!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP #!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP

3D
3D Photo Gallery (Part 1)
3D Photo Gallery (Part 2)

Audio
Poor Man's MIDI
Make A Metronome
iPod Tricks (Part 1)
iPod Tricks (Part 2)
iPod Tricks (Part 3)
Laugh Track Machine
Audio Player with Reverb
Shepard Melody
RB Phone Home
Build a Drum Machine

Custom Controls and Windows
Double Click Listbox
Draggable Metal Window
Double Click Canvas
Custom Buttons
Custom Buttons Part II
iTunes-style Listboxes
Custom Controls


General RB
Scrolling Windows
Using Mesage Dialogs
Case-Sensitive Word Finder
Introduction to Stacks
Wiggle Window
JPEG in PDF
Listbox Checkboxes
Background Applications
Listbox Auto-Find
Virtual Volumes
Time Tracker
Software Distribution (Part 1)
Software Distribution (Part 2)
Software Distribution (Part 3)
Software Distribution (Part 4)
Exceptions
Tips and Tricks
Text Clippings Made Easy

Graphics
Drawing a Simple Gradient
The SpriteSurface: Space Game
Image Spinner
Cropping Graphics (Part 1)
Cropping Graphics (Part 2)
Cropping Graphics (Part 3)
Cropping Graphics (Part 4)
Shimmer Graphics
Lissajous Figures
Simple Screen Capture
Vector Graphics
Kaleidoscope Images
Stegonography
Spirals!
Image Table
RB Magnifying Lens
Screen Capture
Color Picker Tutorial

Hacks
Ghost Grab
Speedy Mouse Extension
iTunes Plugins
iTunes Skinner

Mac OS X
Global Hot Key Event (Carbon Events)
Login Welcomer (Carbon Events)
Add/Remove Buttons
Resizable Sheets
Mac OS X Preferences Window
Using Sheets in REALbasic
Build a Bundle (Part 1)
Build a Bundle (Part 2)
Dock Your Passwords
Mac OS X Debugging
REALbasic Mac OS X Icon Tutorial
Animate Your Dock
RB and the Command Line

Menus
Window Menu
Templates Menu
Listbox Menu

Novelty
Guessing Game
Calendar Trivia
Tile Mixer
Zip Code Finder
Happy Valentine's Day
Merlin Simulator (Part 1)
Merlin Simulator (Part 2)
Merlin Simulator (Part 3)
Buzzword Machine
AppleSoft BASIC

Printing
Print to PDF

Registration
Registration Code Validation
Network Registration Codes

Resources
Picture Extractor (Part 1)
Picture Extractor (Part 2)

Serial
Caller ID (Part 1)
Caller ID (Part 2)
Caller ID (Part 3)

Speech
Speech Recognition

Socket Communication
Easy Peer-to-Peer File Sharing
MacPAD Version Checking
Display Web Image In Canvas
HTML IMG Tags
Version Tracking
Even Smarter Instant Messaging
Web Tiler
JavaScript and REALbasic
Stock Ticker (Part I)
Stock Ticker (Part 2)
AIM Mate

XML Manipulation
Simple XML Introduction

Video
Big Brother Video Capture

Note: All articles without a byline were written by Erick Tejkowski. When cleaning the site I removed them because the code differed from page to page, and I have yet to put them back in.

resexc2.gif (20k)




REALbasic for Dummies
by Erick Tejkowski

$19.99 @ Amazon





Files are in Stuffit 6.5 or earlier, or ZIP format.
Download Stuffit Expander

Tell us about a bad link.

11-22-03
Listbox Menu by Seth Willits



In this tutorial, we're going to create a listbox which displays a contextual menu when an item is control or right-clicked on since this behavior is often used in applications and if you're not using it, you probably could be! If you've never used a contextual menu before, you'll be amazed how simple it is to implement them.

Begin by creating a new project with a listbox in the window and a contextual menu. The listbox should contain some default items like the example below does.

Contextual menus are used through 3 simple steps. The first, is when a mouse click occurs, check if the click was a contextual menu click (CMM click) using the global IsCMMClick() function. If IsCMMClick() returns true then either the click was a control-click or a right mouse button click and you'll need to display the menu by calling the contextual menu's Open() method. The Open() method synchronously displays the menu waiting for the user's choice until the next line of code executes.

The last step is handling the user's choice which is done via the Action event which is fired when the user actually clicks on an item in the menu. If the user clicks outside of the bounds of the menu and in consequence does not select any menu item, then the Action event is not fired. The item As String paramter to the event is the text of the menu item's title which was chosen. Using a Select statement as below is usually the easiest way to handle the selection.


Sub Action(item As String)
   Select case item
   case "MsgBox"
      MsgBox ListBox1.Cell(Listbox1.ListIndex, 0)
   case "Title"
      self.Title = ListBox1.Cell(Listbox1.ListIndex, 0)
   case "Remove"
      ListBox1.RemoveRow Listbox1.ListIndex
   end Select
End Sub

The code above will determine which menu item was chosen (MsgBox, Title, or Remove) and then take the appropriate action. Menu items are created just like popup menus:


Sub Open()
   me.AddRow "MsgBox"
   me.AddRow "Title"
   me.AddSeparator
   me.AddRow "Remove"
End Sub

To handle the click, we'll use the CellClick event of the listbox since it's the only event which lets know when a row is clicked on. We use the IsCMMClick() method as I said but notice that I also set the ListIndex of the list. The reason for this is that REALbasic doesn't update the ListIndex and redraw the row to show it is selected until after this event and all others (like the Change event) have been fired. To work around this, we force the change and an update.


Function CellClick(row as Integer, column as Integer,
                   x as Integer, y as Integer) As Boolean
   if IsCMMClick then
      me.ListIndex = row
      me.Refresh
      ContextualMenu1.Open
   end if
End Function

That's it. Pretty simple eh?






11-19-03
REALbasic News by



Well, another extraordinary amount of news has piled up and with our little server relocation and all that it's starting to take on a slight shade of green. Well, before it gets too moldy, check out the news below, there's some pretty interesting stuff!


Made With REALbasic:

Advanced Status System
Call it ASS if you like (the developer does!), but this class is worth looking at. In short, it provides you with a status field as advanced as a browser's including prioritization. Check it out.

ElfData 2.0b4... free?
Well, "free." Theo sparked a bit of a flame (which quickly died) by calling it "free," but in a way it is; as free as nagware gets. Hehe... Anyway, a couple of little changes. Remember 2.0 is a major rewrite of this complex yet easy to use plugin.

HTMLField 2.11
No programmer should be without it! HTMLField is an EditField which "renders" html (parses it and makes styled text). Quite useful. Download it here.

P2Date 2.0
A major rewrite adding Windows support for UTC, extensions to use TotalSeconds more, Julian date enhancements and more. Get yourself a P2Date here.

Days Away v1.2
Version 1.2 of this reminder program offers limited iCal integration, displays multiple events at a time, longer delays, and more. Version 1.0 made a brief appearance on PerversionTracker apparently because of an uncaught bug, but has since never perverted again. Whew! Days Away is becoming a more useful program with every version, and the ridcule of it is a humorous read.

SmartSplitter 1.2, SmartColorWell 1.0
Intelligently split windows, I, uh, mean atoms, with this easy-to-use class! The accompanying documentation, "Learn to be Einstein in 24 Hours" is an amazingly useful insight into the the theories and practicaly implementations. A must have for hobbyists! The first incarnation SmartColorWell has been released for RB 4 and later and allows the end user to click on a button and select a color! Version 1.2 is purported to be even Smarter and know the the color the user wants eleminating the color choosing altogether!

SortLibrary 2.1
Charles Yeomans is undoubtedly the sorting guru of the REALbasic world and he's updated the sorting solution for RB, SortLibrary. If you want fast sorting, look no farther then these few pixels on your monitor.

SQLitePlugin 1.3, SQLitePluginPro
Someone should buy these guys a pizza! SQLabs released an update (and then soon after another update) to the SQLitePlugin mainly adding support for older versions of REALbasic (all the way back to 2.1.2!) and fixed a bug regarding temporary files. They've also offered the option to go pro with SQLitePluginPro which is the "drop-in replacement for REALbasic's built-in database engine." Pro is currently in beta and costs $89 and up. SQLitePlugin is free.

StringBuffer
"
StringBuffer is a class that implements mutable strings." (What, could you not shut them up before? No pause or mute button?) Fast appends, insertion, and removal, some find and replace capabilities, cross platform, open-source, free, from the jack of many trades, Charles Yeomans.

The Athenaeum
Thom McGrath has been one busy hacker lately! First we get automated-news (grrr....) and now we've got a giant resource pool for code (not downloads, but actual code) and tutorials and more stuff that you can write an if statement for! Wow. And if you were wondering what in the world "athenaeum" means (like me), Thom graciously provides us with this definition: it's an institution for the promotion of learning. Sounds... academic. <shudder> :^) Check it out!!! This will be a big resource in the future.

Wastfield Plugin 2.1
Todd Fantz has apparently adopted Doug Holton's Wastefield plugin, updated it a whole bunch, stuck it up on the toomuchspace.com website for now, and is charging $45 for it. It offers some pretty dang cool features, so it's worth checking out if you need the most from an editfield.




































Download REALbasic and create your own software!

#!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP #!/usr/bin/perl -w # # Copyright 2000 by Michael Coyle # Released under GPL. # # Call it with: # [an error occurred while processing this directive] # # Get the file name from the browser... $file_name = $ENV{'QUERY_STRING'}; # Open the file... open (EP, $file_name); # Print to the browser... print "Content-Type: text/html \n\n"; # Load the file and keep spitting it out to the browser... while () { chomp; print "$_ "; } # Close the file and go home... close EP