Widgets' Use Cases and Bytes Added to App
Peter TB Brett
peter.brett at livecode.com
Tue Apr 5 06:12:46 EDT 2016
On 04/04/2016 23:29, Sannyasin Brahmanathaswami wrote:
> Just putting my little pinky into the widget world.
>
> Frequently we use small groups to instantiate "objects" which are
> made of of several controls grouped together. These are then
> replicated across some card for whatever purpose. I think that is the
> underlying model for the DataGrid.
>
> Would such a small group be better created as a widget?
Unfortunately we don't _quite_ have the engine features required to wrap
a set of "classic" controls into a widget. :-/
> Put another way, can we, in generalized "framework speak" define what
> uses cases best call for a widget and when they are best *not* used?
>
> In the case of any given widget, if it were is duplicated 50 times.
> Is all that code added X 50 added to the total overhead/size of the
> app? or is a "class" whose code reused and only the content the
> presentation layer is adding the file size?
If you duplicate the widget 50 times, then:
- 50 controls are added to your stack (exactly the same as if you had
put 50 buttons on your stack)
- One copy of the widget source code and any resources it uses are added
to your standalone.
Peter
--
Dr Peter Brett <peter.brett at livecode.com>
LiveCode Open Source Team
LiveCode 2016 Conference: https://livecode.com/edinburgh-2016/
More information about the use-livecode
mailing list