[PD-dev] [PD] Should message objects be able to pre-parse $0 into valid dollarzero?

IOhannes m zmölnig zmoelnig at iem.at
Wed Sep 10 21:02:09 CEST 2014


On 09/10/2014 08:21 PM, Miller Puckette wrote:
> 
> The recursion problem (that Ico asked about) is this... if a message box
> has to set the "cuttent" canvas to itself, so that its messages can access
> $0, and if its message leads to another message box in another canvas, that
> second message box can't just bash the value of "current canvas" but rather
> would have to save the previous one (and restore it when done) so that, when
> control returns to the first message box, any further messages it wishes to
> send get its own $0 and not the bashed one.

i have heard rumours about an abomination named "stack".

> 
> A deeper question bothers me: what about $1, etc, too?  What if we're in an
> abstraction and want to 'speak' to $0 in our calling patch?  THe usual way of
> doing that is for the calling patch to instantiate the abstraction with $0
> as an argument.  Then the abstraction itself can access it as, say, $1.  But
> that makes me think we need a way for the message box to be able to access $1
> as well as $0.

this is not a problem of the msgbox, but about locality.
$0 is currently the only way to implement such a thing - albeit in a
crude way.
your example clearly shows that $0 is a not very elegant for these kind
of problems.
(whether in msgboxes or normal objboxes)


> 
> Should there be a 'generalized' message box that doesn't use binbuf_eval
> at all but rather gets a more spohisticated interpreter?

FTM msgbox?

> 
> Yet another possible direction: the new "text" object could be given a way to
> access the contents of message boxes, so that people could write their
> own semantics any way they please.

but [text] still has the limitations of the binbux:
e.g. no whitespace is preserved, semicolons and commas are special...


> Hmm, time for another Pd convention :)


now that is a conclusion!

gfmsr
IOhannes



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20140910/40d03665/attachment.sig>


More information about the Pd-dev mailing list