Thanks Bob

On 12/18/06, Robert J. Fang <[EMAIL PROTECTED]> wrote:
Paul,

I use the same declares in my UB builds. Change the Lib to "Carbon" instead
of "CarbonLib".

Bob

======================
Robert J. Fang
UFI Technology Group
P.O. Box 704
Delavan, IL 61734
(309) 740-0636 x401
[EMAIL PROTECTED]
======================


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Rehill
Sent: Sunday, December 17, 2006 5:22 PM
To: REALbasic NUG
Subject: Cell double click detection for listboxes in UB builds

Hi all

The RB compiler doesn't seem to like declares with CarbonLib appearing
in code for UB builds.  I was hoping it would just ignore such code if
placed within TargetCarbon conditional if statements but it seems I
have to get rid of all CarbonLib references before I can attempt to
compile the project.

Seth Willits had a class for detecting the double clicking time in a
listbox's cell which depends on code like this:

Function RetrieveDbleClickTime() As Integer
 #If TargetCarbon
   Declare Function GetDblTime Lib "CarbonLib" () as Integer
   Return GetDblTime()
 #Else
   #If TargetMacOS
     Declare Function GetDblTime Lib "InterfaceLib" () as Integer
     Return GetDblTime()
   #endIf
 #endif
 #If TargetWin32
   Declare Function GetDoubleClickTime Lib "User32.DLL" () as Integer
   Return GetDoubleClickTime() / 1000 * 60
 #endif
End Function

What is the best way to get around the compiler's problem with:

   Declare Function GetDblTime Lib "CarbonLib" () as Integer

Can the second call to:

     Declare Function GetDblTime Lib "InterfaceLib" () as Integer

be used for all Mac OS X builds from 10.1 upwards?

Thanks

Paul
_______________________________________________
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>

_______________________________________________
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>



--
Paul Rehill
mathsteacher.com.au
RB2004R4
RB 5.5.5 Mac Pro, Mac OS 10.3.6
RB 5.5.5 Win Standard, Win XP SP2
Plugins used:  MBS
RealBasic resources:  RB Developer, Matt Neuburg's RB book
_______________________________________________
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>

Reply via email to