realbasic-nug
[Top] [All Lists]

Re: PDF Classes

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: PDF Classes
From: Jonathan Johnson <jonj at realsoftware dot com>
Date: Tue, 30 Jan 2007 15:45:00 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <CE4DDE3E-09F3-4C62-9F8D-BB376E525638 at great-white-software dot com> <DBCAEFBA-2D70-45DB-9186-79FAA51ADBE8 at bradrhine dot com> <B681461F-7640-4530-9004-BAB61599EAFD at great-white-software dot com> <7EEDE784-8DAB-40C1-AA85-F7A7E513F1FF at realsoftware dot com> <631E4BD7-B9C0-43A8-87A5-3B17B9220FDD at oxalyn dot com> <DFC9A7F1-8C72-4548-A189-B8A3F973EF4F at realsoftware dot com> <C9F68F5E-C9AA-4A3B-B122-CEEC777DE609 at oxalyn dot com>

On Jan 30, 2007, at 3:36 PM, Eric Williams wrote:


I use MsgBox in my encrypted classes to put up messages like, "The developer of this software has included an unlicensed piece of software. Please contact them, blah blah blah". I use MsgBox so it can't be circumvented - for example, by replacing my LicenseAlertDialog window cass with an intert substitute. I bet I'm not the only one who does this.

The underlying problem with this is that MsgBox is not in Console Applications. If all of your classes can only work in GUI applications, then that's not a problem. However, if your classes can target console applications, it would be best to put in Print statements in Console builds instead, or perhaps even a Print and Quit (-1) statement, depending on your restrictions.

For example:

#if TargetHasGUI
  MsgBox "Unlicensed. Quitting."
#else
  Print "Unlicensed. Quitting."
  Quit -1
#endif

This would handle both situations quite nicely, and allow users to be able to compile their applications (or simply test them!) when running in the IDE.

HTH,
Jon


--
Jonathan Johnson
jonj at realsoftware dot com
REAL Software, Inc.

REAL World 2007 Conference
May 9 - 11 in Austin, Texas
<http://www.realsoftware.com/realworld>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>