Re: [Pharo-users] About deprecation and unit testing

2013-12-05 Thread btc




Luc Fabresse wrote:

  Hi All,
   
   I think that trapping Deprecations silently is not a good idea.
   As you said, people will not see them and it will be hard to
upgrade code.
   Why not having a Preference?
   or another button in the TestRunner such as: "Run ignoring
Deprecation"?
   
  
  
  
  
#Luc
  
  
  
  2013/12/4 Damien Cassou 
  
On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker 
wrote:
> There is a related bug tracker entry:



I will try to propose a slice that ignores deprecation warnings while
running the tests. But this will make it harder for people to find
deprecated message sends.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



  
  
  
  

Or adding a new reported category "Deprecations" to go with "Expected
Failure"





Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Picci Pharo
The Class MorphicWindowAdapter doesn't exist in Pharo 2.0

From: benjamin.vanryseghem.ph...@gmail.com
Date: Wed, 4 Dec 2013 11:26:54 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

Add: WindowModel>>#openFullscreen
self changed: #openFullscreen with: #()
MorphicWindowAdapter>>#openFullscreen
self widgetDo: [ :w | w openFullscreen ]
And tada
Ben



On 04 Dec 2013, at 11:13, Picci Pharo  wrote:Hi Guys!
One simple question: how can i open fullscreen a WindowModel? As you know, the 
StandardWindow has got the message "openFullscreen", but it obviously doesn't 
work for the WindowModel.Any suggestion? 
Ciao!Paolo
  

Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Benjamin
then (note it’s a hack)

WindowModel>>#openFullscreen

self widget ifNotNil: [ :w | w openFullScreen ]



Ben

On 05 Dec 2013, at 10:59, Picci Pharo  wrote:

> The Class MorphicWindowAdapter doesn't exist in Pharo 2.0
> 
> From: benjamin.vanryseghem.ph...@gmail.com
> Date: Wed, 4 Dec 2013 11:26:54 +0100
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] openFullscreen a WindowModel
> 
> Add: 
> WindowModel>>#openFullscreen
> 
>   self changed: #openFullscreen with: #()
> 
> MorphicWindowAdapter>>#openFullscreen
> 
>   self widgetDo: [ :w | w openFullscreen ]
> 
> And tada
> 
> Ben
> 
> On 04 Dec 2013, at 11:13, Picci Pharo  wrote:
> 
> Hi Guys!
> 
> One simple question: how can i open fullscreen a WindowModel? As you know, 
> the StandardWindow has got the message "openFullscreen", but it obviously 
> doesn't work for the WindowModel.
> Any suggestion? 
> 
> Ciao!
> Paolo



Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Picci Pharo
It's non very clear for me. 
"self widget ifNotNil: [ :w | w openFullScreen ]" but openFullscreen hasn't 
been implemented yet. It is completely red.
Paolo
From: benjamin.vanryseghem.ph...@gmail.com
Date: Thu, 5 Dec 2013 11:04:29 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

then (note it’s a hack)
WindowModel>>#openFullscreen
self widget ifNotNil: [ :w | w openFullScreen ]



Ben



On 05 Dec 2013, at 10:59, Picci Pharo  wrote:The Class 
MorphicWindowAdapter doesn't exist in Pharo 2.0

From: benjamin.vanryseghem.ph...@gmail.com
Date: Wed, 4 Dec 2013 11:26:54 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

Add: WindowModel>>#openFullscreen
self changed: #openFullscreen with: #()
MorphicWindowAdapter>>#openFullscreen
self widgetDo: [ :w | w openFullscreen ]
And tadaBen
On 04 Dec 2013, at 11:13, Picci Pharo  wrote:Hi Guys!
One simple question: how can i open fullscreen a WindowModel? As you know, the 
StandardWindow has got the message "openFullscreen", but it obviously doesn't 
work for the WindowModel.Any suggestion? 
Ciao!Paolo
  

Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Benjamin
or openFullscreen,

The one known by SystemWindow

Ben

On 05 Dec 2013, at 11:11, Picci Pharo  wrote:

> openFullscreen



Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Picci Pharo
Are you telling me that i can copy the openFullscreen of StandardWindow and put 
it into the class WindowModel?
Paolo

From: benjamin.vanryseghem.ph...@gmail.com
Date: Thu, 5 Dec 2013 11:13:35 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

or openFullscreen,
The one known by SystemWindow

Ben



On 05 Dec 2013, at 11:11, Picci Pharo  wrote:openFullscreen
  

Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Benjamin
No

I am saying that

self widget ifNotNil: [ :w | w openFullScreen ]

w in here is a StandardWindow.

Ben

On 05 Dec 2013, at 11:18, Picci Pharo  wrote:

> Are you telling me that i can copy the openFullscreen of StandardWindow and 
> put it into the class WindowModel?
> 
> Paolo
> 
> From: benjamin.vanryseghem.ph...@gmail.com
> Date: Thu, 5 Dec 2013 11:13:35 +0100
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] openFullscreen a WindowModel
> 
> or openFullscreen,
> 
> The one known by SystemWindow
> 
> Ben
> 
> On 05 Dec 2013, at 11:11, Picci Pharo  wrote:
> 
> openFullscreen



Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Picci Pharo
It Works But the capital S is your mistake :-)
Thanks Ben, hope to speak soon with you and Steph here in Brescia for the next 
ESUG.
Paolo

From: benjamin.vanryseghem.ph...@gmail.com
Date: Thu, 5 Dec 2013 11:21:40 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

No
I am saying that
self widget ifNotNil: [ :w | w openFullScreen ]
w in here is a StandardWindow.

Ben



On 05 Dec 2013, at 11:18, Picci Pharo  wrote:Are you 
telling me that i can copy the openFullscreen of StandardWindow and put it into 
the class WindowModel?
Paolo

From: benjamin.vanryseghem.ph...@gmail.com
Date: Thu, 5 Dec 2013 11:13:35 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] openFullscreen a WindowModel

or openFullscreen,
The one known by SystemWindow
Ben
On 05 Dec 2013, at 11:11, Picci Pharo  wrote:openFullscreen
  

Re: [Pharo-users] openFullscreen a WindowModel

2013-12-05 Thread Benjamin
Sorry for not knowing the StandardWindow API by heart (yet) :P

Ben

On 05 Dec 2013, at 11:28, Picci Pharo  wrote:

> It Works But the capital S is your mistake :-)
> 
> Thanks Ben, hope to speak soon with you and Steph here in Brescia for the 
> next ESUG.
> 
> Paolo
> 
> From: benjamin.vanryseghem.ph...@gmail.com
> Date: Thu, 5 Dec 2013 11:21:40 +0100
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] openFullscreen a WindowModel
> 
> No
> 
> I am saying that
> 
> self widget ifNotNil: [ :w | w openFullScreen ]
> 
> w in here is a StandardWindow.
> 
> Ben
> 
> On 05 Dec 2013, at 11:18, Picci Pharo  wrote:
> 
> Are you telling me that i can copy the openFullscreen of StandardWindow and 
> put it into the class WindowModel?
> 
> Paolo
> 
> From: benjamin.vanryseghem.ph...@gmail.com
> Date: Thu, 5 Dec 2013 11:13:35 +0100
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] openFullscreen a WindowModel
> 
> or openFullscreen,
> 
> The one known by SystemWindow
> 
> Ben
> 
> On 05 Dec 2013, at 11:11, Picci Pharo  wrote:
> 
> openFullscreen



Re: [Pharo-users] command line command from pharo image

2013-12-05 Thread Sean P. DeNigris
Sabine Knöfel wrote
> Which is the Class and the message in NB then?

not sure which class and on holidays with no computer :) the Mac message is
#run: which wraps system in libc, and the Windows version, which I haven't
committed yet is #winExec:show which wraps WinExec. HTH



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727022p4727703.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] command line command from pharo image

2013-12-05 Thread Torsten Bergmann
Sean wrote:
>Sabine Knöfel wrote
>> Which is the Class and the message in NB then?
>not sure which class and on holidays with no computer :) the Mac message is
>#run: which wraps system in libc, and the Windows version, which I haven't
>committed yet is #winExec:show which wraps WinExec. HTH

Hi Sabine, Sean,

PLEASE NO WinExec, this is long deprecated and only for 16bit compatibility
see  
http://msdn.microsoft.com/en-us/library/windows/desktop/ms687393(v=vs.85).aspx

As you see on MSDN CreateProcess() API should be used.


If you are on Pharo 3.0 look at my "OS-Windows" project loadable from the 
config 
browser.

You will find the class WinProcess with methods like #createProcess: 
(nonblocking)
and #createAndWaitForProcess: (blocking) there. It already uses CreateProcess 
API.

With the package you can for instance run the command processor:

   WinProcess createAndWaitForProcess: 'cmd.exe'

You also have access to the environment like

   WinEnvironment getEnvironmentVariable: 'PATH'.
 
See the documentation at http://smalltalkhub.com/#!/~OS/OS-Windows for more 
examples.

Bye
T.



Re: [Pharo-users] About deprecation and unit testing

2013-12-05 Thread jtuc...@objektfabrik.de

Hi guys,

Deprecation is a subclass of Warning, not Error. And I think this is 
absolutely correct.


So the basic question here is if the action on Warnings and 
Notifications in general in SUnit is correct or should be changed.

This is not necessarily limited to Deprecation.

Of course we need a possibility to test assertions about Deprecations 
and other Notifications as well, so it sure is not a good idea to make 
"transparent" changes and simply ignore Deprecation or any other kind of 
Notification/Warning.


Just my 2 cents

Joachim


Am 05.12.13 10:41, schrieb b...@openinworld.com:

Luc Fabresse wrote:

Hi All,
 I think that trapping Deprecations silently is not a good idea.
 As you said, people will not see them and it will be hard to upgrade 
code.

 Why not having a Preference?
 or another button in the TestRunner such as: "Run ignoring Deprecation"?



#Luc


2013/12/4 Damien Cassou >


On Wed, Dec 4, 2013 at 9:18 AM, Marcus Denker
mailto:marcus.den...@inria.fr>> wrote:
> There is a related bug tracker entry:


I will try to propose a slice that ignores deprecation warnings while
running the tests. But this will make it harder for people to find
deprecated message sends.

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill


Or adding a new reported category "Deprecations" to go with "Expected 
Failure"



--
---
Objektfabrik Joachim Tuchel  mailto:jtuc...@objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1




[Pharo-users] OSProcess command: 'something' does not work on windows

2013-12-05 Thread Sabine Knöfel
(continuation of 
http://forum.world.st/command-line-command-from-pharo-image-td4727022.html)

OSProcess command: 'something'  works fine on mac but does not work on
windows.

If I debug in it I arrive at a primitive call in
WindowsOSProcessAccessor>>primCommand: 
The comment is saying something like 
"This primitive has been replaced by #primCommand:stdIn:stdOut:stdErr:, and
will be removed in future versions of OSProcess."

Question: How to call a command line command from windows (AND mac)? Do I
have to write two different codes for the 2 os systems? I dont want this :-)

I am on Pharo 2.0

Sabine





--
View this message in context: 
http://forum.world.st/OSProcess-command-something-does-not-work-on-windows-tp4727771.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



[Pharo-users] Json case: Mapping objects to dictionaries

2013-12-05 Thread Norbert Hartl
What would be the best software to map my objects to dictionaries? There are a 
lot of packages in pharo that deal with JSON somehow. But it seems none does 
mapping from objects to dictionaries and is standalone. We’ve got

- NeoJSON package . Maps objects to strings directly for performance reason
- JSON package. Maps string to JsonObject (subclassed from dictionary)
- Voyage magritte based mapper: Closest to what I find useful but buried inside 
of Voyage. And I’m not sure it would be easy to factor out this module as a 
standalone mapper.
- Seaside javascript… : I forgot what it really does. I often shy away looking 
at it because I don’t want to suck in all the dependencies. 

I’m asking because for me this is an important asset. If we talk about JSON 
there are three things: Objects, JSON structure (being dictionaries and other 
collections in pharo) and JSON strings. Writing to another server or to a file 
producing JSON strings seems to be enough. But using it for another system like 
MongoDB or ElasticSearch this does not work. Here the common interface seems to 
be dictionaries. With ElasticSearch mapping dictionaries to JSON and MongoDB 
mapping dictionaries to BSON. So a good descriptive way to map objects to 
dictionaries would be a good thing to have.

Any thoughts?

Norbert


Re: [Pharo-users] [Pharo-dev] Json case: Mapping objects to dictionaries

2013-12-05 Thread Esteban A. Maringolo
Norbert,

I'm currently building the dictionaries myself. I have a specific
domain class of mapper for each "message" (JSON).
The mapper builder manually builds my domain objects from the
dictionary returned by "JSJsonParser parse: aString", when writing
creates a Dictionary and sends #asJson to it.

E.g. I have a EventBuilder which can build an Event from a JSON string
or viceversa.


I used NeoJSON in the beggining and it's blazing fast (because it is
stream based), but I couldn't get my head around some particular cases
(which I don't remember now, sorry). I WILL give another try, but with
time to fully understand it.

In the Java side of my app, this is one of the simplest things to deal
with, manually to read and write, by using JSONObject and JSONArray,
there's not more of it than this.

Regards,






Esteban A. Maringolo


2013/12/5 Norbert Hartl :
> What would be the best software to map my objects to dictionaries? There are 
> a lot of packages in pharo that deal with JSON somehow. But it seems none 
> does mapping from objects to dictionaries and is standalone. We’ve got
>
> - NeoJSON package . Maps objects to strings directly for performance reason
> - JSON package. Maps string to JsonObject (subclassed from dictionary)
> - Voyage magritte based mapper: Closest to what I find useful but buried 
> inside of Voyage. And I’m not sure it would be easy to factor out this module 
> as a standalone mapper.
> - Seaside javascript… : I forgot what it really does. I often shy away 
> looking at it because I don’t want to suck in all the dependencies.
>
> I’m asking because for me this is an important asset. If we talk about JSON 
> there are three things: Objects, JSON structure (being dictionaries and other 
> collections in pharo) and JSON strings. Writing to another server or to a 
> file producing JSON strings seems to be enough. But using it for another 
> system like MongoDB or ElasticSearch this does not work. Here the common 
> interface seems to be dictionaries. With ElasticSearch mapping dictionaries 
> to JSON and MongoDB mapping dictionaries to BSON. So a good descriptive way 
> to map objects to dictionaries would be a good thing to have.
>
> Any thoughts?
>
> Norbert



Re: [Pharo-users] command line command from pharo image

2013-12-05 Thread Sean P. DeNigris
Torsten Bergmann wrote
> PLEASE NO WinExec, this is long deprecated 

Ha ha, yes Torsten. I couldn't get create process to work so I cheated ;) it
works and takes only two parameters. This is exciting that you've already
wrapped that stuff! I had no idea, there's probably so many great things out
there. We could really use a PharoMap... I will take a look at your project.
Maybe something could be integrated with NB core. Executing an external
command on all the common platforms is a good demonstration of NB



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/command-line-command-from-pharo-image-tp4727751p4727857.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] OSProcess command: 'something' does not work on windows

2013-12-05 Thread Sean P. DeNigris
If you search the mailing list for OSProcess Windows, you will find a list
that says that your need to get our bills the plugin which is not included
by default. HTH



-
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/OSProcess-command-something-does-not-work-on-windows-tp4727771p4727858.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.