The Unofficial RB-NUG FAQ maintained by Chris Cummer chris@postal-code.com http://www.postal-code.com/public/rbnugfaq.txt Last updated: 06/02/2002 Issue: 015 ---------------------------------------------------------------------------------------------------------------- NOTE: 2008-03-28 At this point this document is so hopelessly out of date as to be considered archaeological in nature. Future civilizations will no doubt find it fascinating. ---------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------- NOTE: 2005-12-12 Obviously I no longer maintain this FAQ, as it hasn't been updated in three years. I no longer use REALbasic and haven't kept up to date with the development of it. You might consider this to now be an historical artifact in the history of REALbasic, kept here for posterity. ---------------------------------------------------------------------------------------------------------------- New in this vers: 5.1 updated, 5.5 added Please send any relevant code examples, spelling corrections, FAQ suggestions and question/answer rewording to the address above rather than polluting the list. Cheers! For more information about REALbasic: http://www.realbasic.com 0.0 QUESTION INDEX Miscellany 1.1 Is there a searchable archive of this newsgroup? 1.2 Is there an etiquette for posting to the RB NUG? 1.3 Who is this guy Matt Neuburg and why does he answer in page numbers? 1.4 I just launched REALbasic and received a warning that another copy of REALbasic is already running with my serial number. Then it quits and I must re-enter my serial numer. What's going on? 1.5 What is the correct capitalization/spelling of ? General Programming 2.1 How do I get the cube root? 2.2 Is MouseUp is broken in ? A: REALbasic REAL Software Mac OS X 2.0 GENERAL PROGRAMMING 2.1 Q: How do I get the cube root? A: pow(x, 1/3) 2.2 Q: Is MouseUp is broken in 0 Then MsgBox "SetThemeWindowBackground failed; err="+Str(Err) End If This will make your sheet transparent." 4.4 Q: How do I add an OS X application icon to my app? A: Noah Desch writes: "IconPaste and the RB build dialog don't support OSX icons. You'll need to put the OSX icon resources into a resource file (with ID 128) which you then drag into your project window. This will cause the icon resources to be compiled into your application. The only resource needed for OSX icons is the 'icns' resource, but you'll probably want to include all the others as well in case someone tries to use your program under OS 9." Erick Tejkowski (author of "REALbasic for Dummies") has a tutorial for adding OS X icons at: http://www.ResExcellence.com/realbasic/12-13-01.shtml 4.5 Q: How do I execute a command via the command line from REALbasic as root? A: Joe Strout wrote: The correct solution to this problem (which seems to come up here every few days!) is: s.execute "echo " + password + " | sudo -S someCommandGoesHere" [Where s is an instance of shell - ed.] Note that I'm using sudo here instead of su; this is both because su is dangerous and not recommended by Apple, and because sudo has a "-S" option which tells it to get the password from stdin, which su does not have (as far as I can tell). To get the password into stdin, we feed it to echo, which echoes it right back, and pipe the output of that to the input of sudo. 4.6 Q: How can I use drawers in my application? A: Currently you cannot. REALbasic compiles Carbon-based applications and drawers are a Cocoa-only feature. 5.0 RESOURCES 5.1 Carbon Declare Library (free) An incredibly useful module full of Carbon Declares that give you direct access to many OS X features not directly supported by REALbasic (including enabling and modifying the Preferences menu). http://kevin.sb.org/TMBS/Index.shtml 5.2 Einhugur Programming Resources A subscription-based service prodiving numerous REALbasic plugins. http://www.einhugur.com/ 5.3 Alfred Van Hoek's REALbasic Plugins Notably: MovieWorks plugin, NavDialog plugin, HTMLrendering plugin http://homepage.mac.com/vanhoek/ 5.4 httpSocket The easiest way to handle incoming and outgoing http data. Created by Dan Vanderkam http://www.nd.edu/~jvanderk/rb/ 5.5 Carbon Events plugin Adds numerous useful Carbon-enabled properties, events and functions to your application. Commercial. http://www.everydaysoftware.net