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

SourceForge.net noreply at sourceforge.net
Mon Feb 27 13:57:40 CET 2012


Patches item #3494768, was opened at 2012-02-26 08:10
Message generated for change (Comment added) made by zmoelnig
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: None
Status: Open
Resolution: None
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: 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