[Pharo-project] Object>>deprecated:on:in: doesn't respect state of Deprecation class>>showWarning:
Hi all, Kind of new to Pharo, so not sure if this is intended behaviour or not, but "Object>>deprecated:on:in:" doesn't respect the current state of the "Deprecation class>>showWarning" setting. This was unexpected for me --- in a headless setting the warning dialog causes the VM to exit. To reproduce (in 1.4 14399): Deprecation showWarning: false. true and: [ true ] and: [ true ]. "Boolean>>and:and: sends deprecated:on:in:" Fix seems straightforward: wrap the current contents of "deprecated:on:in:" in "Deprecation showWarning ifTrue: [...]". If there are no objections, I'll raise a bug in the tracker. Cheers, Martin
Thanks martin. I do not remember may be this is related to the fact this is in alpha. Can you check if you get the same behavior and the same code in deprecated:on:⦠in 1.3 Stef (running now to catch a train) On Mar 19, 2012, at 10:47 PM, Martin Sandiford wrote:
Hi all,
Kind of new to Pharo, so not sure if this is intended behaviour or not, but "Object>>deprecated:on:in:" doesn't respect the current state of the "Deprecation class>>showWarning" setting.
This was unexpected for me --- in a headless setting the warning dialog causes the VM to exit.
To reproduce (in 1.4 14399):
Deprecation showWarning: false. true and: [ true ] and: [ true ]. "Boolean>>and:and: sends deprecated:on:in:"
Fix seems straightforward: wrap the current contents of "deprecated:on:in:" in "Deprecation showWarning ifTrue: [...]".
If there are no objections, I'll raise a bug in the tracker.
Cheers, Martin
Hope you made the train. Good advice to look into 1.3 --- on closer inspection it turns out this actually works fine, and I just didn't understand how things work. "raiseWarning: false" does what I want; showWarning just affects transcript logs. I've updated the issue --- it should probably be closed as invalid :( On Tue, Mar 20, 2012 at 5:43 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Thanks martin. I do not remember may be this is related to the fact this is in alpha. Can you check if you get the same behavior and the same code in deprecated:on:⦠in 1.3
Stef (running now to catch a train)
Hope you made the train. Good advice to look into 1.3 --- on closer inspection it turns out this actually works fine, and I just didn't understand how things work. "raiseWarning: false" does what I want; showWarning just affects transcript logs.
I've updated the issue --- it should probably be closed as invalid :(
no problem :) Stef
participants (2)
-
Martin Sandiford -
Stéphane Ducasse