Hi Ronie... I need help again.

In fact I am still not able to work with SDL2 events in Mac with Pharo 6
nor 7.

In Pharo 6 and Pharo 7, 32 and 64 bits I need to run this code:
'FFIExternalStructure
allSubclassesDo: #rebuildFieldAccessors'. In all cases I can open the
window and draw on it with Cairo, but the problems lie with the events. In
all cases when I start with libSDL2 and libSDL2-2.0.0 I have warnings in
the command line (2 libs detected, a random one will be used each time), so
I usually use only libSDL2 which seems to work better.

In 32 bits (both Pharo 6 and 7) if I delete the libSDL2-2.0.0 lib and
use libSDL2
only, I have mouse and window events but only **some** keyboard events. I
have around 2/3 of the keyboard events, which makes the app very hard to
use (Each time you press a key, you need to check if it worked or press it
again if not). I don't know for sure if I have all the other events or only
2/3 of them too as there are so many.

In 64 bits, (both Pharo 6 and 7), whatever combination of lib I attempt I
don't have *any* event (keyboard, mouse or window).

I have a working version in Pharo 4 where I have all the events. It's the
same 32 bits lib so it has to come from something else (VM changes or image
changes).

Any idea on what I have to fix to move from 2/3 of the events to all the
events ?
What is the right way to get a working SDL2 window with Pharo 6/7 ?

Thanks

On Thu, Sep 28, 2017 at 4:25 PM, Clément Béra <[email protected]>
wrote:

> Ok I used the other lib (libSDL2 instead of libSDL2-2.0.0) and it worked.
>
> 2017-09-28 16:07 GMT+02:00 Clément Béra <[email protected]>:
>
>>
>>
>> 2017-09-28 15:33 GMT+02:00 Ronie Salgado <[email protected]>:
>>
>>> Hi Clement,
>>>
>>> The last time I checked, the 64 bits Mac VM version is eating the
>>> keyboard events, but not the mouse and other events. I guess that for the
>>> minheadless this is not required. The 32 bits version of Mac works by
>>> running the folowing script:
>>>
>>> FFIExternalStructure allSubclassesDo: #rebuildFieldAccessors
>>>
>>> I think that Pavel fixed this for Pharo 7.
>>>
>>
>> Ok.
>>
>> I had done that.
>>
>> But...
>>
>> I don't have any keyboard events. I have mouse and window events. I am
>> using Mac 32 bits.
>>
>> Ok...
>>
>> It seems that the keyboard events arrive as touch events...
>>
>> I will try to make that work. We'll see.
>>
>> Thanks
>>
>>
>>
>>>
>>>
>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to
>>>> conflicts (the VM use randomly one lib or the other). I randomly chose one
>>>> that I use and deleted the other one, do you have advises on which one I
>>>> should prefer ? Maybe the events are working only with the other one ?
>>>>
>>> They should be a symlink. The correct one is the libSDL2-2.0.
>>>
>>> Best regards,
>>> Ronie
>>>
>>> 2017-09-28 15:02 GMT+02:00 Clément Bera <[email protected]>:
>>>
>>>> Hi Ronie, Hi all,
>>>>
>>>> I am trying to use OSWindow/SDL2 in Pharo 6,1 stable, I successfully
>>>> opened the window and I can draw on it with Athens (with minor changes
>>>> compared to Pharo 4). However, the user events (keyboard, mouse, etc.) are
>>>> not working. It seems some constants are not initialized but I am not sure
>>>> what is the right way to initialize them.
>>>>
>>>> If I am correct Ronie you said you had a script to run to make OSWindow
>>>> work in the latest Pharo version. Can you give it to me so I can use it ? I
>>>> just need keyboard events for my use case.
>>>>
>>>> Btw for some reason in the one-click version of Pharo 32 bits on Mac
>>>> there is 2 SDL plugins (libSDL2-2.0.0 and libSDL2), which leads to
>>>> conflicts (the VM use randomly one lib or the other). I randomly chose one
>>>> that I use and deleted the other one, do you have advises on which one I
>>>> should prefer ? Maybe the events are working only with the other one ?
>>>>
>>>> Thanks
>>>>
>>>
>>>
>>
>

Reply via email to