How to find out what is in a default library?
-
- VIP Livecode Opensource Backer
- Posts: 92
- Joined: Mon Jul 06, 2009 4:53 am
- Location: Bamboo River
How to find out what is in a default library?
I tried to use the min function in LiveCodeBuilder thinking that it could be in the default com.livecode.math library. It wasn't, well not in the form that I tried to use - min(Real, Real). So I tried unsuccessfully to find the code of the library in GitHub. Is there any easy way to find out the API of the defaults libraries (or any library for that matter)?
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: How to find out what is in a default library?
Hi Peter,
The syntax binding for min is here:
https://github.com/runrev/livecode/blob ... h.mlc#L478
I'm not sure why it isn't working for you though - it looks like you were using it in the right way.
All of the LCB API is supposed to be documented in the LiveCode Builder dropdown of the API tab of the dictionary, although I see that the math function-style syntax doesn't seem to be in there.
The syntax binding for min is here:
https://github.com/runrev/livecode/blob ... h.mlc#L478
I'm not sure why it isn't working for you though - it looks like you were using it in the right way.
All of the LCB API is supposed to be documented in the LiveCode Builder dropdown of the API tab of the dictionary, although I see that the math function-style syntax doesn't seem to be in there.
-
- VIP Livecode Opensource Backer
- Posts: 92
- Joined: Mon Jul 06, 2009 4:53 am
- Location: Bamboo River
Re: How to find out what is in a default library?
Many thanks Ali.
I suspect that the issue I faced with min was that I didn't add
to the widget. I didn't think it was needed as the docs referred to it as a "default" library.
I suspect that the issue I faced with min was that I didn't add
Code: Select all
use com.livecode.math
Re: How to find out what is in a default library?
It's a "default library" in the sense that it's always available to use without having to install any extra extensions from the store.Peter Wood wrote:Many thanks Ali.
I suspect that the issue I faced with min was that I didn't add
to the widget. I didn't think it was needed as the docs referred to it as a "default" library.Code: Select all
use com.livecode.math
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: How to find out what is in a default library?
All the syntax in the 'default' libraries is available without an explicit use statement - the reason you have to use com.livecode.math in this case is that the min handler is a public handler rather than syntax.
-
- VIP Livecode Opensource Backer
- Posts: 92
- Joined: Mon Jul 06, 2009 4:53 am
- Location: Bamboo River
Re: How to find out what is in a default library?
Thanks for the explanation Ali.