Re: [Pharo-users] Class versions

2017-03-20 Thread Stephane Ducasse
What are multiple versions of a classes?

We are working on a module system for Pharo. The prototype is making
progress. You will be able to have different classes with the same name in
different classes.

Stef

On Sun, Mar 19, 2017 at 2:16 PM, Norbert Hartl  wrote:

> How far are we to support multiple versions of the same class in an image?
> Are there existing approaches?
>
> Norbert
>
>
>
>
> Von meinem iPad gesendet
>
>


Re: [Pharo-users] OSProcess or OSSubprocess?

2017-03-20 Thread Hernán Morales Durand
I just tested and it works nice!! Thank you Mariano.

Just a quick note, to read from /var/log requires root privilege which many
users cannot acquire. I tested using a bash script and then tailf the
output file:

#!/bin/sh

while true; do
  echo $(date)
  sleep 2
done > output.txt


Cheers,

Hernán

2017-03-20 8:24 GMT-03:00 Mariano Martinez Peck :

>
> On Mon, Mar 20, 2017 at 6:00 AM, Hernán Morales Durand <
> hernan.mora...@gmail.com> wrote:
>
>> Hi guys,
>>
>> I need to monitor Unix command execution inside the image. The commands
>> use heavy computation so they usually report progress in the terminal.
>>
>> Are OSProcess or OSSubprocess ready to do in-image monitoring so I can
>> watch the same terminal output in the Transcript updating for example every
>> 10 seconds?
>>
>>
> Hi Hernan,
>
> There is a tail -f example in OSSubprocess documentation that prints the
> result on an inpsector and updates it [1]. However, OSSubprocess has
> problems on Linux with the default VM... you must use the threaded
> heartbeat (not the itimer).. see recent threads discussions for this.
>
> Let me know if that works.
>
>
> [1] https://github.com/marianopeck/OSSubprocess#processing-streams-while-
> running
>
>
>
>> Particularly for OSProcess I couldn't find any method to fetch partial
>> output.
>>
>> Cheers,
>>
>> Hernán
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>


Re: [Pharo-users] Pharo 5 ODBC

2017-03-20 Thread Offray Vladimir Luna Cárdenas

I'm using UDBC2 without any problem. Try this:

~~~

Gofer it
smalltalkhubUser: 'TorstenBergmann' project: 'UDBC';
configuration;
load.
(Smalltalk at: #ConfigurationOfUDBC) loadBleedingEdge.

~~~

Cheers,

Offray

On 20/03/17 15:28, Glenn Swanlund wrote:

Hi,

I'm trying to connect to a .xls file on Windows 7. I will also need to 
connect to an Access database. My application database is SQLite3.


I used the following excerpt from an email I found:

Gofer it
smalltalkhubUser: 'TorstenBergmann' project: 'UDBC';
configuration;
load.
(Smalltalk at: #ConfigurationOfUDBC) loadBleedingEdge.
Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'GarageGlorp';
load.
#ConfigurationOfGarageGlorp asClass project stableVersion load.
Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Glorp';
package: 'Glorp-SQLite3';
load.
GlorpSQLite3CIConfiguration new configureSqlite3.
GlorpDemoTablePopulatorResource invalidateSetup.


On Mon, Mar 20, 2017 at 1:12 PM, Benoit St-Jean via Pharo-users 
mailto:pharo-users@lists.pharo.org>> wrote:




-- Forwarded message --
From: Benoit St-Jean mailto:bstj...@yahoo.com>>
To: Any question about pharo is welcome
mailto:pharo-users@lists.pharo.org>>
Cc:
Bcc:
Date: Mon, 20 Mar 2017 20:12:48 + (UTC)
Subject: Re: [Pharo-users] Pharo 5 ODBC
Can you give the URL of what exactly you loaded?  There's a bunch
of ODBC packages/versions out there so I'd need more details. 
I've used ODBC on Pharo 5 before without any problem.  Besides,

what OS and database are you using?
-
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com

"A standpoint is an intellectual horizon of radius zero".  (A.
Einstein)



*From:* Glenn Swanlund mailto:glennswanl...@gmail.com>>
*To:* pharo-users@lists.pharo.org

*Sent:* Monday, March 20, 2017 3:50 PM
*Subject:* [Pharo-users] Pharo 5 ODBC

Does Pharo 5 support ODBC? I loaded the UDBC package and can't see
how to make an ODBC connection. There is a class
UDBCODBCConnection but it is empty. Any pointers?

Regards,
Glenn








Re: [Pharo-users] Pharo 5 ODBC

2017-03-20 Thread Glenn Swanlund
Hi,

I'm trying to connect to a .xls file on Windows 7. I will also need to
connect to an Access database. My application database is SQLite3.

I used the following excerpt from an email I found:

Gofer it
smalltalkhubUser: 'TorstenBergmann' project: 'UDBC';
configuration;
load.
(Smalltalk at: #ConfigurationOfUDBC) loadBleedingEdge.

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Garage';
configurationOf: 'GarageGlorp';
load.
#ConfigurationOfGarageGlorp asClass project stableVersion load.

Gofer it
smalltalkhubUser: 'DBXTalk' project: 'Glorp';
package: 'Glorp-SQLite3';
load.

GlorpSQLite3CIConfiguration new configureSqlite3.
GlorpDemoTablePopulatorResource invalidateSetup.


On Mon, Mar 20, 2017 at 1:12 PM, Benoit St-Jean via Pharo-users <
pharo-users@lists.pharo.org> wrote:

>
>
> -- Forwarded message --
> From: Benoit St-Jean 
> To: Any question about pharo is welcome 
> Cc:
> Bcc:
> Date: Mon, 20 Mar 2017 20:12:48 + (UTC)
> Subject: Re: [Pharo-users] Pharo 5 ODBC
> Can you give the URL of what exactly you loaded?  There's a bunch of ODBC
> packages/versions out there so I'd need more details.  I've used ODBC on
> Pharo 5 before without any problem.  Besides, what OS and database are you
> using?
>
> -
> Benoît St-Jean
> Yahoo! Messenger: bstjean
> Twitter: @BenLeChialeux
> Pinterest: benoitstjean
> Instagram: Chef_Benito
> IRC: lamneth
> Blogue: endormitoire.wordpress.com
> "A standpoint is an intellectual horizon of radius zero".  (A. Einstein)
>
>
> --
> *From:* Glenn Swanlund 
> *To:* pharo-users@lists.pharo.org
> *Sent:* Monday, March 20, 2017 3:50 PM
> *Subject:* [Pharo-users] Pharo 5 ODBC
>
> Does Pharo 5 support ODBC? I loaded the UDBC package and can't see how to
> make an ODBC connection. There is a class UDBCODBCConnection but it is
> empty. Any pointers?
>
> Regards,
> Glenn
>
>
>
>


Re: [Pharo-users] Pharo 5 ODBC

2017-03-20 Thread Benoit St-Jean via Pharo-users
--- Begin Message ---
Can you give the URL of what exactly you loaded?  There's a bunch of ODBC 
packages/versions out there so I'd need more details.  I've used ODBC on Pharo 
5 before without any problem.  Besides, what OS and database are you using?
 - 
Benoît St-Jean 
Yahoo! Messenger: bstjean 
Twitter: @BenLeChialeux 
Pinterest: benoitstjean 
Instagram: Chef_Benito
IRC: lamneth 
Blogue: endormitoire.wordpress.com 
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)

  From: Glenn Swanlund 
 To: pharo-users@lists.pharo.org 
 Sent: Monday, March 20, 2017 3:50 PM
 Subject: [Pharo-users] Pharo 5 ODBC
   
Does Pharo 5 support ODBC? I loaded the UDBC package and can't see how to make 
an ODBC connection. There is a class UDBCODBCConnection but it is empty. Any 
pointers?
Regards,Glenn

   --- End Message ---


[Pharo-users] Pharo 5 ODBC

2017-03-20 Thread Glenn Swanlund
Does Pharo 5 support ODBC? I loaded the UDBC package and can't see how to
make an ODBC connection. There is a class UDBCODBCConnection but it is
empty. Any pointers?

Regards,
Glenn


Re: [Pharo-users] Class versions

2017-03-20 Thread Dale Henrichs

Norbert.

Are you thinking of GemStone-style class versions for Pharo?

Dale

On 03/19/2017 06:16 AM, Norbert Hartl wrote:

How far are we to support multiple versions of the same class in an image? Are 
there existing approaches?

Norbert




Von meinem iPad gesendet






Re: [Pharo-users] MetaLinks with arbitrary number of arguments

2017-03-20 Thread denker

> On 20 Mar 2017, at 16:34, denker  wrote:
> 
> Hi,
> 
> Here is a slice that implements the  #argsAsArray option:
> 
>   https://pharo.fogbugz.com/f/cases/19857/add-option-argsAsArray
> 
> from a speed perspective, the question is if a dictionary makes sense… as it 
> would
> need to be created at runtime.
> 

This test show how to use it:

testReifySendArgsAsArray
| sendNode instance|
sendNode := (ReflectivityExamples>>#exampleMethod) ast body statements 
first value.
link := MetaLink new 
metaObject: self; 
selector: #tagExec:;
arguments: #(selector context);
options: #(argsAsArray).
sendNode link: link.
self assert: sendNode hasMetalink.
self assert: (ReflectivityExamples>>#exampleMethod) class = 
ReflectiveMethod.
self assert: (tag isNil).
instance := ReflectivityExamples new .
self assert: (instance exampleMethod = 5).
self assert: (tag isArray).
self assert: (tag first == #+).
self assert: (tag second class == Context).





Re: [Pharo-users] MetaLinks with arbitrary number of arguments

2017-03-20 Thread denker
Hi,

Here is a slice that implements the  #argsAsArray option:
 
https://pharo.fogbugz.com/f/cases/19857/add-option-argsAsArray

from a speed perspective, the question is if a dictionary makes sense… as it 
would
need to be created at runtime.

Marcus

> On 15 Mar 2017, at 11:25, denker  wrote:
> 
> 
>> On 15 Mar 2017, at 11:09, Peter Uhnak  wrote:
>> 
>> On Wed, Mar 15, 2017 at 10:49:51AM +0100, denker wrote:
>>> 
 On 15 Mar 2017, at 10:35, Peter Uhnak  wrote:
 
 Hi,
 
 is it possible to create a metalink on arbitrary amount of arguments?
 
 Right now the metaObject and selector must have the same number of 
 arguments, e.g.
 
 MetaLink new
metaObject: [ :object :selector :args | ... ];
selector: #value:value:value;
arguments: #(object selector arguments)
 
 
 What I would like to have instead is something like...
 
 MetaLink new
metaObject: [ :allArgs | ... ];
selector: #value:;
arguments: #(object selector arguments)
 
 
 And then `allArgs` would either be an array with all the arguments, or 
 maybe a Dictionary.
 
>>> 
>>> Right now not… but it would be a nice addition. 
>>> 
>>> It could either use some magic (if the number of args requested are larger 
>>> then the number of args
>>> of the selector it gives the rest as a dictionary).
>>> 
>>> or, maybe better (less magic), this could be an option to be configured per 
>>> link:
>>> 
>>> 
>>> MetaLink new
>>> metaObject: [ :allArgs | ... ];
>>> selector: #value:;
>>> arguments: #(object selector arguments)
>>> options: #(argsAsDictionary)
>>> 
>>> (which would allow #argsAsArray, too).
>>> 
>>> Marcus
>> 
>> 
>> +1 for option, magic only brings suffering. :)
>> 
> 
> This should be easy.. I will look into it hopefully this week.
> 
>   Marcus
> 




[Pharo-users] read, display, and annotate MS Word and PDF files?

2017-03-20 Thread David Epstein
Hi folks. I am considering trying Pharo for a project but am unfamiliar with 
Smalltalk. I'm attracted by the close integration between language and IDE. Are 
there native libraries that would allow me to read, display, and annotate (e.g. 
add comments & highlighting) to MS Word and PDF files? If not, is it easy to 
call libraries intended for other languages, such as http://www.foxitsdk.com/ ?


Thank you,

-david









Re: [Pharo-users] Magritte extension

2017-03-20 Thread Esteban A. Maringolo
2017-03-20 7:18 GMT-03:00 Otto Behrens :
> Hi,
>
> We also made several sub-classes of Magritte classes and / or
> components. This causes a lot of problems because when we upgraded
> Magritte it was difficult. It also shows that Magritte (the core
> classes) cannot change much because the impact will be high for most
> users of Magritte. This makes us think that Magritte is not easy to
> use or customise. And it also appears as if all the custom changes are
> not being generalised into the framework. Perhaps us users of Magritte
> should stand back and discuss our changes and issues more so that we
> can improve it? I suppose we need some magritte champion(s) to take it
> somewhere.
>
> To get more flexibility with Magritte styling we are using CSS and
> classes more in stead of rendering in a different way. Often one can
> get away with adding a CSS class and changing the style sheet.
>
> This is a bit fluffy, but it there's a lot of stuff to talk about
> here. In principle, are you sharing my frustration with Magritte?

I'm not frustrated, but I share the feeling that we're missing
valuable contributions from other users.

The thing with Magritte is that everything is done by subclassing, the
metamodel part (MADescription subclasses) is pretty composable, but
the seaside components are bound to whatever CSS framework is chosen,
there isn't much to do there other than subclassing. This has several
drawbacks to integrate code from different teams/projects, because you
end up having to use a whole set of classes from the "foreign" library
(e.g. QCMagritte) rather than just a few components.

One thing that I disliked is the fact that from Magritte 2 to 3 the
descriptions moved from the class side to the instance side, to allow
dynamic containers based on instance state/behavior, this is really
powerful, but I'd preferred a two step lookup to build the instances,
it is... look at the instance side first, and then class side, this
way you can manipulate description without having to instantiate a
sample instance. This is mandatory if you're building an UI like a
reporting, querying tool where do not know in advance which instances
are going to be returned.

However I think this is a discussion for the Magritte, or Seaside, mailing list.

Regards,

--
Esteban



Re: [Pharo-users] OSProcess or OSSubprocess?

2017-03-20 Thread Alistair Grant
Hi Mariano,

On 20 March 2017 at 12:24, Mariano Martinez Peck  wrote:
>
> 
>
> Hi Hernan,
>
> There is a tail -f example in OSSubprocess documentation that prints the
> result on an inpsector and updates it [1]. However, OSSubprocess has
> problems on Linux with the default VM... you must use the threaded heartbeat
> (not the itimer).. see recent threads discussions for this.
>
> Let me know if that works.
>
>
> [1]
> https://github.com/marianopeck/OSSubprocess#processing-streams-while-running

Cool!  Thanks for pointing this out.  I've just hit the same
requirement, and this will also prompt me to move to the threaded VM.

Cheers!
Alistair



Re: [Pharo-users] looking for tools to manually select ast nodes for metalinks

2017-03-20 Thread Steven Costiou
Hi Ben, Guille, 

thanks !!! I will look into that =) 

Steven. 

Le 2017-03-20 10:39, Guillermo Polito a écrit :

> Hi Steven, 
> 
> Yes there is! It's called "Suggestions". Suggestions is a project started 
> some years ago by Gisela Decuzzi as an intern of RMoD. The main idea is to 
> propose actions based on the AST corresponding to the cursor. This means that 
> given the position of the cursor, suggestions already: 
> 
> - parses the code 
> - selects the corresponding node 
> - provides possible actions for the node. E.g., 
> - refactorings 
> - code navigation 
> - breakpoints and watchpoints (through Metalinks) 
> 
> Check the SmartSuggestions package. 
> 
> Guille 
> 
> On Mon, Mar 20, 2017 at 1:12 AM, Ben Coman  wrote:
> 
>> On Mon, Mar 20, 2017 at 4:06 AM, Steven Costiou  
>> wrote:
>>> Hi,
>>> 
>>> i would like a way to define metalinks at debug time, by "visually"
>>> selecting ast nodes in the debugger. For example i would like to see a
>>> method that i am debugging and by a clic on the source code it would select
>>> the associated ast node and allow me to put a metalink right there.
>>> 
>>> - does that exist ?
>> 
>> This might get you close...
>> 
>> Debug into...
>> 1 printString
>> 
>> In Variables tab, select "thisContext"
>> 
>> In Raw tab, select method
>> 
>> In AST tab, select your node.
>> 
>> From there on, I don't know.   Please report back if you get something to 
>> work.
>> 
>>> 
>>> - if not, does a tool to display or to navigate through metalinks already
>>> exists ?
>> 
>> I don't think so.  Pharo 6 has only the first step of having the basic
>> underlying system implemented.
>> 
>> cheers -ben
>> 
>>> 
>>> - if not any, can somebody point me to documentation and/or ressources to
>>> extend the debugger so i can try to build it ? (i've already seen the spec
>>> book to build ui but i want to see what is possible with the debugger)

-- 
kloum.io 

Re: [Pharo-users] OSProcess or OSSubprocess?

2017-03-20 Thread Mariano Martinez Peck
On Mon, Mar 20, 2017 at 6:00 AM, Hernán Morales Durand <
hernan.mora...@gmail.com> wrote:

> Hi guys,
>
> I need to monitor Unix command execution inside the image. The commands
> use heavy computation so they usually report progress in the terminal.
>
> Are OSProcess or OSSubprocess ready to do in-image monitoring so I can
> watch the same terminal output in the Transcript updating for example every
> 10 seconds?
>
>
Hi Hernan,

There is a tail -f example in OSSubprocess documentation that prints the
result on an inpsector and updates it [1]. However, OSSubprocess has
problems on Linux with the default VM... you must use the threaded
heartbeat (not the itimer).. see recent threads discussions for this.

Let me know if that works.


[1]
https://github.com/marianopeck/OSSubprocess#processing-streams-while-running



> Particularly for OSProcess I couldn't find any method to fetch partial
> output.
>
> Cheers,
>
> Hernán
>
>


-- 
Mariano
http://marianopeck.wordpress.com


Re: [Pharo-users] OSProcess or OSSubprocess?

2017-03-20 Thread Thierry Goubier
2017-03-20 10:00 GMT+01:00 Hernán Morales Durand :

> Hi guys,
>
> I need to monitor Unix command execution inside the image. The commands
> use heavy computation so they usually report progress in the terminal.
>
> Are OSProcess or OSSubprocess ready to do in-image monitoring so I can
> watch the same terminal output in the Transcript updating for example every
> 10 seconds?
>
> Particularly for OSProcess I couldn't find any method to fetch partial
> output.
>

GitFileTree does fetch partial output over OSProcess, but this is quite a
low-level use of OSProcess.

What is missing is true pseudo-tty support.

Regards,

Thierry


>
> Cheers,
>
> Hernán
>
>


Re: [Pharo-users] Magritte extension

2017-03-20 Thread Otto Behrens
Hi,

We also made several sub-classes of Magritte classes and / or
components. This causes a lot of problems because when we upgraded
Magritte it was difficult. It also shows that Magritte (the core
classes) cannot change much because the impact will be high for most
users of Magritte. This makes us think that Magritte is not easy to
use or customise. And it also appears as if all the custom changes are
not being generalised into the framework. Perhaps us users of Magritte
should stand back and discuss our changes and issues more so that we
can improve it? I suppose we need some magritte champion(s) to take it
somewhere.

To get more flexibility with Magritte styling we are using CSS and
classes more in stead of rendering in a different way. Often one can
get away with adding a CSS class and changing the style sheet.

This is a bit fluffy, but it there's a lot of stuff to talk about
here. In principle, are you sharing my frustration with Magritte?

Cheers
Otto


On Sat, Mar 18, 2017 at 7:40 PM, Mariano Martinez Peck
 wrote:
> Hi Asbath,
>
> Some answers below. But a general comment is that the typical case to
> customize magritte is by subclassing and then somehow use your own
> subclasses instead of magritte ones.
>
> On Fri, Mar 17, 2017 at 3:54 AM, Asbath Sama biyalou
>  wrote:
>>
>> Hello.
>>
>> I am using Magritte to generate reports for a pharo class. I want to
>> customize generated components in order to have a better design.
>>
>> My class is Match
>>
>> Object subclass: #Match
>> instanceVariableNames: 'date_match hour_match status actions stadium
>> comments teams goals1 goals2 competition'
>> classVariableNames: ''
>> category: MyProject-Entity'
>>
>>
>> Descriptions for some variables.
>>
>> Stadium is also a Class.
>>
>> Match>>descriptionStadium
>> 
>> ^ MASingleOptionDescription new
>> label: 'Stadium';
>> priority: 305;
>> accessor: #stadium;
>> options: Team allStadiumsName;
>> componentClass: TBSMagritteSelectListComponent;
>> beRequired;
>> yourself
>>
>>
>> Match>>descriptionTeams
>> 
>> ^ MAMultipleOptionDescription new
>> label: 'Teams';
>> priority: 805;
>> accessor: #teams;
>> options: Team allTeamsName;
>> componentClass: MAMultiselectListComponent;
>> yourself
>>
>>
>> The generated component in the form is not very pretty. I want to have
>> multiple checkbox.
>
>
>
> In my case, I have customized ALL the components I use for Magritte. That
> is, I have my own Fa version (Fa is my package prefix). So I have
> FaMAMultiselectListComponent  subclass of MAMultiselectListComponent. I have
> FaTBSMagritteSelectListComponent, subclass of TBSMagritteSelectListComponent
> , etc... so basically, you subclass and override the parent methods you
> want. Most common methods you need to override are renderEditorOn: html or
> renderViewerOn: html  etc...but that depends on WHAT you want to change and
> in WHICH component. Note they are all subclasses of MADescriptionComponent.
>
> You can also set your own properties in the magritte so that you can read
> them at your component level. For example, above I could say:
>
> Match>>descriptionTeams
> 
> ^ MAMultipleOptionDescription new
> label: 'Teams';
> priority: 805;
> accessor: #teams;
> options: Team allTeamsName;
> propertyAt: 'showInMultipleCheckboxs' put: true;
> componentClass: FaMAMultiselectListComponent;
> yourself
>
>
> Then in the rendering code of your subclass FaMAMultiselectListComponent you
> can do:
>
> (self magritteDescription propertyAt: 'showInMultipleCheckboxs') ifTrue: [
>  self renderAsMultiCheckboxsOn: html...
> ] ifFalse: [
> ...
> ]
>
> Of course, you can even define the accessors for #showInMultipleCheckboxs as
> extension methods in  MADescription
>
>
> To avoid having to define FaMAMultiselectListComponent for each
> MAMultipleOptionDescription .. well, there are many ways. But I guess that
> is for a later topic. Ask me if you want this.
>
>
>>
>>
>> Match>>descriptionStatus
>> 
>> ^ MASingleOptionDescription new
>> label: 'Status';
>> priority: 505;
>> accessor: #status;
>> options: #('Pas en cours' 'En Cours' 'Mi-temps' 'Terminé');
>> componentClass: TBSMagritteSelectListComponent;
>> yourself
>>
>>
>> For the report I use the class SEMatchReport
>>
>> TBSMagritteReport subclass: #SEMatchReport
>> instanceVariableNames: 'report'
>> classVariableNames: ''
>> category: 'MyProject-Components'
>>
>>
>> SEMatchReport class>>from
>> | report matchs commandColumn |
>> matchs := Match selectAll.
>> report:= self rows: matchs description: (self
>> filteredDescriptionsFrom: matchs anyOne).
>>
>> commandColumn := MACommandColumn new.
>>
>> (SEMatchReport new session isSimpleAdmin)
>> ifTrue: [
>> report addColumn: (commandColumn
>> addCommandOn: report selector: #editMatch: text: 'Modifier';
>> yourself;
>> addCommandOn: report selecto

Re: [Pharo-users] looking for tools to manually select ast nodes for metalinks

2017-03-20 Thread Guillermo Polito
Hi Steven,

Yes there is! It's called "Suggestions". Suggestions is a project started
some years ago by Gisela Decuzzi as an intern of RMoD. The main idea is to
propose actions based on the AST corresponding to the cursor. This means
that given the position of the cursor, suggestions already:

 - parses the code
 - selects the corresponding node
 - provides possible actions for the node. E.g.,
- refactorings
- code navigation
- breakpoints and watchpoints (through Metalinks)

Check the SmartSuggestions package.

Guille

On Mon, Mar 20, 2017 at 1:12 AM, Ben Coman  wrote:

> On Mon, Mar 20, 2017 at 4:06 AM, Steven Costiou 
> wrote:
> > Hi,
> >
> > i would like a way to define metalinks at debug time, by "visually"
> > selecting ast nodes in the debugger. For example i would like to see a
> > method that i am debugging and by a clic on the source code it would
> select
> > the associated ast node and allow me to put a metalink right there.
> >
> > - does that exist ?
>
> This might get you close...
>
> Debug into...
> 1 printString
>
> In Variables tab, select "thisContext"
>
> In Raw tab, select method
>
> In AST tab, select your node.
>
> From there on, I don't know.   Please report back if you get something to
> work.
>
>
> >
> > - if not, does a tool to display or to navigate through metalinks already
> > exists ?
>
> I don't think so.  Pharo 6 has only the first step of having the basic
> underlying system implemented.
>
> cheers -ben
>
> >
> > - if not any, can somebody point me to documentation and/or ressources to
> > extend the debugger so i can try to build it ? (i've already seen the
> spec
> > book to build ui but i want to see what is possible with the debugger)
>
>


Re: [Pharo-users] Magritte extension

2017-03-20 Thread Asbath Sama biyalou via Pharo-users
--- Begin Message ---
Thanks Mariano for the ideas. I will put them into practice. Then All I
have to do is to extends magritte classes to customize them.


On 18/03/2017 18:40, Mariano Martinez Peck wrote:
> Hi Asbath,
>
> Some answers below. But a general comment is that the typical case to
> customize magritte is by subclassing and then somehow use your own
> subclasses instead of magritte ones. 
>
> On Fri, Mar 17, 2017 at 3:54 AM, Asbath Sama biyalou
> mailto:asamabiya...@yahoo.com>> wrote:
>
> Hello.
>
> I am using Magritte to generate reports for a pharo class. I want to
> customize generated components in order to have a better design.
>
> My class is Match
>
> Object subclass: #Match
> instanceVariableNames: 'date_match hour_match status actions
> stadium
> comments teams goals1 goals2 competition'
> classVariableNames: ''
> category: MyProject-Entity'
>
>
> Descriptions for some variables.
>
> Stadium is also a Class.
>
> Match>>descriptionStadium
> 
> ^ MASingleOptionDescription new
> label: 'Stadium';
> priority: 305;
> accessor: #stadium;
> options: Team allStadiumsName;
> componentClass: TBSMagritteSelectListComponent;
> beRequired;
> yourself
>
>
> Match>>descriptionTeams
> 
> ^ MAMultipleOptionDescription new
> label: 'Teams';
> priority: 805;
> accessor: #teams;
> options: Team allTeamsName;
> componentClass: MAMultiselectListComponent;
> yourself
>
>
> The generated component in the form is not very pretty. I want to have
> multiple checkbox.
>
>
>
> In my case, I have customized ALL the components I use for Magritte.
> That is, I have my own Fa version (Fa is my package prefix). So I have
>  FaMAMultiselectListComponent  subclass of MAMultiselectListComponent.
> I have FaTBSMagritteSelectListComponent, subclass of
> TBSMagritteSelectListComponent , etc... so basically, you subclass and
> override the parent methods you want. Most common methods you need to
> override are renderEditorOn: html or renderViewerOn: html  etc...but
> that depends on WHAT you want to change and in WHICH component. Note
> they are all subclasses of MADescriptionComponent.
>
> You can also set your own properties in the magritte so that you can
> read them at your component level. For example, above I could say:
>
> Match>>descriptionTeams
> 
> ^ MAMultipleOptionDescription new
> label: 'Teams';
> priority: 805;
> accessor: #teams;
> options: Team allTeamsName;
> propertyAt: 'showInMultipleCheckboxs' put: true;
> componentClass: FaMAMultiselectListComponent;
> yourself
>
>
> Then in the rendering code of your subclass
> FaMAMultiselectListComponent you can do:
>
> (self magritteDescription propertyAt: 'showInMultipleCheckboxs') ifTrue: [
>  self renderAsMultiCheckboxsOn: html...
> ] ifFalse: [
> ...
> ]
>
> Of course, you can even define the accessors for
> #showInMultipleCheckboxs as extension methods in  MADescription
>
>
> To avoid having to define FaMAMultiselectListComponent for each
> MAMultipleOptionDescription .. well, there are many ways. But I guess
> that is for a later topic. Ask me if you want this.
>
>
>
>
> Match>>descriptionStatus
> 
> ^ MASingleOptionDescription new
> label: 'Status';
> priority: 505;
> accessor: #status;
> options: #('Pas en cours' 'En Cours' 'Mi-temps' 'Terminé');
> componentClass: TBSMagritteSelectListComponent;
> yourself
>
>
> For the report I use the class SEMatchReport
>
> TBSMagritteReport subclass: #SEMatchReport
> instanceVariableNames: 'report'
> classVariableNames: ''
> category: 'MyProject-Components'
>
>
> SEMatchReport class>>from
> | report matchs commandColumn |
> matchs := Match selectAll.
> report:= self rows: matchs description: (self
> filteredDescriptionsFrom: matchs anyOne).
>
> commandColumn := MACommandColumn new.
>
> (SEMatchReport new session isSimpleAdmin)
> ifTrue: [
> report addColumn: (commandColumn
> addCommandOn: report selector: #editMatch: text:
> 'Modifier';
> yourself;
> addCommandOn: report selector: #addAction: text: 'Ajouter
> une action'; yourself ) ]
> ifFalse: [
> report addColumn: (commandColumn
> addCommandOn: report selector: #editMatch: text:
> 'Modifier';
> yourself;
> addCommandOn: report selector: #deleteMatch: text:
> 'Supprimer'; yourself;
> addCommandOn: report selector: #addAction: text: 'Ajouter
> une action'; yourself ) ].
>
> ^ report
>
> I want to put some bootstrapp icons near commandColumn actions. like
> pencil or delete on 'Supprimer'.
>
>
>
> To do this, again, subclass MACommandColumn,
> ove

[Pharo-users] OSProcess or OSSubprocess?

2017-03-20 Thread Hernán Morales Durand
Hi guys,

I need to monitor Unix command execution inside the image. The commands use
heavy computation so they usually report progress in the terminal.

Are OSProcess or OSSubprocess ready to do in-image monitoring so I can
watch the same terminal output in the Transcript updating for example every
10 seconds?

Particularly for OSProcess I couldn't find any method to fetch partial
output.

Cheers,

Hernán


[Pharo-users] TextInspectIt missing in Pharo 6

2017-03-20 Thread Alistair Grant
Hi All,

TextInspectit and TextDoIt>>rubActOnClick:for:in:editor:, which are part
of the Text-Core package, are present in Pharo 5 but not in Pharo 6
(60442).  All the other classes in Text-Core appear to be present (I
haven't checked every method).

Is this intentional, and if so, what is the replacement?

Thanks very much,
Alistair