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 anymore.
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 console)?
Attached is an example patch to illustrate the masking problem.
Roman
That's a nice object.
As for z order: The last object you create will be in front. I don't think there's a way to tweak this.
-Jonathan
--- On Mon, 3/15/10, Roman Haefeli reduzierer@yahoo.de wrote:
From: Roman Haefeli reduzierer@yahoo.de Subject: [PD] dynamic gui masking problem To: pd-list@iem.at Date: Monday, March 15, 2010, 12:20 AM 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 anymore.
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 console)?
Attached is an example patch to illustrate the masking problem.
Roman
-----Inline Attachment Follows-----
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi again
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 parent patch.
Attached is an updated example, that exploits those features.
Roman
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 anymore.
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 console)?
Attached is an example patch to illustrate the masking problem.