[Pharo-users] [ANN] Launchpad v4.2.0 [v4.2.0] released!

2021-12-06 Thread Buenos Aires Smalltalk
Launchpad, a command-line interface to start, list, and explain the applications available within the image. reached it's v4.2.0 version.
What's Changed

Provide names for standard stream loggers by @gcotelli in https://github.com/ba-st/Launchpad/pull/28

Full Changelog: https://github.com/ba-st/Launchpad/compare/v4.1.0…v4.2.0
Regards,
The Buenos Aires Smalltalk team


[Pharo-users] Re: [ANN] license selector

2021-12-06 Thread sean
Thanks! Sounds cool…


[Pharo-users] [ANN] Pharo Consortium New Academic Member: LIENSs La Rochelle Université

2021-12-06 Thread Marcus Denker
The Pharo Consortium is very happy to announce that the LIENSs Laboratory of 
the Université La Rochelle has joined the Consortium as an Academic Member.

About

- Laboratoire LIENS: https://lienss.univ-larochelle.fr
- Pharo Consortium: http://consortium.pharo.org


The goal of the Pharo Consortium is to allow companies and institutions to 
support the ongoing development and future of Pharo.
Individuals can support Pharo via the Pharo Association: 
http://association.pharo.org/

[Pharo-users] Re: UFFI callback, getting function pointer

2021-12-06 Thread tomazz . turk
Found the solution! Here it is, if somebody needs the description.

The webview_bind() function in DLL that expects to get a pointer to the 
function in Pharo can be called like this:

```
WebViewLibrary >> bind: webview name: aString callback: aFFICallback arguments: 
aByteString
```

```
^ self ffiCall: #(void webview_bind(void * webview, const char * 
aString, FFICallback aFFICallback, void * aByteString))
```

Before doing the actual call, the callback should be made according to fn 
signature:

```
doIt := FFICallback 
```

```
signature: #( void (const char *seq, const char *req, void * 
arg) )
```

```
block: [ :seq :req :arg | 
```

```
“do the stuff”
```

```
].
```

And the call is then made as:

```
WebViewLibrary new bind: webview name: 'newJsFunctionName' callback: doIt  
arguments: args.
```

The next challenge is, of course, threading ...

Best wishes,\
Tomaz


[Pharo-users] InstanceVariables

2021-12-06 Thread danhunfeldz
```
Object subclass: #Test
instanceVariableNames: 'var1 var2'
classVariableNames: ''
package: 'MyTest'

I was struggling with instanceVariableNames even though they show up under 
methods.  Perhaps I'm just slow, but it wasn't until last night when I was 
reading on Object Pascal and there was an example:

type
  TProjector = class(TTelevision)
Brightness, Temperature: Integer;
procedure Focus(Length: Single);
  end;

Then it finally clicked with me that "var1" and "var2" under instance variables 
in Smalltalk would be like the method "Focus" in Object Pascal.  Is that 
correct, or am I still not getting it?
```


[Pharo-users] Re: InstanceVariables

2021-12-06 Thread Tomaž Turk

Hi,

Instance variables are nicely explained in Pharo by Example in chapter 
6.4 pp 89 http://books.pharo.org/.


Best wishes,
Tomaz


[Pharo-users] Re: UFFI callback, getting function pointer

2021-12-06 Thread Harald VICAIRE
Thanks for sharing the solution mate :)
I don't know if you are aware, but you can also ask questions on Pharo's
discord. Though it's easier to go through the history of conversations by
email.
Cheers,

Harald

Le mar. 7 déc. 2021 à 04:53,  a écrit :

> Found the solution! Here it is, if somebody needs the description.
>
> The webview_bind() function in DLL that expects to get a pointer to the
> function in Pharo can be called like this:
>
> WebViewLibrary >> bind: webview name: aString callback: aFFICallback 
> arguments: aByteString
>
>   ^ self ffiCall: #(void webview_bind(void * webview, const char * 
> aString, FFICallback aFFICallback, void * aByteString))
>
> Before doing the actual call, the callback should be made according to fn
> signature:
>
> doIt := FFICallback
>
>   signature: #( void (const char *seq, const char *req, void * 
> arg) )
>
>   block: [ :seq :req :arg |
>
> “do the stuff”
>
>   ].
>
> And the call is then made as:
>
> WebViewLibrary new bind: webview name: 'newJsFunctionName' callback: doIt  
> arguments: args.
>
> The next challenge is, of course, threading ...
>
> Best wishes,
> Tomaz
>