[PD-dev] [ pure-data-Patches-3494768 ] verbose() leaves blank lines when filtered out in Pd window

SourceForge.net noreply at sourceforge.net
Thu Oct 4 11:01:24 CEST 2012


Patches item #3494768, was opened at 2012-02-26 08:10
Message generated for change (Comment added) made by nobody
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3494768&group_id=55736

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: bugfix
Status: Pending
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Hans-Christoph Steiner (eighthave)
Assigned to: Miller Puckette (millerpuckette)
Summary: verbose() leaves blank lines when filtered out in Pd window

Initial Comment:
When lines are posted to the Pd window using verbose() and then the Pd window is set to display at a lower level than the verbose() posted at, the lines that were posted using verbose() will be filtered, but will leave a blank line in their place.  lines posted with logpost() do not do this.  For example, if I post three lines using verbose() like this:

    verbose(3, "three");
    verbose(4, "four");
    verbose(3, "three");

Setting the log level to four will show:

 three
 four
 three

Setting the log level to 3 will show:

three

three

When it should show:

three
three

I'm assigning this to IOhannes because I think he wrote the current verbose() function.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2012-10-04 02:01

Message:
very nice article and idea
http://www.cheaplouisvuittonreplica2012.com/replica-louis-vuitton-monogram-shopping-bag-m95513-black-p-5751.html

----------------------------------------------------------------------

Comment By: Miller Puckette (millerpuckette)
Date: 2012-08-31 17:10

Message:
applied (0.44)

----------------------------------------------------------------------

Comment By: Hans-Christoph Steiner (eighthave)
Date: 2012-02-27 06:32

Message:
That was quick.  The solution makes sense to me.  But I think its a bad
idea to change to loglevel+4 to loglevel+3.  Either leave verbose()'s
custom level numbering the same, or make it the same as the Pd window,
error(), logpost(), etc..  I still really think the +4 on the loglevel
doesn't make sense.

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2012-02-27 04:57

Message:
attached is a fix for the problem (thus changing Tracker to 'Patches' and
assigning to miller)

it also closes the gap between verbose() and post() by applying a
loglevel-offset of '3' rather than '4' (so now verbose(0) (loglevel=3) is
following post() (loglevel=2) immediately.

----------------------------------------------------------------------

Comment By: IOhannes m zmölnig (zmoelnig)
Date: 2012-02-27 04:52

Message:
the problem comes from the use of endpost() to terminate the message.
endpost() doesn't know anything about log-levels, so it tags all LFs as
"normal".

i can think of 2 ways to fix this:
- don't use endpost() to terminate a message, but instead append the "\n"
to the message itself (which get's tagged with the log-level)
- make endpost() aware of the last used loglevel and terminate any message
using this level

i'd rather go for the 1st solution, as it doesn't require any global
state...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=3494768&group_id=55736



More information about the Pd-dev mailing list