[Cuis-dev] Autocomplete fix
Hernán Wilkinson
hernan.wilkinson at 10pines.com
Mon Aug 25 04:05:56 PDT 2025
Yeah! of course.
As you know, variables in Smalltalk have no type related, so there is no
way to derive the messages an object referenced by a variable will
responde. In prog languages where variables have a type related, it is easy
statically to know that because you can go from the variable to its type to
the messages that type implements.
So, the autocompleter that comes with Cuis (in fact, any Smalltalk) tries
to do its best showing the messages the object referenced by the variable
will answer. There are places where there is no type info so the
autocompleter shows all the selectors of the system that start with the
letters you typed. That happens in the method editor of a browser for
example. But there are exceptions. If the receiver is self or super, the
autocompleter knows the messages self/super answer because you are working
in a method of a class. You can try that and see the difference between
using the autocompleter with a local variable and with self/super. The same
thing happens in the inspector, if you type an inst var of the inspected
object in the inspector's workspace and ask for the autocompleter you will
see that the messages that are shown are the actual messages the object can
answer. The same in the debugger. That is possible because the variable
references an object and we can go from the object to its type and
therefore the messages it can answer.
LiveTyping makes the autocompleter behave as if you were in the inspector
or debugger. That is possible because LiveTyping collects the types of each
variable and therefore the autocompleter knows the messages that objects
referenced by variables will answer. With LiveTyping the autocompleter
behaves as if you were using a statically typed language with the pros of a
dynamically typed language and without the cons of a statically typed one
:-)
Cheers!
Hernan.
On Sat, Aug 23, 2025 at 10:11 AM Hilaire Fernandes <hfern at free.fr> wrote:
> Yes, I know the feature to show the comment of a method. Works great. I
> planned to document the user method in DrGeo.
>
> Can you explain use again the advantage of LiveTyping related to
> autocompleter? Or may be better just point me to a video.
>
> There is may be something to consider related to the Dybo project and its
> user programming dimension.
>
> In the other hand, I ty
> Le 22/08/2025 à 19:08, Hernán Wilkinson a écrit :
>
> I agree, it is really useful and more accurate with LiveTyping :-)
> do you know you can see the message documentation pressing the right arrow
> ? that is useful too
>
> -- http://mamot.fr/@drgeo
>
>
--
*Hernán WilkinsonAgile Software Development, Teaching & Coaching*
*Phone: +54-011*-4893-2057
*Twitter: @HernanWilkinson*
*site: http://www.10Pines.com <http://www.10pines.com/>*
Address: Alem 896, Floor 6, Buenos Aires, Argentina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20250825/f9632153/attachment.htm>
More information about the Cuis-dev
mailing list