Page 1 of 1

Create User Controls

Posted: Thu May 01, 2014 2:37 pm
by wimpykid1570
Hi,

I am new to LiveCode but I have programming knowledge in other languages. I would like to create user controls for livecode and sell them in either open-source or close-source. How do i go about it?

Also, what are the differences among these names:

- Extension
- External
- Plugins
- User Control

Thank you in advance.

Toan

Re: Create User Controls

Posted: Thu May 01, 2014 11:22 pm
by BvG
Externals are always foreign-code additions that are bound using the external c bindings. Usually they're made with C, C++ Obj-C or similar languages.

Plugins are usually stacks that are run in the IDE itself, like my BvG Docu stack. Often they're integrated using the 'Plugins' menuitem from the 'Development' menu.

Note that there's also some helper applications that are neither plugins nor externals. like Zygodact or Installermaker which are still most often targeted at LC developers.

Add-Ons or Extensions usually mean free or commercially sold user made content of any kind (externals, as well as Plugins and Helper Applications). They can be found in the User Control Center (also called RevOnline) or the Store, or just peoples websites.

The User Control center is just a way to share stacks and code snippets.

I guess you want to make your own controls, similar to the datagrid, possibly protected. One way is a library stack that is password protected. That stack then is referenced either by using behaviors, or by inserting it into the front or back or using librarystack.

Re: Create User Controls

Posted: Fri May 02, 2014 2:05 pm
by wimpykid1570
Thanks BvG for your quick reply.

After browsing through several livecode related websites, this is what I get to know so far (please correct me if I am wrong):

- I can put my custom control into a stack and save it with extension REV. When users need to use my custom control, they will open my stack, copy the control and paste it onto their stack(s).

- I can put my custom control into a stack and save it with extension REV. When users need to use my custom control, they will copy my stack file into the Plugin folder of their local LiveCode first, then go to Development -> Plugins and select my plugin (my stack).

Which of the above ways is the proper way to do? Or there is another proper way to do?

Also, I would like my custom control to be included in LiveCode Tools windows (where all LiveCode controls reside)? Is that possible? If it is, how would I do it?

Thanks for any feedback.

Toan

Re: Create User Controls

Posted: Mon May 05, 2014 1:48 pm
by BvG
Both your examples are the same, the difference is only how the user looks at the stack. I would also suggest not to copy any custom control around, instead have a coded way to create a custom control. For example in chartsEngine there's a handler called "chartsCreate", A complete script to create a chart can look like this, and works as long as chartsEngine has been loaded correctly by the user:

Code: Select all

on mouseUp
   chartsCreateChart
   put the result into tchart
   set the charts["data"] of tchart to "1,1,1" & cr & "30,56,12" & cr & "1,1,1"
   chartsRefresh tChart
end mouseUp

There's no built in way to put stuff into the existing ide gui, like the tools palette.

Re: Create User Controls

Posted: Mon May 05, 2014 7:48 pm
by wimpykid1570
Thank you, BvG. I think I kind of know how to start building my custom controls now.

Re: Create User Controls

Posted: Mon May 05, 2014 8:07 pm
by sefrojones
You might also be interested in Droptools.

http://droptools.sonsothunder.com/