Author Archives: trevordevore

New Dates For Professional Application Development Course and Free Session Sponsored By RunRev

New Course Dates

Now that everyone at Blue Mango Learning Systems is back home and settled in after attending the RunRevLive conference in Edinburgh we are ready for another round of Professional Application Development with Revolution. This is our course that teaches you about application development techniques in Revolution. We start with how to organize your development environment and go through releasing installers and updaters. The course uses the open-source GLX Application Framework as a foundation to illustrate various principles.

The dates for the next course are September 29th and October 1st. There are two one-hour sessions each day.

Free Session

We are also excited to announce that RunRev is sponsoring the first session of the 4-session course this time. This means you can attend Session I: Organizing For Success for free. In this session you learn how to set up your development environment so that you harness all of the benefits that Revolution offers when developing cross-platform applications. The focus will be on:

  • Organizing your application development environment
  • Understanding key concepts of the GLX Application Framework
  • Maintaining a single code base when releasing to multiple target groups and platforms
  • Organizing code, objects and internal media

Sponsored By RunRev

SQL Yoga Discount

Those who purchase a course pass will also be eligible for 50% off the $199 price of SQL Yoga, the new database library from Blue Mango Learning Systems.

Links

Learn more about the Professional Application Development With Revolution course and get pricing and registration information. Or, if you already know you want to attend the entire course, you can purchase a pass to the entire course now.

Share

SQL Yoga: A Flexible Database Library for Revolution

August 20, 2009 Update: A recording of the content covered in the webinar is now available.

Revolution is a powerful development tool because with it you can easily incorporate text, buttons, images, graphics and more into an application that runs cross-platform. You don’t need to understand the PNG image format or how Windows and Mac draw text on the screen. You just use Revolution’s english-like syntax to manipulate the objects in an easy to understand way.

Wouldn’t it be great if working with databases in your application were just as easy? With SQL Yoga it will be.

Join us, Blue Mango Learning Systems, for a webinar this Wednesday where we will show you the database library that will completely change how you work with databases in Revolution. Also learn how you can get involved in the public beta leading up to release at the end of September.

Register for the free webinar: https://www2.gotomeeting.com/register/490813635

Note: The webinar will be recorded and made available for viewing for those who cannot make it.

Share

Displaying Placeholder Text In a Field

Have you ever wanted to display the grey text that describes what a text field does?

Placeholder Text Example

Google search field in Safari

Placeholder text can be very useful as it provides a visual queue to the user about what the field does while not requiring any extra space in your UI.

Using custom properties and behaviors (new in Revolution 3.5) you can easily add this feature to fields in your applications. See the lesson How To Create Field Placeholder Text Using Behaviors.

Share

Libraries & Error Reporting

Lately I’ve been working with a lot of web services in ScreenSteps. ScreenSteps integrates with services like WordPress, TypePad, Confluence, MindTouch and ScreenSteps Live. When I sat down to write libraries for each of these integrations I wrestled with how I wanted to handle error reporting. Each handler that retrieved data from a web service would return data that I needed to process. At the same time, I also needed to know if something went wrong while communicating with the web service.

I considered 4 possible approaches.

1) Handlers That Return Valid Data or Errors

If you have ever used one of the Revolution externals such as revDB or revXML then you are familiar with this technique. The handlers in these externals can return valid data or a string that starts with revdberr, or revxmlerr,. This is what a WordPress library handler might look like using this method:

put wp_getCategories(pParamsA) into theData
if theData begins with "wperr," then
   // item 2 to -1 of theData contains an error
else
   // theData contains valid data
end if

2) Function That Returns Last Error Generated By Library

When working with libraries another option is to have the library log any errors internally and then have a function that returns the last error generated by the library. This is what a WordPress library handler might look like using this method:

put wp_getCategories(pParamsA) into theData
put wp_lastError() into theError
if theError is not empty then
   // Something bad happened
else
   // Do something with theData
end if

3) Throw Errors
Another option is to throw any errors that occur within one of the library handlers. This requires wrapping any calls to the library handlers in try/catch statements.

try
   put wp_getCategories(pParamsA) into theData
catch theError
end try

if theError is not empty then
   // Something bad happened
else
   // theData contains valid data
end if

4) Place Errors in the result and Return Data In it

This is the approach that the Revolution engine uses in many cases. For example, if you use the post command any errors are reported in the result and the data returned from the web server is placed in the it variable. Likewise, this is how a command like decrypt behaves. This is what a WordPress library handler might look like using this method:

wp_getCategories pParamsA
put the result into theError

if theError is empty then
   // 'it' contains data returned from the server
else
   // Something bad happened
end if

I’ve never liked option (1) as I don’t think that mixing error reporting and results is a good idea. What if the actual value started with your error string? Likely? No. Possible? Yes.

Option (2) would probably work fine as I don’t think you would get invalid results if you had multiple calls to the library going on with send in time calls (I could be wrong but I didn’t go with this approach so I didn’t test it). I just don’t care for that sort of API.

Option (3) requires too many lines of extra code for my taste and it doesn’t seem appropriate to throw an error if communication with the web server fails for some reason. Throwing errors should be reserved for circumstances where the developer has passed in bad data that he should have cleansed ahead of time.

That left me with option (4) and this is the option I ended up using. The reason I like option (4) is that this is how the engine behaves in a number of places. Errors and data are clearly separated and I like using a “native” approach as calls to my library handlers will read the same as calls to engine handlers.

There was only one problem left. How could I set the it variable in a command? Revolution only supports setting the result from a command. It turns out that you can set variables in calling handlers by using the debugContext so I whipped up a little handler called SetValueOfItInCaller that did just what I needed. Take a look at the Write a Command That Sets ‘the result’ And ‘it’ lesson to see the solution.

Share

New Course: Professional Application Development With Revolution

Revolution is an incredible cross-platform development tool for quickly creating programs that run on Mac, Windows and Linux. But creating a professional, polished application that is ready for release still requires a great deal of know-how and expertise.

Blue Mango Learning Systems, author of the free and open-source GLX Application Framework, is pleased to announce a new online course targeted at application developers: Professional Application Development With Revolution.

Course Overview

This course uses the GLX Application Framework as a foundation for teaching developers how to create great applications with Revolution. The GLX Application Framework provides the underlying infrastructure you need for creating professional-grade applications on Mac and Windows. This allows you to focus on making your application unique and valuable instead of wasting time setting up mundane features such as undo support. Using the framework saves you time and makes you more productive. This is the same framework that we use in our application ScreenSteps.

This course will cover how to:

  • Organize your application within the GLX Application Framework
  • Utilize framework features, such as the preferences API, to remove unneeded headache from the development process
  • Deal with cross-platform issues
  • Establish a repeatable process for updating and distributing your application

The course will be presented by Trevor DeVore of Blue Mango Learning Systems. Trevor is the programmer behind ScreenSteps.

This course will be delivered via webinar and includes a 100% money back guarantee.

Course Topics

Organizing for Success: Starting off on the right foot. Overview of GLX Application Framework, organizing application resources (window stacks, library stacks, behaviors, images, etc.), introduction to Build Profiles…
Building Your App Part I: Creating the application specific portions of your application foundation. Preferences, undo, control naming conventions that make your life easier, tackling cross-platform font issues, managing external resources such as media…
Building Your App Part II: Using Behaviors, providing professional internet integration, why and how to manage broadcasting property changes, cross-platform issues…
Deploying and Distributing: Building a fast, worry-free workflow for packaging and distributing your applications. Build Profiles, Auto Update, Installers…

Notes

This course will focus on the Mac OS X and Windows XP/Vista platforms when discussing cross-platform topics.

Dates

Day 1: August 6th

  1. Organizing for Success: 11 AM to 12 PM EST (GMT -5)
  2. Building Your App Part I: 1 PM to 2 PM EST (GMT -5)

Day 2: August 11th

  1. Building Your App Part II: 11 AM to 12 PM EST (GMT -5)
  2. Deploying and Distributing: 1 PM to 2 PM EST (GMT -5)

Day 3: August 18th

  1. Premium Pass Question and Answer Session I: 11 AM to 12:30 PM EST (GMT -5)

Day 4: August 20th

  1. Premium Pass Question and Answer Session II: 11 AM to 12:30 PM EST (GMT -5)

Cost

There are two different packages available for the course. The Standard Course Pass includes Day 1 and Day 2 presentations with accompanying questions and answers. The Premium Course Pass includes additional access to Day 3 and Day 4.

The sessions on days 3 and 4 will address specific questions submitted to Blue Mango Learning Systems by Premium Course attendees. In order to ensure that we can give each attendee the attention they deserve we are limiting the number of Premium Course passes to 10.

Standard Course Pass

Includes access to days 1 and 2.
Standard Course: $395

Sign up now

Premium Course Pass

Additional access to days 3 and 4. Limited to 10 attendees.
Premium Course: $595

Sign up now

If you have any questions at all please contact us at or call us at 866-275-7856.

Share

GLX Application Framework 1.1 Released

Revolution is an incredible cross-platform development tool for quickly creating programs that run multiple platforms. But creating an application with Revolution still requires that the developer create their own libraries to perform many common application tasks.

The GLX Application Framework provides the underlying infrastructure you need for creating professional-grade applications on Mac and Windows. This allows you to focus on making your application unique and valuable instead of wasting time setting up mundane features such as undo support. Using the framework saves you time and makes you more productive.

To find out more visit the GLX Application Framework page in our Revolution Tools section.

Share

Loading Stack Files Into Memory

In my applications I like to verify that all stack files exist on disk when the application launches. If any of the required stack files are missing then I alert the user and quit the application.

Most developers are familiar with using

go [invisible] stack "/path/to/stack"

to load a stack file into memory. But ‘go stack’ actually opens the stack on screen and triggers the [pre]openStack and [pre]openCard messages. You don’t want either to happen if you are just validating stack file existence and loading into memory. Although you can hide the stack and lock messages there is a way that requires less lines of code.

The best way to verify that a stack file exists on disk and load it into memory without triggering any messages or showing it on screen is to do this:

put there is a stack "/path/to/stack" into theStackFileIsLoaded

By checking for the existence of the stack file on disk, Revolution will load the stack into memory. if theStackFileIsLoaded = false then you know the stack file doesn’t exist.

On a somewhat related note check out the Knowing Which Stacks Are In Memory lesson. It has a function that lists all stacks that are currently loaded in memory.

Share

GLX Application Framework 1.1 Coming Your Way

The release of version 1.1 of the GLX Application Framework is just around the corner and it has a number of new features and enhancements that take the grunt work out of application development. This version of the framework will go even further in helping you be more productive and in creating more polished applications.

The biggest addition by far is a customized version of libURL that takes the headache out of working with proxy servers in corporate networks. The framework can resolve proxy servers in environments where the proxy server is provided by a PAC file. And, thanks to an external provided by our friends at Altuit, the framework also supports NTLM authentication on Windows.

Some other features of the customized libURL library are:

  • Automatic handling of cookies
  • Support for HEAD requests
  • Support for non-blocking POST requests
  • Generation of internet time stamps in GMT

In addition, the customized version of libURL alerts you when your program tries to connect to a secure server with an invalid certificate so you can ask the user if they are okay with that.

Another big addition to the framework is a generalized undo framework that helps you manage your undo/redo logic. While the framework can’t write the undo code for you it does make it much easier to add this vital functionality to your applications.

Besides the big feature additions there are a number of feature improvements and bug fixes including improvements to auto update.

So keep an eye on this website by signing up for the enews and updates (we’ll email you when new articles are posted) or by subscribing to the RSS feed.

Share

Installing Externals in the Revolution IDE

Revolution has made it relatively straightforward to work with the included externals like revDB, revXML and revZIP. The externals are automatically available to your scripts when you launch the IDE and the standalone builder allows you to include them when building a standalone.

Wouldn’t it be nice if your custom external behaved just like a Revolution external in the IDE? Well it can. I’ve put together a lesson showing how to properly install an external so that it loads in the IDE and is available in the standalone builder.

Installing An External

Share