Debug/inspect problem with printString ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Debug/inspect problem with printString ...

Dennis smith-4
I know why this is a problem, just wondered what other people do.
We have a number of class with complex formatting capabilities
(XXdate, XXtime, XXduration, XXpostalCode, ....).

In order to present a human readable result in inspectors "printOn: ..."
invokes the formatting methods.  The problem of course is that when one
goes to debug a formatting method one gets into a loop and I often have
to exit
and restart my image.


--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com

Reply | Threaded
Open this post in threaded view
|

RE: Debug/inspect problem with printString ...

Terry Raymond
Dennis

In your class define #inspectString to be something more
benign. You may also have to change
Tools.Trippy.Inspector class>>safePrintStringOf: so it sends
#inspectString instead of #printString.

Terry
 
===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

> -----Original Message-----
> From: Dennis Smith [mailto:[hidden email]]
> Sent: Tuesday, April 18, 2006 10:30 AM
> To: VWNC,
> Subject: Debug/inspect problem with printString ...
>
> I know why this is a problem, just wondered what other people do.
> We have a number of class with complex formatting capabilities
> (XXdate, XXtime, XXduration, XXpostalCode, ....).
>
> In order to present a human readable result in inspectors "printOn: ..."
> invokes the formatting methods.  The problem of course is that when one
> goes to debug a formatting method one gets into a loop and I often have
> to exit
> and restart my image.
>
>
> --
> Dennis Smith                        [hidden email]
> Cherniak Software Development Corporation       +1 905.771.7011
> 400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
> Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com

Reply | Threaded
Open this post in threaded view
|

Re: Debug/inspect problem with printString ...

Dennis smith-4


Terry Raymond wrote:
Dennis

In your class define #inspectString to be something more
benign. You may also have to change
Tools.Trippy.Inspector class>>safePrintStringOf: so it sends
#inspectString instead of #printString.
  
Right -- in that case I could just define printString to be more benign but then normal
inspection would see non-human-understandable.  I don't see a solution, I just
wondered what others did.

My quicky solution is to override printOn: to something else when I am debugging the actual
code that is normally called.

Terry
 
===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================

  
-----Original Message-----
From: Dennis Smith [[hidden email]]
Sent: Tuesday, April 18, 2006 10:30 AM
To: VWNC,
Subject: Debug/inspect problem with printString ...

I know why this is a problem, just wondered what other people do.
We have a number of class with complex formatting capabilities
(XXdate, XXtime, XXduration, XXpostalCode, ....).

In order to present a human readable result in inspectors "printOn: ..."
invokes the formatting methods.  The problem of course is that when one
goes to debug a formatting method one gets into a loop and I often have
to exit
and restart my image.


--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com
    

  

-- 
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com
Reply | Threaded
Open this post in threaded view
|

RE: Debug/inspect problem with printString ...

Terry Raymond

Dennis

 

I suggested using inpectString because it would allow printString and

printOn: to operate normally.

 

Terry

===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================


From: Dennis Smith [mailto:[hidden email]]
Sent: Tuesday, April 18, 2006 12:07 PM
To: Terry Raymond
Cc: 'VWNC, '
Subject: Re: Debug/inspect problem with printString ...

 



Terry Raymond wrote:

Dennis
 
In your class define #inspectString to be something more
benign. You may also have to change
Tools.Trippy.Inspector class>>safePrintStringOf: so it sends
#inspectString instead of #printString.
  

Right -- in that case I could just define printString to be more benign but then normal
inspection would see non-human-understandable.  I don't see a solution, I just
wondered what others did.

My quicky solution is to override printOn: to something else when I am debugging the actual
code that is normally called.


 
Terry
 
===========================================================
Terry Raymond       Smalltalk Professional Debug Package
Crafted Smalltalk
80 Lazywood Ln.
Tiverton, RI  02878
(401) 624-4517      [hidden email]
<http://www.craftedsmalltalk.com>
===========================================================
 
  
-----Original Message-----
From: Dennis Smith [[hidden email]]
Sent: Tuesday, April 18, 2006 10:30 AM
To: VWNC,
Subject: Debug/inspect problem with printString ...
 
I know why this is a problem, just wondered what other people do.
We have a number of class with complex formatting capabilities
(XXdate, XXtime, XXduration, XXpostalCode, ....).
 
In order to present a human readable result in inspectors "printOn: ..."
invokes the formatting methods.  The problem of course is that when one
goes to debug a formatting method one gets into a loop and I often have
to exit
and restart my image.
 
 
--
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com
    
 
  



-- 
Dennis Smith                        [hidden email]
Cherniak Software Development Corporation       +1 905.771.7011
400-10 Commerce Valley Dr E                Fax: +1 905.771.6288
Thornhill, ON Canada L3T 7N7    http://www.CherniakSoftware.com