Hi,
I'm just starting to get my hands dirty with data structures. In particular GOP data structures. Inspired by Chris Mccormick's wonderful s- abstractions, I'm trying to make a simple GOP transport, with graphical play/stop/pause rewind etc. controls. The main showstopper at the moment is that I don't seem to be able to make the UI elements 'clickable'.
Using [tot] I can detect the mouse position when clicking inside the subpatch, but when the graph is on parent, this doesn't work. Of course, I don't want to use [tot] in the parent, because the GOP subpatch might well move.
Is there some other way to make a clickable element? Chris's s-env abstraction seems to detect ctrl-click, but It isn't obvious to me how this is achieved...
Jamie
Hallo, Jamie Bullock hat gesagt: // Jamie Bullock wrote:
I'm just starting to get my hands dirty with data structures. In particular GOP data structures. Inspired by Chris Mccormick's wonderful s- abstractions, I'm trying to make a simple GOP transport, with graphical play/stop/pause rewind etc. controls. The main showstopper at the moment is that I don't seem to be able to make the UI elements 'clickable'.
Using [tot] I can detect the mouse position when clicking inside the subpatch, but when the graph is on parent, this doesn't work. Of course, I don't want to use [tot] in the parent, because the GOP subpatch might well move.
Is there some other way to make a clickable element? Chris's s-env abstraction seems to detect ctrl-click, but It isn't obvious to me how this is achieved...
Nothing special here: ctrl-click is a standard feature of "array" fields in a data structure definition. You use it to add elements to the array.
Some other click-detections things require more manual work: The [struct] object has an outlet that will send out messages if a pointer of that type was selected or changed. Just connect a [print] there to see what's happening. You can use this with [route ...] to trigger actions when data structures are changed.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hey, Any idea what the equivalent modifier for this is on the mac? It didn't seem to get the usual ctrl>command translation that the rest of Pd did. (ctrl-click on the mac is hardwired as "right click") Should I bug report it?
Luke
On 6/5/07, Frank Barknecht fbar@footils.org wrote:
Hallo, Jamie Bullock hat gesagt: // Jamie Bullock wrote:
I'm just starting to get my hands dirty with data structures. In particular GOP data structures. Inspired by Chris Mccormick's wonderful s- abstractions, I'm trying to make a simple GOP transport, with graphical play/stop/pause rewind etc. controls. The main showstopper at the moment is that I don't seem to be able to make the UI elements 'clickable'.
Using [tot] I can detect the mouse position when clicking inside the subpatch, but when the graph is on parent, this doesn't work. Of course, I don't want to use [tot] in the parent, because the GOP subpatch might well move.
Is there some other way to make a clickable element? Chris's s-env abstraction seems to detect ctrl-click, but It isn't obvious to me how this is achieved...
Nothing special here: ctrl-click is a standard feature of "array" fields in a data structure definition. You use it to add elements to the array.
Some other click-detections things require more manual work: The [struct] object has an outlet that will send out messages if a pointer of that type was selected or changed. Just connect a [print] there to see what's happening. You can use this with [route ...] to trigger actions when data structures are changed.
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On Tue, Jun 05, 2007 at 11:45:37AM +0200, Frank Barknecht wrote:
Is there some other way to make a clickable element? Chris's s-env abstraction seems to detect ctrl-click, but It isn't obvious to me how this is achieved...
Nothing special here: ctrl-click is a standard feature of "array" fields in a data structure definition. You use it to add elements to the array.
Some other click-detections things require more manual work: The [struct] object has an outlet that will send out messages if a pointer of that type was selected or changed. Just connect a [print] there to see what's happening. You can use this with [route ...] to trigger actions when data structures are changed.
I seem to remember a release where this detects just plain old mouse clicks (i.e. no drag or modification) so that you could build your own 'toggle' for example. Am I just dreaming that or is it real? I can't find anything in the docs about the struct output, though I know I've used it before.
Chris.
On Wed, 2007-06-06 at 23:05 -0400, Chris McCormick wrote:
On Tue, Jun 05, 2007 at 11:45:37AM +0200, Frank Barknecht wrote:
Some other click-detections things require more manual work: The [struct] object has an outlet that will send out messages if a pointer of that type was selected or changed. Just connect a [print] there to see what's happening. You can use this with [route ...] to trigger actions when data structures are changed.
I seem to remember a release where this detects just plain old mouse clicks (i.e. no drag or modification) so that you could build your own 'toggle' for example. Am I just dreaming that or is it real? I can't find anything in the docs about the struct output, though I know I've used it before.
Yes, this is what I was really after. I tried Frank's suggestion, and [struct] does 'detect' clicks, but only in edit mode and not for GOP. In the end I used Geunther's [image], which does the job, but isn't ideal i) because of the external dependency and ii) because there's no image scaling, but does enable you to make nice looking buttons if you hide a bang behind it.
Jamie
Hallo, Jamie Bullock hat gesagt: // Jamie Bullock wrote:
On Wed, 2007-06-06 at 23:05 -0400, Chris McCormick wrote:
I seem to remember a release where this detects just plain old mouse clicks (i.e. no drag or modification) so that you could build your own 'toggle' for example. Am I just dreaming that or is it real? I can't find anything in the docs about the struct output, though I know I've used it before.
Yes, this is what I was really after. I tried Frank's suggestion, and [struct] does 'detect' clicks, but only in edit mode and not for GOP.
Yes, data structes don't (yet) handle pure clicks, only changes are detected. See attached example. In edit mode, the select/deselect operation is detected as well, but yes, this doesn't work with GOP.
Click-detection would be useful as well, however I think a more general mechanism for click detection anywhere in a (sub-)patch would be useful as well (like [tot] does).
In the end I used Geunther's [image], which does the job, but isn't ideal i) because of the external dependency and ii) because there's no image scaling, but does enable you to make nice looking buttons if you hide a bang behind it.
[ivnt] from iemgui might be another alternative.
Frank Barknecht _ ______footils.org_ __goto10.org__