[PD] dynamic gui masking problem
reduzierer at yahoo.de
Fri Apr 2 17:02:44 CEST 2010
With the help of IOhannes and matju I was finally able to find a
solution for this problem.
There *is* actually a way of dynamically remove single objects without
causing errors (thanks IOhannes):
By using [canvasdelete] from the iemguts. It allows to delete certain
objects of a certain canvas by their index number (for instance, 'delete
12'). The canvas needs a [canvasdelete] in order to add the 'delete'
method to the canvas and a [sendcanvas] to which the 'delete <id>'
message is sent.
Then I ran into another problem:
I was creating [cnv] objects in a GOP and moving them out of the GOP
area, which is a way to display something in the parent patch outside
the GOP area. However, when deleting such gui objects, they remain
visible in the parent (as if the parent wouldn't be refreshed).
Switching workspaces forth and back or minimizing/maximizing the parent
patch made them disappear. Running pd with -d 2 (matju's suggestion)
revealed, that canvasses are receiving a 'map 0; map 1;' sequence in
order to refresh them on maximizing or switching workspaces. Sending
those messages to the parent patch after dynamically deleting gui
objects in the outside-gop-area made them finally also disappear in the
Attached is an updated example, that exploits those features.
On Mon, 2010-03-15 at 00:20 +0100, Roman Haefeli wrote:
> Hi all
> I'm trying to create a GOP abstraction for selecting an item from a
> list. The cool thing about GOP is, that iemguis are still visible, even
> if they are moved outside the GOP area. However, the problem I'm facing
> is that they are masked by other objects in the patch, when they are
> moved to area of some other object.
> A Solution: Dynamically creating objects on the fly makes them appear
> above all other objects in the patch.Unfortunately I couldn't figure out
> a way to delete them to make them disappear, when they're not needed
> Probably there is another way of tweaking the z-index of objects? Or is
> there a way to dynamically delete objects without having to 'vis' a
> canvas and putting it into edit mode (and without printing errors to the
> Attached is an example patch to illustrate the masking problem.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3749 bytes
Desc: not available
More information about the Pd-list