Hello, I'm trying to clean up my pd-scheme library a bit, and would like to implement the canvas help.
The problem is, from the point of view of PD, I have a single extern where the first argument tells scheme which scheme extern to make. So I was hoping that I could get the help action to look up the help file according to this first argument and not just the class name.
Looking at the sources, I am not sure how to do this, or even if this is designed to be possible. I am thinking that in my setup I would reset the help method for my class, but this won't work because my help action would need access to the object and not just the class.
I guess the answer is that this goes against the design of PD, but I thought I'd post this in case there's some ideas or I'm overlooking something.
Larry
This is an interesting idea... I'll stick it on my (long) dolist... I don't think there's any existing way you can do this in Pd.
cheers Miller
On Sun, Jan 27, 2002 at 10:21:42AM -0500, Larry Troxler wrote:
Hello, I'm trying to clean up my pd-scheme library a bit, and would like to implement the canvas help.
The problem is, from the point of view of PD, I have a single extern where the first argument tells scheme which scheme extern to make. So I was hoping that I could get the help action to look up the help file according to this first argument and not just the class name.
Looking at the sources, I am not sure how to do this, or even if this is designed to be possible. I am thinking that in my setup I would reset the help method for my class, but this won't work because my help action would need access to the object and not just the class.
I guess the answer is that this goes against the design of PD, but I thought I'd post this in case there's some ideas or I'm overlooking something.
Larry
Am Sonntag, den 27. Januar 2002 um 10:21:42 Uhr (-0500) schrieb Larry Troxler:
Hello, I'm trying to clean up my pd-scheme library a bit, and would like to implement the canvas help.
The problem is, from the point of view of PD, I have a single extern where the first argument tells scheme which scheme extern to make. So I was hoping that I could get the help action to look up the help file according to this first argument and not just the class name.
Looking at the sources, I am not sure how to do this, or even if this is designed to be possible. I am thinking that in my setup I would reset the help method for my class, but this won't work because my help action would need access to the object and not just the class.
I guess the answer is that this goes against the design of PD, but I thought I'd post this in case there's some ideas or I'm overlooking something.
Larry
If I've understood the problem well, there should be two ways of solving your problem:
You define different help functions for the specific needs. In the new() method you set a function (or in pd-ish) method pointer to the appropriate help function which should be called from within the help function you declared in the setup function. This pointer has to be stored in the structure of your class, like any other local data.
In the new() method you store the initialization argument or a flag indicating which type of object it is and store THAT in the class struct.
Then you do a switch in the general help method and code the different help methods within the same function.
or am I completely missing the point?
Yours, Orm
Hi,
sorry for my previous post. I was still thinking about help definitions in a fashion by declaring a specific "help" method which was triggered by a help message in an inlet. That way you would get the pointer to the object. But I see your problem now, Larry, and have no answer.
Yours, Orm
If I've understood the problem well, there should be two ways of solving your problem:
You define different help functions for the specific needs. In the new() method you set a function (or in pd-ish) method pointer to the appropriate help function which should be called from within the help function you declared in the setup function. This pointer has to be stored in the structure of your class, like any other local data.
In the new() method you store the initialization argument or a flag indicating which type of object it is and store THAT in the class struct.
Then you do a switch in the general help method and code the different help methods within the same function.
or am I completely missing the point?
Yours, Orm