HTML5 deployment: progress comes into sight

hh hh at
Wed May 31 17:13:38 EDT 2017

Call, send , dispatch, do script ...
It is very impressive how the core team can still have all that
messaging in mind while developing LC Builder.

Now why not use kind of a mnemonic naming in LCB e.g.

   sendHandler <handler> <to object>
   callHandler <handler> <of object>
   dispatchHandler <handler> <of object>
   doHandler <handler> <of object>?

We could still have

   do <script> <in object> [as language] 

the default for a browser widget being "as javascript".
Could be used parallel to
   doHandler <handler> of <browser widget>
(where <handler> has to be a javascript function name).

> > hh wrote:
> > Using or not using another widget from LC Builder via LC Script arises 
> > the next
> > new question:
> > [3] How can widgets easily communicate amongst themselves?
> Mark W. wrote:
> At the moment widgets can communicate with each other via properties - 
> there is a missing 'feature' at present in terms of allowing public 
> (non-event) handlers to be called from 'outside the widget' (i.e. from 
> script)... Although this is more a matter of finding the right syntax 
> than anything else.
> e.g.
> A widget might have a 'Copy' handler - which does what you would expect 
> 'copy tObject' to do - so you might want to invoke this handler at 
> certain points:
>     call "Copy" of widget "Foo"
> However, 'call' already has a meaning - it means 'send message to script 
> object without changing context' (note I use the term 'script object' 
> here to distinguish between the object as you see it in LCS, i.e. its 
> script, and the object which backs it, i.e. the widget).
> Basically, we can't use 'dispatch', 'call' or 'send' as their behavior 
> is already taken for interaction at the script level (i.e. LCS handlers 
> in the scripts of the objects) and *not* invoking a method on the 
> 'thing' behind the script (whether that be an engine control, or 
> widget).
> Indeed, we already made a slight mistake with 'do in <widget>' which we 
> do need to rectify (somehow) at somepoint - for a similar reason so that 
> we can actually have 'do in <object>' to mean 'do the fragment of script 
> in the context of the target object' (at the moment you can use it on a 
> browser widget, but then the script is JavaScript and not LCS!).

More information about the use-livecode mailing list