[PD-dev] data-structure style arrays in c

João Pais jmmmpais at googlemail.com
Mon Dec 30 18:25:16 CET 2013


Ok. Should I write to someone to see if that fix gets into vanilla and/or extended? To whom, Ivica, Miller, H-C, or all of them?

> I submitted a bug report several years ago about not being able to drag nested elements after dragging a >parent.  I think Ivica may have fixed it in Pd-l2ork because I can drag the nested elements after moving the >parent, so it's an issue in Pd-extended and Pd-vanilla.
>
>> -Jonathan
>
>
> On Monday, December 30, 2013 5:09 AM, João Pais <jmmmpais at googlemail.com> wrote:
> Am 30.12.2013, 02:23 Uhr, schrieb Jonathan Wilkes <jancsika at yahoo.com>:
>
>> I can click the nested scalars in Pd-l2ork, though if I move them too far upward I lose the ability to select >>them.  A scaling factor is probably off somewhere in the monstrosity of code that controls this stuff.
>
> is it possible to click/drag all nested elements only in pd-l2ork? Or you mean move the whole nested array >upwards/downwards? The latter I can do as well, the "top layer" was always accessible.
>
> The selection problem is there when scalars are positioned outside of a GOP. Although this isn't the case >here, don't know if there's a connection between both.
>
>>
>>>> But even if it worked properly, your interface will be limited by the automated, inflexible logic that only >>registers a click in the 10x10 rectangle enclosing the origin of the drawing instruction.
>
> so it seems that nested elements "below the surface" are unreachable under this gui? is it an issue with pd, >tcl/tk, or both?
>
>
>>
>>
>>>> -Jonathan
>>
>>
>> On Sunday, December 29, 2013 3:03 PM, João Pais <jmmmpais at googlemail.com> wrote:
>> Assuming that this field is further developed, I wanted to leave a question that might (?) be relevant:
>> - when drawing arrays with encapsulated arrays, it's not possible to click-and-drag to change the array >>contents in the same way it can be done with normal (single-layered) arrays. Or, to click and type numerical >>values.
>>
>> As a test you can have this patch from my data-structures workshop:
>> - open [pd graphic]
>> - you can click/drag the base array in the green line, but you can click/drag the arrays inside it
>> - to change these arrays one must go to [pd encapsulated-array], and select the elements through the >>program
>>
>> I don't know if this is directly related with "multi-dim arrays", but I thought about warning about this. I haven't >>seen encapsulated arrays in any other patches, so I don't know if many people are aware of this.
>>
>> Best,
>>
>> João
>>
>>
>>> How do you do multi-dim arrays in c where each row can have a different number of columns?
>>>
>>> In Pd I would do this:
>>> [struct foo array a data]
>>>
>>> and:
>>>
>>> [struct data symbol svg_drawing_command array a the_data]
>>>
>>> and finally:
>>>
>>> [struct the_data float datum]
>>>
>>> In c I've done a character array, an int telling me how big the character array is, an array for the numbers >>>(actually a t_fielddesc array so they are settable per instance), and an int array to tell how many numbers >>>per command.  So if the command is "M 10 10 L 20 30 A 1 2 3 4 5 6 7", the char array stores "MLA" >>>and the array of numbers has "10 10 20 30 1 2 3 4 5 6 7".
>>>
>>> I'm sending path data to the gui using this, so I want it to be fast.  Is there a better way?
>>>
>>> -Jonathan
>>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20131230/7786aee1/attachment-0001.htm>


More information about the Pd-dev mailing list