LiveCode
  • Why LiveCode?
  • Customers
  • Resources
  • Education
  • Consulting
  • Pricing
  • Blog
  • Login
  • Try LiveCode
Back to
  • slides
  • tutorial
Resources

Compiling and testing a library in LiveCode

Topic Progress:
← Back to Lesson

Testing the library

Now we have a complete library we want to compile and test it.

To do this we use the LiveCode Extension Builder.

  1. Open LiveCode
  2. Open the Extension Builder from the Tools Menu

2016-06-07 12_32_23-Extension Builder

The Extension Builder

2016-06-08 11_24_53-Step 6_ Compiling and testing a library in LiveCode - Google Slides

1. Open button – allows you to select and load the extension you wish to build.
2. Data that the builder was able to parse from the directory such as icons, resources, API’s the user guides.
3. Console: Shows status, error and log messages.
4. Test: compiles the extension and loads it into LiveCode
5. Script: Opens the lcb script in an external default editor.
6. Install: Installs the extension into the IDE
7. Uninstall: Uninstalls the extension from the IDE
8. Package: Creates a .lce package which can be shared

Compiling the Hello World Library

Initially we will use the Test button to compile the library and test it without installing.

2016-06-08 11_25_21-Step 6_ Compiling and testing a library in LiveCode - Google Slides

  1. Click the Open button and select the “HelloWorldLibrary.lcb” file.
  2. The Icons, Resources, Deafult Script, API and User Guide sections are automatically populated.
  3. Click the Test button to compile and load the library in LiveCode.

The log field will give you some show the compilation progress and display any warnings.

The Extension Builder will create a test stack.

LiveCode Builder Extension Files

When the Extension Builder is used to compile a LiveCode Builder file a number of files are created.

  • api.lcdoc – LiveCode doc file for the extension. This can be viewed in the LiveCode Dictionary.
  • .lci file –  LiveCode Interface file. This file contains a list of the public handlers in an extension, and is used when compiling another extension that depends on it to determine whether handlers it calls exist.
  • Manifest.xml – An XML manifest file.
  • Module.lcm – The compiled module file.

Each module you create will have files with the same names, for example api.lcdoc, which is why we create each extension in a separate directory.

Testing the library in a LiveCode stack

Now the library is loaded we can test it in LiveCode.

  1. Add button to the test stack.
  2. Set the code of the button to
on mouseUp
 answer sayHello()
end mouseUp

3. Click the button, you should see an answer dialog displaying the “Hello World!” message returned by the library

2016-06-07 14_20_24-Untitled 1 _

← Previous Topic

← Previous Topic Next Topic →
  •  
  •  
  • (0)
  •  

Expand All | Collapse All
Lessons Status
1 - Hello World Library
  • Introduction
  • Installing a Text Editor
  • Creating an LCB library
  • LCB library definition
  • LCB handler definitions
  • Compiling and testing a library in LiveCode
  • LCB metadata
  • Installing an LCB Library
  • Packaging and sharing an LCB library
  • Including an LCB library in a standalone
  • Conclusion
2 - Extended Hello World Library
  • Introduction
  • Explicit Types
  • LCB Lists and Arrays
  • Type Conversion between LCB and LiveCode Script
  • Using Explicit Typing in the Library
  • Passing Parameters to the Library
  • Using Lists in the Library
  • Documenting the Library
  • Browsing the Documentation
  • Conclusion
3 - Rotated Text Widget
  • Introduction
  • Defining a Widget
  • LCB Module Level Variables
  • Widget Properties
  • Widget Handlers
  • LCB Canvas Operations
  • Compiling and Testing the Widget
  • Installing the Widget and adding it to a Stack
  • Including the Widget in a Standalone
  • Conclusion
4 - Extended Rotated Text Widget
  • Introduction
  • Integrating Properties
  • Accessing LiveCode Control Properties
  • Handling Mouse Events
  • Saving and Loading Widgets
  • Read Only Properties
  • Documenting the Widget
  • Conclusion
5 - Pie Chart Widget
  • Introduction
  • Planning the Widget
  • Widget Properties
  • The OnCreate Handler
  • The OnPaint Handler
  • Responding to Mouse Events
  • Saving and Loading the Widget
  • Installing and Including the Widget in a Standalone
  • Documenting the Widget
  • Conclusion
6 - Modifying the Line Graph Widget
  • Introduction
  • Duplicating the Line Graph Widget
  • Additional Color Properties
  • Filling the area below the line
  • Adding graph marker mouse events
  • Conclusion
7 - Additional Resources
  • Extending LiveCode Guide
  • LiveCode Builder Language Reference
  • LiveCode Builder Style Guide
  • LiveCode Documentation Format
 

LCB Source

LCB Source
 

Login

LiveCode

  • Why LiveCode?
  • Pricing
  • Customer Stories
  • Extensions
  • LiveCode in Education
  • LiveCode in Business

Looking for LiveCode FileMaker?

LiveCode for FM

Resources

  • Docs
  • API (Language Dictionary)
  • Lessons
  • Sample Stacks
  • Forums
  • Stackoverflow
  • User Groups
  • Support
  • Directory
  • LiveCode Services

About

  • About
  • Meet The Team
  • Careers at LiveCode
  • Contact us

Recent Posts

  • LiveCode Classic 10.0.1 Stable and 10.0.2-rc-1 Released
  • Create Progress – the Three D’s
  • LiveCode Create: Closing out the year with big steps forward
  • Create dp-5: Unified Engines and Shared Extensions
  • 3 Great New LiveCode Releases
Sitemap
Terms Privacy Policy EULA
Brought to you by LiveCode Ltd, Registered in Scotland, No. SC200728
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok