[squeak-dev] FFI windows API examples

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Mon Aug 22 13:02:06 UTC 2022


Hmm, I naivly tried (Wind32Handle allSubclassesDo: #doneCompiling) but it's
not sufficient, Win32Window new still returns a Win32Handle.
It seems that what triggers #generateTypeAccessor is a query to
(SomeExternalStructureSubclass externalType).
But if we already queried (SomeExternalStructureSubclasUpperInHierarchy
externalType), then externalType will be inherited from this intermediate
subclass, not from ExternalStructure, and thus #generateTypeAccessor won't
be triggered...


Le lun. 22 août 2022 à 14:43, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> a écrit :

> Hi all,
> in recent FFI, I tried to evaluate the example in Win32Window comment.
> I would expect (Win32Window getFocus) to return an instance of Win32Window.
> But it returns a (Small)Integer.
> Using (Win32Window new value: Win32Window getFocus) as a workaround does
> not work either, we cannot send getDC to it, because Win32Window new
> returns an instance of Win32Handle, not Win32Window... Because externalType
> has not been (*auto)generated for subclasses of Win32Handle... Probably
> because they have no (MC) method definition recognized as
> isExternalStructureFieldDefinition...
> How to make simple examples like this work?
>
> Nicolas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220822/de2f1a35/attachment.html>


More information about the Squeak-dev mailing list