Hacking LiveCode

Mike Kerner MikeKerner at roadrunner.com
Sun Sep 25 16:51:42 EDT 2022


1. is that documented, somewhere, because i cannot find it.
2. that isn't the problem i was having. the problem i was having was that
if i took a widget (navRad, for instance), and added code to it, then
installed the new version, preexisting copies of the widget would not
execute the new code. new copies would.
so, it's 100% possible that i discovered some other behavior, but after
testing it a few times, instead of documenting the recipe, i accepted that
this was the behavior, and went about addressing it. except, today, when i
tested it, the behavior is the one that you would want (in unbuilt apps,
behaviors in newer versions of the widget are reflected in existing copies
of the widget). so i have to go replicate the behavior, again and develop a
recipe, again.
3. fortunately or not, chasing this particular bear for days has resulted
in a snippet in the hack repo which i hope extracts all properties for an
object, standard or specific.

On Sun, Sep 25, 2022 at 3:50 PM Brian Milby via use-livecode <
use-livecode at lists.runrev.com> wrote:

> The widgets are identified by the reverse dns name.  As long as that name
> does not change, LC will use whichever version is currently installed in
> the IDE.  The issue is that you can’t take the LC version of a widget and
> then build your own version with a new name and have the settings easily
> come over.  I think this export issue should really be thought of as a
> bug.  When a widget is exported it pulls the widget settings from the
> widget and ignores the standard ones.  The engine has to serialize the data
> when it saves the stack so it should not be a huge issue to fix.
>
> Brian Milby
> brian at milby7.com
>
> > On Sep 25, 2022, at 3:09 PM, Mike Kerner via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > i just re-tested this, and came up with the opposite result (modifying
> the
> > widget and rebuilding it causes existing copies to behave the new way).
> So,
> > it's time to come up with a recipe for one versus the other...
> > welcome to the weeds...
> >
> >> On Sun, Sep 25, 2022 at 2:28 PM Mike Kerner <MikeKerner at roadrunner.com>
> >> wrote:
> >>
> >> and it is also 100% possible that there is something that can happen
> >> during the building/testing/installing process that would explain the
> >> behavior i have seen, but without knowing the expected behavior...
> >>
> >> On Sun, Sep 25, 2022 at 2:11 PM Mike Kerner <MikeKerner at roadrunner.com>
> >> wrote:
> >>
> >>> How's this: the expected behavior is not documented (as far as I can
> >>> find), so I don't know what the expected behavior is. I have tested
> >>> modifying a widget, rebuilding it, and re-adding it to LC. That does
> not
> >>> seem to cause existing widgets to update. Is that a bug in my code,
> and am
> >>> I doing something wrong that is leading me down this path? 100%
> absolutely,
> >>> positively, maybe, and then I'm just chasing a phantom...again...
> >>> I also don't think there is a documented way to see what version each
> >>> widget is in a particular...widget, but I think we might be able to.
> We can
> >>> certainly tell which version of a widget is installed in LC (bug report
> >>> 23952, whose code is going to go into the hack repo, soon).
> >>>
> >>> If I am write, and it is not a bug in my code, then it absolutely is a
> >>> disadvantage to using widgets...until this hack is complete.
> >>>
> >>> On Sun, Sep 25, 2022 at 12:59 PM Paul Dupuis via use-livecode <
> >>> use-livecode at lists.runrev.com> wrote:
> >>>
> >>>> On 9/25/2022 12:41 PM, Mike Kerner via use-livecode wrote:
> >>>>> chasing all the things that aren't documented, but you need to know
> >>>> about
> >>>>> LCB took me back into hacking liveCode.
> >>>>> it's just getting started. if you have tools or pointers, the
> >>>>> repo/wiki/issues/discussion are at
> https://github.com/macMikey/LC-HACK
> >>>>> Project 1: extracting all properties of a widget (because "export"
> >>>> does not
> >>>>> export the "base" LC object properties) and applying those properties
> >>>> to an
> >>>>> updated version of the widget (because LC is releasing updates to the
> >>>>> megabundle widgets almost weekly)
> >>>>> Project 2: documenting the LC IDE API's?
> >>>>>
> >>>>
> >>>> A clarification please: Are you saying that if I have version 1.1.2 of
> >>>> PolyGrid (as an example) installed and I have made a stack using 1 or
> >>>> more Polygrids and I now download and install version 1.3.1 (or some
> >>>> newer version) of PolyGrid, that when I open my stack the PolyGrids in
> >>>> that stack do not update from 1.1.2 to 1.3.1?
> >>>>
> >>>> If so, this is a terrible disadvantage of any use of widgets. I feel I
> >>>> must be misunderstanding why exporting properties to re-apply them is
> >>>> needed for updates.
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> use-livecode mailing list
> >>>> use-livecode at lists.runrev.com
> >>>> Please visit this url to subscribe, unsubscribe and manage your
> >>>> subscription preferences:
> >>>> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>>>
> >>>
> >>>
> >>> --
> >>> On the first day, God created the heavens and the Earth
> >>> On the second day, God created the oceans.
> >>> On the third day, God put the animals on hold for a few hours,
> >>>   and did a little diving.
> >>> And God said, "This is good."
> >>>
> >>
> >>
> >> --
> >> On the first day, God created the heavens and the Earth
> >> On the second day, God created the oceans.
> >> On the third day, God put the animals on hold for a few hours,
> >>   and did a little diving.
> >> And God said, "This is good."
> >>
> >
> >
> > --
> > On the first day, God created the heavens and the Earth
> > On the second day, God created the oceans.
> > On the third day, God put the animals on hold for a few hours,
> >   and did a little diving.
> > And God said, "This is good."
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, "This is good."


More information about the use-livecode mailing list