[Pharo-users] Scrollbar in Spec layout

2016-02-03 Thread LE Xuan Sang
Hello,

I use Spec (Pharo 4) to develop my GUI application.  In my Spec layout, one of 
the columns has a large amount of rows (dynamic content indeed). So i need it 
to be scrollable. Does anyone knows how to add a scrollbar to that column?

Thanks,

LE Sang


Re: [Pharo-users] Scrollbar in Spec layout

2016-02-03 Thread Ben Coman
On Wed, Feb 3, 2016 at 4:45 PM, LE Xuan Sang  wrote:
> Hello,
>
> I use Spec (Pharo 4) to develop my GUI application.  In my Spec layout, one 
> of the columns has a large amount of rows (dynamic content indeed). So i need 
> it to be scrollable. Does anyone knows how to add a scrollbar to that column?
>
> Thanks,
>
> LE Sang

I'm not sure if I'm the one to help you, but could you post a snapshot?
cheers -ben



Re: [Pharo-users] Pharo and OpenMP

2016-02-03 Thread kilon.alios
Thanks for posting the link to the original post , I tried to find it but I
failed. 

On the matter why people did not reply is probably because the idea is too
"vague" and very "theoretical" and probably because the post is long. 

Just for the record I have since dismissed as an idea both the C-image and
shared memory model. The bad news is that Apple does not allow one
executable to run another executable in iOS which means the pretty much
kills the very foundation of my idea and makes it impossible to use Pharo
with Unreal on iOS. 

OpenMP wise again, I found out that Unreal has its own threading model which
is very easy to use and runs under the hood. So I dont need that either. 

 "I guess you won't avoid session management with this idea of memory
mapped C-image, since the external resources provide from the OS like
files, display buffers, network buffers & GPU threads would still be
destroyed by the OS when Pharo exits. Consider the case of moving your
Pharo-image + C-image to another machine. "

No session management is still necessary , the goal was not to make it
redundant but rather to keep live state of the C side. But that of course
that means that this would not work automagically , the C code will have to
use the shared memory mapped file or else the state would be lost. You will
need a session manager to trigger the functions that were running at the
time the c image file was closed but those functions would be able to
continue from where they were left since the state would be restored. 

"Just to clarify (for myself also if someone likes to correct me) I
have gathered the idea that Slang should be thought of less as
Smalltalk compiling to C, and more as C with Smalltalk syntax which
works well with our usual tools.  So compiling Slang to C is "trivial"
compared to compiling general Pharo code to C. The trick I guess would
be dynamically generating and compiling the C code and then linking it
back in.
"

No not really, its actually the first. Slang has a lot of things C can do
that slang cannot do this is why much of the VM is written in C and not
Slang. There you expose another weakness of my idea that Slang would need an
overhaul to do what I want.

"I think applying some kind of OpenMP pragma to random parts of the
image's code would be quite difficult because it of the interaction
with the VM - but if it was restricted to code that ran detached from
the image (e.g. in a separate native or on a GPU) then that could be
interesting -- but I can't think of how you would marshall parameters
and results between them. "

it should not be a problem since the threading would happen in the separate
process that VM does not depend on , pharo would have only access to the
shared memory. So basically it would be like 

Pharo: C calculate this with X many threads and when you finish share the
result in this part of the memory
C  : Sure buddy in a few minutes you will have your result , i will
alert you
Pharo: Thanks mate. 

In any case that was a pure "theoretical" idea, I posted here to find its
weaknesses. I see now its not such a good idea as I initially though for the
above reasons. 

It looks like I wont be using Pharo so much with Unreal afterall since the
only viable solution would be to embed it which currently is not possible at
least the easy way. 

Oh well I may still use Pharo here and there to automate some Blender and
Unreal stuff :) 



--
View this message in context: 
http://forum.world.st/Pharo-and-OpenMP-tp4874277p4875558.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque

Hello,

I can't find the answer by browsing classes comments nor methods so I 
ask the question here :).


Is it possible to put a WindowModel on top of all other windows opened? 
If it is, how?


Thanks in advance,

Julien



Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Stephan Eggermont

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods so I
ask the question here :).

Is it possible to put a WindowModel on top of all other windows opened?
If it is, how?


I'm not sure where you are looking for, but did you look at the WorldModel?

Stephan





Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque



On 03/02/16 12:33, Stephan Eggermont wrote:

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods so I
ask the question here :).

Is it possible to put a WindowModel on top of all other windows opened?
If it is, how?


I'm not sure where you are looking for, but did you look at the 
WorldModel?


Stephan



I looked at WindowModel and, because of your mail, also at WorldModel 
but I still do not find how to put the window on top of all the others...


Julien



Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque


On 03/02/16 12:33, Stephan Eggermont wrote:

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods so I
ask the question here :).

Is it possible to put a WindowModel on top of all other windows opened?
If it is, how?


I'm not sure where you are looking for, but did you look at the 
WorldModel?


Stephan



How, a little precision, when I say "Is it possible to put a WindowModel 
on top of all other windows opened?" I mean programatically of course :p.


Julien



Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Sven Van Caekenberghe
 window activate ?

> On 03 Feb 2016, at 13:03, Julien Delplanque  wrote:
> 
> 
> On 03/02/16 12:33, Stephan Eggermont wrote:
>> On 03-02-16 12:14, Julien Delplanque wrote:
>>> Hello,
>>> 
>>> I can't find the answer by browsing classes comments nor methods so I
>>> ask the question here :).
>>> 
>>> Is it possible to put a WindowModel on top of all other windows opened?
>>> If it is, how?
>> 
>> I'm not sure where you are looking for, but did you look at the WorldModel?
>> 
>> Stephan
>> 
>> 
>> 
> How, a little precision, when I say "Is it possible to put a WindowModel on 
> top of all other windows opened?" I mean programatically of course :p.
> 
> Julien
> 




Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Stephan Eggermont

On 03-02-16 12:59, Julien Delplanque wrote:

I looked at WindowModel and, because of your mail, also at WorldModel
but I still do not find how to put the window on top of all the others...


There is

  openWorldWithSpec

as used in PharoLauncher.

Are you looking for a (modal) dialog or building a custom application 
with no pharo IDE? Spec does not have fine-grained control over layers,

for that you need the Morphic level, where you can say e.g.

setProperty: #morphicLayerNumber toValue: 18.

to be on top of normal windows.

Stephan




Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque



On 03/02/16 13:14, Stephan Eggermont wrote:

On 03-02-16 12:59, Julien Delplanque wrote:

I looked at WindowModel and, because of your mail, also at WorldModel
but I still do not find how to put the window on top of all the 
others...


There is

  openWorldWithSpec

as used in PharoLauncher.

Are you looking for a (modal) dialog or building a custom application 
with no pharo IDE? Spec does not have fine-grained control over layers,

for that you need the Morphic level, where you can say e.g.

setProperty: #morphicLayerNumber toValue: 18.

to be on top of normal windows.

Stephan



I am building a custom application. Ok, so I need to work at Morph level.
To retrieve the morph associated with the WindowModel, do I need to use 
World submorphs and detect it or is there another way?


If I retrieve the SpecWindow, I can simply send #activate to put the 
window to the top...


Julien




Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque

Ok I found how to do it:

myWidget window window activate.

Some observations:
"myWidget window" gives a WindowModel which inherits from 
AbstractWidgetModel and does not have #activate message.
"myWidget window window" gives a SpecWindow which inherits from 
StandardWindow, a morph.


Thanks a lot for the help!

Julien

On 03/02/16 13:16, Sven Van Caekenberghe wrote:

 window activate ?


On 03 Feb 2016, at 13:03, Julien Delplanque  wrote:


On 03/02/16 12:33, Stephan Eggermont wrote:

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods so I
ask the question here :).

Is it possible to put a WindowModel on top of all other windows opened?
If it is, how?

I'm not sure where you are looking for, but did you look at the WorldModel?

Stephan




How, a little precision, when I say "Is it possible to put a WindowModel on top of 
all other windows opened?" I mean programatically of course :p.

Julien








Re: [Pharo-users] Scrollbar in Spec layout

2016-02-03 Thread LE Xuan Sang
Hello,

Here goes an example snapshot of my problem.

Cheer,

Sang


MultiRowInColumn.st
Description: Binary data


> Date: Wed, 3 Feb 2016 16:59:01 +0800
> From: Ben Coman 
> To: Any question about pharo is welcome 
> Subject: Re: [Pharo-users] Scrollbar in Spec layout
> Message-ID:
>   
> Content-Type: text/plain; charset=UTF-8
> 
> On Wed, Feb 3, 2016 at 4:45 PM, LE Xuan Sang  wrote:
>> Hello,
>> 
>> I use Spec (Pharo 4) to develop my GUI application.  In my Spec layout, one 
>> of the columns has a large amount of rows (dynamic content indeed). So i 
>> need it to be scrollable. Does anyone knows how to add a scrollbar to that 
>> column?
>> 
>> Thanks,
>> 
>> LE Sang
> 
> I'm not sure if I'm the one to help you, but could you post a snapshot?
> cheers -ben
> 
> 



[Pharo-users] an example of debugging with moldable tools

2016-02-03 Thread Tudor Girba
Hi,

One thing we noticed over the past year since we introduced GT in Pharo is that 
people still tend to use these tools in a similar way classic tools were used. 
We think there is a more potential in these tools.

To change this, we would like to collect stories of how using these tools 
enabled a workflow that was otherwise not possible. To get this started, we 
will start to document more consistently some of the sessions, and we would 
like to get input from your as well. The idea is to create a catalog of 
tutorials that people can follow and get inspired from.

Let me start. I recently had to debug a small problem, and I ended up having an 
experience that I found beautiful:
http://www.humane-assessment.com/blog/debugging-duplicated-behavior-with-gtinspector/

What do you think?

Cheers,
Doru


--
www.tudorgirba.com
www.feenk.com

"Don't give to get. Just give."









Re: [Pharo-users] [Moose-dev] an example of debugging with moldable tools

2016-02-03 Thread Serge Stinckwich
On Wed, Feb 3, 2016 at 2:53 PM, Tudor Girba  wrote:
> Hi,
>
> One thing we noticed over the past year since we introduced GT in Pharo is 
> that people still tend to use these tools in a similar way classic tools were 
> used. We think there is a more potential in these tools.
>
> To change this, we would like to collect stories of how using these tools 
> enabled a workflow that was otherwise not possible. To get this started, we 
> will start to document more consistently some of the sessions, and we would 
> like to get input from your as well. The idea is to create a catalog of 
> tutorials that people can follow and get inspired from.
>
> Let me start. I recently had to debug a small problem, and I ended up having 
> an experience that I found beautiful:
> http://www.humane-assessment.com/blog/debugging-duplicated-behavior-with-gtinspector/
>
> What do you think?

Great and enlightening work ! Actually, we spend more than one hour on
this bug during last Pharo Sprint with Onil.
We trace the problem to be linked to the duplication of Announcement
creation somewhere, but we miss your
knowledge ;-)

-- 
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/



[Pharo-users] Create type(class) dynamically

2016-02-03 Thread Khrystyna Mykhailiuk
Hi, all!

Is it possible in Pharo to create a type (class) dynamically? 
Not using special space for it, but create type by running method of another
class.

Thanks,
Khrystyna.



--
View this message in context: 
http://forum.world.st/Create-type-class-dynamically-tp4875651.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Create type(class) dynamically

2016-02-03 Thread Julien Delplanque

Hi,

You can create a class programatically using:

ParentClass subclass: #ClassName
instanceVariableNames: 'instVar1 instVar2'
classVariableNames: ''
category: 'APackage'

Then you can add method using:

ClassName compile: 'helloWorld
^''Hello world!'''

for example.

I don't know if this answer you question?

Julien

On 03/02/16 20:48, Khrystyna Mykhailiuk wrote:

Hi, all!

Is it possible in Pharo to create a type (class) dynamically?
Not using special space for it, but create type by running method of another
class.

Thanks,
Khrystyna.



--
View this message in context: 
http://forum.world.st/Create-type-class-dynamically-tp4875651.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.






Re: [Pharo-users] Create type(class) dynamically

2016-02-03 Thread Khrystyna Mykhailiuk
I was a little confused about it. But now I understand.
Thank you very much.

2016-02-03 22:09 GMT+02:00 Julien Delplanque [via Smalltalk] <
ml-node+s1294792n4875655...@n4.nabble.com>:

> Hi,
>
> You can create a class programatically using:
>
> ParentClass subclass: #ClassName
>  instanceVariableNames: 'instVar1 instVar2'
>  classVariableNames: ''
>  category: 'APackage'
>
> Then you can add method using:
>
> ClassName compile: 'helloWorld
>  ^''Hello world!'''
>
> for example.
>
> I don't know if this answer you question?
>
> Julien
>
> On 03/02/16 20:48, Khrystyna Mykhailiuk wrote:
>
> > Hi, all!
> >
> > Is it possible in Pharo to create a type (class) dynamically?
> > Not using special space for it, but create type by running method of
> another
> > class.
> >
> > Thanks,
> > Khrystyna.
> >
> >
> >
> > --
> > View this message in context:
> http://forum.world.st/Create-type-class-dynamically-tp4875651.html
> > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
> >
>
>
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Create-type-class-dynamically-tp4875651p4875655.html
> To unsubscribe from Create type(class) dynamically, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://forum.world.st/Create-type-class-dynamically-tp4875651p4875657.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread stepharo

I do not like the API :)


Le 3/2/16 13:35, Julien Delplanque a écrit :

Ok I found how to do it:

myWidget window window activate.

Some observations:
"myWidget window" gives a WindowModel which inherits from 
AbstractWidgetModel and does not have #activate message.
"myWidget window window" gives a SpecWindow which inherits from 
StandardWindow, a morph.


Thanks a lot for the help!

Julien

On 03/02/16 13:16, Sven Van Caekenberghe wrote:

 window activate ?


On 03 Feb 2016, at 13:03, Julien Delplanque  wrote:


On 03/02/16 12:33, Stephan Eggermont wrote:

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods so I
ask the question here :).

Is it possible to put a WindowModel on top of all other windows 
opened?

If it is, how?
I'm not sure where you are looking for, but did you look at the 
WorldModel?


Stephan



How, a little precision, when I say "Is it possible to put a 
WindowModel on top of all other windows opened?" I mean 
programatically of course :p.


Julien












Re: [Pharo-users] Simple question about Spec

2016-02-03 Thread Julien Delplanque
To match my needs, I simply added an extension to WindowModel with the 
message #activate.


So I do not need to do "myWidget window window activate".

Julien

On 04/02/16 08:17, stepharo wrote:

I do not like the API :)


Le 3/2/16 13:35, Julien Delplanque a écrit :

Ok I found how to do it:

myWidget window window activate.

Some observations:
"myWidget window" gives a WindowModel which inherits from 
AbstractWidgetModel and does not have #activate message.
"myWidget window window" gives a SpecWindow which inherits from 
StandardWindow, a morph.


Thanks a lot for the help!

Julien

On 03/02/16 13:16, Sven Van Caekenberghe wrote:

 window activate ?


On 03 Feb 2016, at 13:03, Julien Delplanque  wrote:


On 03/02/16 12:33, Stephan Eggermont wrote:

On 03-02-16 12:14, Julien Delplanque wrote:

Hello,

I can't find the answer by browsing classes comments nor methods 
so I

ask the question here :).

Is it possible to put a WindowModel on top of all other windows 
opened?

If it is, how?
I'm not sure where you are looking for, but did you look at the 
WorldModel?


Stephan



How, a little precision, when I say "Is it possible to put a 
WindowModel on top of all other windows opened?" I mean 
programatically of course :p.


Julien















[Pharo-users] Another question about Spec

2016-02-03 Thread Julien Delplanque

Hey,

I use drag and drop between two lists in a project and I read this 
tutorial [1] to learn how to do it.


My question is: Is there a way to have another object than a String as 
passengers in #acceptDropBlock: (I get passengers the same way as in the 
tutorial i.e sending #passenger to transfer object) like the objects 
really in the list? Because if I use #displayBlock: it became difficult 
to be sure I retrieve the object I dropped in the source list...


Thanks in advance,

Julien

[1]: http://spec.st/docs/drag_n_drop/