Re: [PD] open array window by message

2017-06-03 Thread Christof Ressi
>  If you know the order of creation of the array, you can send [; pd-graph1 
> vis 1(, and (probably) 
> any other message you send to canvases. 

:-D hacky as hell.

> you *can* actually open and close with [click 0 0 0 0 0( and [menuclose(

+1

by the way, you *actually* can send messages to the anonymous canvas of a 
garray by renaming it with [namecanvas]. see attached patch. it doesn't work 
for [array define] and [table], however, the [namecanvas] object will be gone 
when you save and reopen the patch. 

there is a recent thread where I showed how to use this for manipulating the 
GOP area (in this case for disabling mouse interaction):
https://lists.puredata.info/pipermail/pd-list/2017-05/118908.html

Christof 
 

Gesendet: Sonntag, 04. Juni 2017 um 02:42 Uhr
Von: "Federico Camara Halac" 
An: "Christof Ressi" 
Cc: Pd-List 
Betreff: Re: [PD] open array window by message

One more thing, i just found that this
 
[menuclose(
|
[array define foo] 
 
will close it, so you *can* actually open and close with [click 0 0 0 0 0( and 
[menuclose(
 
 
On Sat, Jun 3, 2017 at 8:22 PM, Federico Camara Halac 
mailto:camaraf...@gmail.com]> wrote:
Hi all,

Thanks Christof for the long answer! I looked into this a bit and it appears 
that every time you create an [array define myname] object there is a canvas 
named pd-graphX (created by array_define_new). If you know the order of 
creation of the array, you can send [; pd-graph1 vis 1(, and (probably) any 
other message you send to canvases. You can even rename it: [; pd-graph1 rename 
dog(, and then just send [;pd-dog vis 1(; The name won't stick, tho, on next 
load.

I attached an example of this. You might need a fresh instance of pd for it, or 
just tinker with the graph indices... The thing is that the graphX list is 
generated from scratch every time pd loads, and keeps growing on every new 
instance of an array, no matter what you do.
Best!
 
fd
--
http://fdch.github.io/tv[http://fdch.github.io/tv] 
 --

http://fdch.github.io/tv[http://fdch.github.io/tv]

array-namecanvas.pd
Description: Binary data
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] open array window by message

2017-06-03 Thread Federico Camara Halac
One more thing, i just found that this

[menuclose(
|
[array define foo]

will close it, so you *can* actually open and close with [click 0 0 0 0 0(
and [menuclose(


On Sat, Jun 3, 2017 at 8:22 PM, Federico Camara Halac 
wrote:

> Hi all,
>
> Thanks Christof for the long answer! I looked into this a bit and it
> appears that every time you create an [array define myname] object there is
> a canvas named pd-graphX (created by array_define_new). If you know the
> order of creation of the array, you can send [; pd-graph1 vis 1(, and
> (probably) any other message you send to canvases. You can even rename it:
> [; pd-graph1 rename dog(, and then just send [;pd-dog vis 1(; The name
> won't stick, tho, on next load.
>
> I attached an example of this. You might need a fresh instance of pd for
> it, or just tinker with the graph indices... The thing is that the graphX
> list is generated from scratch every time pd loads, and keeps growing on
> every new instance of an array, no matter what you do.
>
> Best!
>
> fd
> --
> http://fdch.github.io/tv
>



-- 
http://fdch.github.io/tv
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] open array window by message

2017-06-03 Thread Federico Camara Halac
Hi all,

Thanks Christof for the long answer! I looked into this a bit and it
appears that every time you create an [array define myname] object there is
a canvas named pd-graphX (created by array_define_new). If you know the
order of creation of the array, you can send [; pd-graph1 vis 1(, and
(probably) any other message you send to canvases. You can even rename it:
[; pd-graph1 rename dog(, and then just send [;pd-dog vis 1(; The name
won't stick, tho, on next load.

I attached an example of this. You might need a fresh instance of pd for
it, or just tinker with the graph indices... The thing is that the graphX
list is generated from scratch every time pd loads, and keeps growing on
every new instance of an array, no matter what you do.

Best!

fd
--
http://fdch.github.io/tv


array-renaming-test.pd
Description: Binary data
___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] open array window by message

2017-06-03 Thread Christof Ressi
> my proposal would be to include the 'vis' method in canvas_add_for_class. 

and/or add 'click' and 'close' to [array define], just like [text define]

> Gesendet: Samstag, 03. Juni 2017 um 20:49 Uhr
> Von: "Christof Ressi" 
> An: oliver 
> Cc: pd-l...@mail.iem.at
> Betreff: Re: [PD] open array window by message
>
> Hi, short answer:
> 
> [click 0 0 0 0 0( --> [array define foo] or [;pd-foo click 0 0 0 0 0(. this 
> click method is for canvases and takes 5 arguments. it has nothing to do with 
> the click method for [text]. 'pd-foo' is the name of the canvas where the 
> actual garray 'foo' lives.
> 
> long answer:
> 
> [array define] itself creates a canvas containing a graphical array just like 
> [table] (the garray itself is just another canvas with GOP enabled and a data 
> structure array inside). if you have a table named 'foo', the canvas where 
> the garray lives is called 'pd-foo'. you can open it just like a subpatch and 
> send it all of the canvas messages, like 'vis' etc. 
> unfortunately, this doesn't work for [array define] and this is the reason:
> 
> in the contructor method (array_define_new in x_array.c), Miller bashes the 
> class of the created canvas to 'array_define_class', which means that all 
> incoming messages are routed there and not to the canvas_class. 
> array_define_class automatically routes unknown messages to the garray_class 
> which finally gives you the error message: 'array: no method for ...' (for 
> example, if you optimistically try [vis 1( :-). this effectively means that 
> the canvas has all of its methods removed. but Miller has a function called 
> canvas_add_for_class in g_canvas.c which (re)attaches some indispensible 
> methods - and one of them is 'click'.  
> 
> sending 'click 0 0 0 0 0' for opening the canvas of [array define] is pretty 
> hacky - and naturally you can't use it to close the canvas. 
> 
> my proposal would be to include the 'vis' method in canvas_add_for_class. and 
> as a general basic question: why do we inhibit the user from being able to 
> edit the canvas of [array define] in the first place?
> 
> Christof
> 
> > Gesendet: Samstag, 03. Juni 2017 um 18:34 Uhr
> > Von: oliver 
> > An: pd-l...@mail.iem.at
> > Betreff: [PD] open array window by message
> >
> > hi,
> > 
> > a [text] object can be opened with the message "click"
> > 
> > what about the [array] object ?
> > 
> > 
> > when i send it a "click", the PD window says "Bad arguments for message 
> > 'click' to object 'array define'". i also tried "click 1" or "click 
> > open" to no avail.
> > 
> > but the message itself seems to be valid, isn't it ?
> > what arguments would it need to show the array window ?
> > 
> > 
> > best
> > 
> > oliver
> > 
> > -- 
> > 
> > /// http://pendler.klingt.org //
> > \\\ http://oliver.klingt.org  \\
> > 
> > 
> > ___
> > Pd-list@lists.iem.at mailing list
> > UNSUBSCRIBE and account-management -> 
> > https://lists.puredata.info/listinfo/pd-list
> > 
> 
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
> 

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] open array window by message

2017-06-03 Thread oliver

Christof Ressi wrote:

Hi, short answer:

[click 0 0 0 0 0( --> [array define foo] or [;pd-foo click 0 0 0 0 0(. this 
click method is for canvases and takes 5 arguments. it has nothing to do with the 
click method for [text]. 'pd-foo' is the name of the canvas where the actual 
garray 'foo' lives.


hi, thanks a lot ! that did it !



sending 'click 0 0 0 0 0' for opening the canvas of [array define] is pretty 
hacky - and naturally you can't use it to close the canvas.

my proposal would be to include the 'vis' method in canvas_add_for_class. and 
as a general basic question: why do we inhibit the user from being able to edit 
the canvas of [array define] in the first place?


+1

best

oliver

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] open array window by message

2017-06-03 Thread Christof Ressi
Hi, short answer:

[click 0 0 0 0 0( --> [array define foo] or [;pd-foo click 0 0 0 0 0(. this 
click method is for canvases and takes 5 arguments. it has nothing to do with 
the click method for [text]. 'pd-foo' is the name of the canvas where the 
actual garray 'foo' lives.

long answer:

[array define] itself creates a canvas containing a graphical array just like 
[table] (the garray itself is just another canvas with GOP enabled and a data 
structure array inside). if you have a table named 'foo', the canvas where the 
garray lives is called 'pd-foo'. you can open it just like a subpatch and send 
it all of the canvas messages, like 'vis' etc. 
unfortunately, this doesn't work for [array define] and this is the reason:

in the contructor method (array_define_new in x_array.c), Miller bashes the 
class of the created canvas to 'array_define_class', which means that all 
incoming messages are routed there and not to the canvas_class. 
array_define_class automatically routes unknown messages to the garray_class 
which finally gives you the error message: 'array: no method for ...' (for 
example, if you optimistically try [vis 1( :-). this effectively means that the 
canvas has all of its methods removed. but Miller has a function called 
canvas_add_for_class in g_canvas.c which (re)attaches some indispensible 
methods - and one of them is 'click'.  

sending 'click 0 0 0 0 0' for opening the canvas of [array define] is pretty 
hacky - and naturally you can't use it to close the canvas. 

my proposal would be to include the 'vis' method in canvas_add_for_class. and 
as a general basic question: why do we inhibit the user from being able to edit 
the canvas of [array define] in the first place?

Christof

> Gesendet: Samstag, 03. Juni 2017 um 18:34 Uhr
> Von: oliver 
> An: pd-l...@mail.iem.at
> Betreff: [PD] open array window by message
>
> hi,
> 
> a [text] object can be opened with the message "click"
> 
> what about the [array] object ?
> 
> 
> when i send it a "click", the PD window says "Bad arguments for message 
> 'click' to object 'array define'". i also tried "click 1" or "click 
> open" to no avail.
> 
> but the message itself seems to be valid, isn't it ?
> what arguments would it need to show the array window ?
> 
> 
> best
> 
> oliver
> 
> -- 
> 
> /// http://pendler.klingt.org //
> \\\ http://oliver.klingt.org  \\
> 
> 
> ___
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://lists.puredata.info/listinfo/pd-list
> 

___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


Re: [PD] should I use pddp/link in help patches?

2017-06-03 Thread Dan Wilcox
Check how the rjlib OVERVIEW.pd patch works: 
https://github.com/rjdj/rjlib/tree/master/rj 


> On Jun 2, 2017, at 6:08 AM, pd-list-requ...@lists.iem.at wrote:
> 
> From: Liam Goodacre mailto:liamg...@hotmail.com>>
> Subject: Re: [PD] should I use pddp/link in help patches?
> Date: June 2, 2017 at 5:42:51 AM CDT
> To: PD list mailto:pd-list@lists.iem.at>>
> 
> 
> Hi Roman
> 
> Context, the system I'm documenting, is far too big to be explained in a 
> single help-patch, so I want the 'context-help.pd' file to function more like 
> a Table of Contents for the rest of the documentation (plus a few quick 
> examples). It would be nice if the TOC could link to other files.
> 
> -Liam


Dan Wilcox
@danomatika 
danomatika.com 
robotcowboy.com 



___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list


[PD] open array window by message

2017-06-03 Thread oliver

hi,

a [text] object can be opened with the message "click"

what about the [array] object ?


when i send it a "click", the PD window says "Bad arguments for message 
'click' to object 'array define'". i also tried "click 1" or "click 
open" to no avail.


but the message itself seems to be valid, isn't it ?
what arguments would it need to show the array window ?


best

oliver

--

/// http://pendler.klingt.org //
\\\ http://oliver.klingt.org  \\


___
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list