[Pharo-users] SDL2 and fork

2015-04-09 Thread Matthieu Lacaton
Hello everyone, I tried to use the SDL2 binding to Pharo to create a very basic 2D application (just some sprites and events) and it worked great. The issue I have is that when I start my application, as long as I have an active SDL window, I can't use my Pharo image anymore (it freezes). To solve

Re: [Pharo-users] SDL2 and fork

2015-04-19 Thread Matthieu Lacaton
> Hi Matthieu, > > This is important: Binding SDL with Pharo will help Roassal to get better. > Please, let us know how it goes > > Alexandre > > > > On Apr 9, 2015, at 12:54 PM, Matthieu Lacaton < > matthieu.laca...@gmail.com> wrote: > > > > Hell

Re: [Pharo-users] SDL2 and fork

2015-04-20 Thread Matthieu Lacaton
This is strange, I don't know exactly how the SDL event processing can influence the main window events. >>> Maybe this has something to do how we look for new events in the SDL2DisplayPlugin. >>> For me the call to SDL_PumpEvents looks unnecessary, maybe this is the cause? >>>

[Pharo-users] Some Athens modifications ?

2015-05-06 Thread Matthieu Lacaton
Hello everybody, I was playing arround with Athens lately and I think I encountered a few small bugs along the way (I may be wrong though) : 1) In *LinearGradientPaint class >> from:* aStartPoint *to:* aStopPoint There is a call to the method *"initializeFrom: aStartPoint to: aStopPoint"* but thi

[Pharo-users] MouseWheel events

2015-05-06 Thread Matthieu Lacaton
Hello everyone, I have a question about MouseWheel events in Pharo. On Linux, when I use the wheel of my mouse the event I get in return is an instance of MouseWheelEvent : *" [(606@633) mouseWheel Character arrowDown CTRL 33261828 nil] "* When I press "CTRL + ArrowUp" or "CTRL + ArrowDown" on m

[Pharo-users] SDL plugin ?

2015-05-06 Thread Matthieu Lacaton
Hello, I am currently playing with OSWindow and I am wondering what the "SDL plugin" is in the OSSDL2Driver ? When I downloaded the latest linux VM + image I got a library called libSDL2DisplayPlugin but how can I get this plugin for windows ? Is it possible to get the source code too ? Thanks, M

Re: [Pharo-users] SDL plugin ?

2015-05-06 Thread Matthieu Lacaton
ibsdl.org/release/SDL2-2.0.1.zip > > The compiled plugin for windows can be found inside the last vm here: > http://files.pharo.org/get-files/40/pharo-win-latest.zip > > Cheers, > Merwan > > > On 06/05/2015 21:48, Matthieu Lacaton wrote: > > Hello, I am currently playing

Re: [Pharo-users] MouseWheel events

2015-05-10 Thread Matthieu Lacaton
at on Linux I just can't ? And does this mean that if I create an application able to react to mouse wheel, I need to code it differently for Windows and for Linux ? Matthieu 2015-05-06 23:55 GMT+02:00 Sean P. DeNigris : > Matthieu Lacaton wrote > > Shouldn't I get a MouseWh

Re: [Pharo-users] MouseWheel events

2015-05-10 Thread Matthieu Lacaton
sewheel events are indeed created so it is my fault for not using the latest VM :) Thanks a lot ! 2015-05-11 2:34 GMT+02:00 Sean P. DeNigris : > Matthieu Lacaton wrote > > Let's say for example thant I want to create a rectangle on the screen > and > > be able to move it up

Re: [Pharo-users] MouseWheel events

2015-05-12 Thread Matthieu Lacaton
Le 11/5/15 02:34, Sean P. DeNigris a écrit : > Matthieu Lacaton wrote > >> Let's say for example thant I want to create a rectangle on the screen and >> be able to move it up and down by pressing CTRL + up / down arrow and be >> able to rotate it with the mouse wheel.

[Pharo-users] Moving the HandMorph

2015-05-12 Thread Matthieu Lacaton
Hello everybody, Is there a way to move the position of the cursor (the HandMorph) by passing commands to it ? I tried things like "ActiveHand position:" or "ActiveHand moveToEvent:" but nothing worked for me. Thanks, Matthieu

Re: [Pharo-users] Moving the HandMorph

2015-05-12 Thread Matthieu Lacaton
Okay. That was 2 years ago so I was wondering if something had changed since then but apparently not. Thanks a lot, Matthieu 2015-05-12 17:51 GMT+02:00 Nicolai Hess : > > > 2015-05-12 17:40 GMT+02:00 Matthieu Lacaton : > >> Hello everybody, >> >> Is there a w

Re: [Pharo-users] Moving the HandMorph

2015-05-12 Thread Matthieu Lacaton
> > Or maybe have a look at HandMorphForReplay in > http://forum.world.st/ANN-EventRecorderMorph-Port-to-3-0-td4736258.html Oh I didn't know about that, I'll definitely have a look at it, it seems cool ! Thanks, Matthieu 2015-05-12 17:57 GMT+02:00 Matthieu Lacaton : &

Re: [Pharo-users] Moving the HandMorph

2015-05-13 Thread Matthieu Lacaton
Hello again, Just for the record, the EventRecorder source code allowed me to solve my problem. It is apparently not possible to move the main HandMorph but you can create a new secondary one and move it wherever you want ! Thanks again, Matthieu 2015-05-12 17:59 GMT+02:00 Matthieu Lacaton

[Pharo-users] PharoCommonTools methods

2015-05-25 Thread Matthieu Lacaton
Hello everyone, It's probably a silly question but there is something I don't understand in the PharoCommonTools class. There are many methods in this class that i can't find in the image. For example, *PharoCommonTools >> workspaceTool* refers to "*self workspace*" but I can't find any method na

Re: [Pharo-users] PharoCommonTools methods

2015-05-25 Thread Matthieu Lacaton
Oh yes thx Nicolai, I did not look in the #doesNotUnderstand method. What is the main purpose of doing this instead of actually implementing a method ? 2015-05-25 19:20 GMT+02:00 Nicolai Hess : > > > 2015-05-25 18:27 GMT+02:00 Matthieu Lacaton : > >> Hello everyone, >>

[Pharo-users] Slice for a non Pharo package ?

2015-05-30 Thread Matthieu Lacaton
Hello, I reported a bug on Athens here : https://pharo.fogbugz.com/f/cases/15640/ I also created a slice to solve it by following the Pharo fogbugz video tutorial. But then I realized that Athens is not present in Pharo/main so it would not make sense to commit the slice into the Pharo Inbox. Wh

[Pharo-users] NativeBoost pointer and "+"

2015-06-08 Thread Matthieu Lacaton
Hello everyone, I have a small question about NativeBoost : How does the "+" operator when applied to a pointer translates into NativeBoost code ? To give a bit of context, what I want to do is to reallocate some non-contiguous bytes in memory to a buffer. Basically, I have an array of integers i

Re: [Pharo-users] NativeBoost pointer and "+"

2015-06-09 Thread Matthieu Lacaton
n. Cheers, Matthieu 2015-06-08 19:56 GMT+02:00 Henrik Johansen : > > > On 08 Jun 2015, at 4:41 , Matthieu Lacaton > wrote: > > > > Hello everyone, > > > > I have a small question about NativeBoost : How does the "+" operator > when applied to a pointer

Re: [Pharo-users] NativeBoost pointer and "+"

2015-06-09 Thread Matthieu Lacaton
dr := self allocate: somespace. > > newAddr := NBExternalAddress value: addr value + someoffset. > > or > > newAddr := addr copy value: addr value + someoffset > > sure, it is up to you then, how to calculate offsets and buffer size(s) as > well as allocating/deallocating mem

[Pharo-users] NativeBoost nested structures

2015-06-15 Thread Matthieu Lacaton
Hello everyone, I have a nested struct, let's say "struct1" which contains "struct2" which contains an int field named "field". When I try to update the field from struct 1 directly I can't. What I mean is if I do : "struct1 struct2 field: 4" for instance, the value in field is not updated. Even

Re: [Pharo-users] NativeBoost nested structures

2015-06-16 Thread Matthieu Lacaton
> > Are you bound to exactly this structure? > If you can define the structure, you can use a nested structure that uses > pointers instead of values: > > NBTestNestedStructure2>> > fieldsDesc > > ^ #( > NBTestStructure1byte* oneByte; > int otherField > ) > > Now you can

[Pharo-users] Athens and radial gradient

2015-06-18 Thread Matthieu Lacaton
Hello, I wanted to use Athens API to define a radial gradient and I saw that the class RadialGradientPaint only had one radius as instance variable and it seemed to me it was passed as the end radius while the start radius was set to 0. Does it mean that if I want to define a start radius differen

Re: [Pharo-users] Setting GUI pointer's position

2015-06-29 Thread Matthieu Lacaton
Hello, I asked the same thing some time ago and here are the answers I got : http://forum.world.st/Moving-the-HandMorph-td4826025.html Maybe it will give you ideas. As I said at the end, I did not find how to move the active hand but you can create another one and move this one. I don't know if

Re: [Pharo-users] Setting GUI pointer's position

2015-06-29 Thread Matthieu Lacaton
other hand and make it take the place of the existing hand > and move it (so the effect would be like moving the hand) > > On Mon, Jun 29, 2015 at 11:33 AM, Matthieu Lacaton < > matthieu.laca...@gmail.com> wrote: > >> Hello, >> >> I asked the same th

Re: [Pharo-users] an elegant way to return a result

2015-07-01 Thread Matthieu Lacaton
This whole conversation really makes me want to ask: How do you know if some code is bad, good or completely ugly ? I've not been programming for long but I've already heard sentences like this: "Damn this piece of code is so bad !" so often that I am really wondering. What are the rules ? Performa

Re: [Pharo-users] an elegant way to return a result

2015-07-03 Thread Matthieu Lacaton
Well, thanks for the documentation, the first article was quite interesting and I'm gonna get this book asap :) When you execute a block (far away from the place it was created), it acts > as an exception, it stops the execution of currently executed methods and > return to its home context (metho

[Pharo-users] I probably messed up with .changes...

2015-07-06 Thread Matthieu Lacaton
Hello, I would just like to report something that happened to me today. As I was working on a project, I tried inserting an instance variable to one of my classes. Starting from this moment something became very weird. First, some subclasses were not listed as subclasses anymore, then I realised

Re: [Pharo-users] I probably messed up with .changes...

2015-07-06 Thread Matthieu Lacaton
the methods you modified and I don't have any small .changes file. I am still quite unsure at this point. 2015-07-06 10:36 GMT+02:00 Nicolai Hess : > > > 2015-07-06 9:55 GMT+02:00 Matthieu Lacaton : > >> Hello, >> >> I would just like to report something that happe

Re: [Pharo-users] I probably messed up with .changes...

2015-07-07 Thread Matthieu Lacaton
name. Moreover, > when doing so you end up with a new .changes file which is very small and > has the source code of the methods you modified and I don't have any small > .changes file. > > I am still quite unsure at this point. > > 2015-07-06 10:36 GMT+02:00 Nicolai Hes

[Pharo-users] NativeBoost and variadic functions

2015-07-10 Thread Matthieu Lacaton
Hello, Is it possible with NativeBoost to create a binding for a variadic function ? I've seen the printf example in NBCPrinter but this implementation is kind of cheating since it always pass just a %s as format and one already formatted string to the C function. I've written a simple variadic

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-15 Thread Matthieu Lacaton
ux), it seemed to work for every type of argument except "float". It works fine for "double" though. For "char" you need to pass the integer ASCII value directly for it to work. I tried with "Character value: xxx" but it didn't work. I know that this

Re: [Pharo-users] NativeBoost and variadic functions

2015-07-16 Thread Matthieu Lacaton
-16 18:33 GMT+02:00 Igor Stasenko : > > > On 15 July 2015 at 11:16, Matthieu Lacaton > wrote: > >> Hello Igor, >> >> Thanks for your answer. >> >> I implemented something like that for the printf function: >> Basically, it generates a met

[Pharo-users] NativeBoost and OpenMP

2015-07-16 Thread Matthieu Lacaton
Hello, I haven't really seen anything related to this on the Internet and maybe some people will find it cool so I just wanted to report one thing I found out today : NativeBoost works great with OpenMP ! I wrote a C function twice, once with openMP and once without. I made 32 bits libraries and

[Pharo-users] How to correctly boost performances with Nativeboost ?

2015-07-17 Thread Matthieu Lacaton
Hello everyone, I know, I come up with another question involving NativeBoost ... Sorry ! Anyway, I am currently trying to improve the performance of a Pharo application by trying to rewrite some parts in C and use them with NativeBoost. In the application, there is a need to compute a lot of 2D

Re: [Pharo-users] Announcments vs Events schism

2015-07-28 Thread Matthieu Lacaton
It seems to me that sometimes the difference is a bit blurry. I used to consider announcements like some kinds of user-generated events, but I may be wrong here :/ I'll use SDL as an example because this is the technology chosen for Pharo. In SDL the concept of announcement does not exist. However

Re: [Pharo-users] FileLocator problem?

2015-07-30 Thread Matthieu Lacaton
Windows 7 uses "aliases" for these directories. It is the way different languages or owners are handled. For example in French you can see your music directory as "Ma Musique" but the real name used in paths is actually "Music". As Craig said, the default paths for these directories are : "C:\User