realbasic-nug
[Top] [All Lists]

Carbonizing Declares

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Carbonizing Declares
From: Ryan Govostes <panic at twcny dot rr dot com>
Date: Sun, 30 Mar 2003 15:30:37 -0500
I got annoyed that every time I opened an old RB project I'd downloaded, the declares were all made for Classic and I had to Carbonize them and put in #if statements and so forth. So, I wrote myself a little method, put it in a little module, and just added it to whatever projects I opened.

I thought perhaps others might find it useful, so here you have it. To use it, just put GetFragmentName(" before the library the Declare uses, and ") after it.

Function GetFragmentName(ClassicLib as String) As String
   dim sysV as integer
   if system.gestalt("sysv", sysV) and sysV >= &h1000
      return "CarbonLib"
   else
      return ClassicLib
   end if
End Function

Enjoy : )
Ryan Govostes


---
A searchable archive of this list is available at:
<http://support.realsoftware.com/listarchives/search.php>

Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>

Subscribe to the digest: <mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.


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