[PD] gui object arguments
Dan Wilcox
danomatika at gmail.com
Wed Aug 7 15:44:29 CEST 2013
In looking at g_hslider.c, I imagine something like the following in hslider_new():
// 2 args: range
else if((argc == 2) || IS_A_FLOAT(argv, 0) && IS_A_FLOAT(argv, 1)) {
min = (double)atom_getfloatarg(0, argc, argv);
max = (double)atom_getfloatarg(1, argc, argv);
}
// 4 args: range & size
else if((argc == 4) || IS_A_FLOAT(argv, 0) && IS_A_FLOAT(argv, 1)
IS_A_FLOAT(argv, 2) && IS_A_FLOAT(argv, 3)) {
w = (int)atom_getintarg(0, argc, argv);
h = (int)atom_getintarg(1, argc, argv);
min = (double)atom_getfloatarg(2, argc, argv);
max = (double)atom_getfloatarg(3, argc, argv);
}
And an equivalent for the other gui objects.
On Aug 7, 2013, at 6:00 AM, pd-list-request at iem.at wrote:
> From: IOhannes m zmölnig <zmoelnig at iem.at>
> Subject: Re: [PD] gui object arguments
> Date: August 7, 2013 2:42:33 AM EDT
> To: pd-list at iem.at
>
>
> On 08/07/13 07:49, Dan Wilcox wrote:
>> Do any of the pd gui / iem gui objects take creation args? Forgive me if
>> I missed this in the help patches.
>
> all of them do, as this is the way how they keep their properties when
> loading a patch.
>
> on the downside, most of these arguments are not really meant for humans
> to parse/write.
> and afair, they don't support "short lists" of arguments (so you have to
> specify all arguments, or a rather longish subset)
>
>
> fgmasdr
> IOhannes
--------
Dan Wilcox
@danomatika
danomatika.com
robotcowboy.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130807/3ffcc332/attachment-0001.htm>
More information about the Pd-list
mailing list