Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Confused about System.isFunctionAvailable() (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Activate Text Drop in TextField (TextArea?)
Next thread: Activate Text Drop in TeaxtField (TextArea…)


Re: Any more Carbon fixes?   -   Garth Hjelte
  Confused about System.isFunctionAvailable()   -   Dark Ember
   Re: Confused about System.isFunctionAvailable()   -   Dark Ember
   Re: Confused about System.isFunctionAvailable()   -   Dark Ember
   Re: Confused about System.isFunctionAvailable()   -   Christian Schmitz

Confused about System.isFunctionAvailable()
Date: 04.08.13 22:24 (Sun, 4 Aug 2013 16:24:38 -0500)
From: Dark Ember
I'm starting to play around with declares() and I wanted to see if a
specific function was available. I'm wanting to check if the atoi() method
was available in the stdlib. So I have the following code:

Dim isAvailable as Boolean
isAvailable = System.isFunctionAvailable("atoi", "stdlib")
if (isAvailable) then
MsgBox("It's here")
else
MsgBox("It's not here")
end if

Now, I *know* the atoi function is part of the stdlib. I've read doc on it.
But, for some reason, when I call it this way, I am told the function isn't
available.

I'm sure I'm doing something wrong but I can't figure out what that
something is. Can anyone point me in the right direction?

Thanks,
DE
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Confused about System.isFunctionAvailable()
Date: 04.08.13 23:13 (Sun, 4 Aug 2013 17:13:11 -0500)
From: Dark Ember
Never mind, figured it out lol

On Sun, Aug 4, 2013 at 5:03 PM, Dark Ember <<email address removed>> wrote:

>
> On Sun, Aug 4, 2013 at 4:36 PM, Christian Schmitz <
> <email address removed>> wrote:
>
>>
>> Am 04.08.2013 um 23:24 schrieb Dark Ember <<email address removed>>:
>>
>> >
>> > Now, I *know* the atoi function is part of the stdlib. I've read doc on
>> it.
>>
>> Use right name of lib:
>>
>> Dim isAvailable as Boolean
>> isAvailable = System.isFunctionAvailable("atoi", "/usr/lib/libc.dylib")
>> if (isAvailable) then
>> MsgBox("It's here")
>> else
>> MsgBox("It's not here")
>> end if
>>
> Thanks, Christian,
>
> That seems to work. But it leads to more confusion. On my system, I don't
> have a file called libc.dynlib. How can I know what the 'right name' for a
> library is since it's not the actual filename?
>
> Thanks,
> DE
>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Confused about System.isFunctionAvailable()
Date: 04.08.13 23:03 (Sun, 4 Aug 2013 17:03:51 -0500)
From: Dark Ember
On Sun, Aug 4, 2013 at 4:36 PM, Christian Schmitz <
<email address removed>> wrote:

>
> Am 04.08.2013 um 23:24 schrieb Dark Ember <<email address removed>>:
>
> >
> > Now, I *know* the atoi function is part of the stdlib. I've read doc on
> it.
>
> Use right name of lib:
>
> Dim isAvailable as Boolean
> isAvailable = System.isFunctionAvailable("atoi", "/usr/lib/libc.dylib")
> if (isAvailable) then
> MsgBox("It's here")
> else
> MsgBox("It's not here")
> end if
>
Thanks, Christian,

That seems to work. But it leads to more confusion. On my system, I don't
have a file called libc.dynlib. How can I know what the 'right name' for a
library is since it's not the actual filename?

Thanks,
DE
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Confused about System.isFunctionAvailable()
Date: 04.08.13 22:36 (Sun, 4 Aug 2013 23:36:12 +0200)
From: Christian Schmitz

Am 04.08.2013 um 23:24 schrieb Dark Ember <<email address removed>>:

>
> Now, I *know* the atoi function is part of the stdlib. I've read doc on it.

Use right name of lib:

Dim isAvailable as Boolean
isAvailable = System.isFunctionAvailable("atoi", "/usr/lib/libc.dylib")
if (isAvailable) then
MsgBox("It's here")
else
MsgBox("It's not here")
end if

Greetings
Christian