Creating widget specific library

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
pink
Posts: 272
Joined: Wed Mar 12, 2014 6:18 pm

Creating widget specific library

Post by pink » Thu Apr 25, 2019 3:58 pm

I've made a couple of LCB libraries, however I discovered that they cannot be used by a widget to interact with the canvas. In general, there is a lot of code I reuse in widgets that I would like to not always copy and paste.

Let me try and provide a concrete example. On many of my widgets, I have settings for an OK and Cancel button at the bottom of the canvas. I use the same exact code for drawing them, I use the same exact code for interacting with them. Is there something I could/should do to take that code out of each widget and put into a centralized library. (Or is this something I should add as an issue/request on Github?)
Greg (pink) Miller

MadPink, LLC
I'm Mad, Pink and Dangerous to Know

Post Reply

Return to “LiveCode Builder”