[L2Ork-dev] request for mentorship: comment parsing
ico at vt.edu
Mon Apr 30 09:43:39 EDT 2018
I like it, as it would also remove messy workaround we've had up until now
to allow line breaks. I would, however, name the class something other than
text2 asthar may limit code's comprehensibility and maintainability down
Ivica Ico Bukvic, D.M.A.
Creative Technologies in Music
Director -- DISIS, L2Ork, CTM
ICAT Senior Fellow
School of Performing Arts – 0141
Blacksburg, VA 24061
ico at vt.edu
On Sun, Apr 29, 2018, 19:55 Jonathan Wilkes <jon.w.wilkes at gmail.com> wrote:
> Ok, I've got a rough spec for a solution:
> 1. Add a creator for "text_class"-- let's call it "text2"
> 2. Change the GUI so that creating a "Put" menu comment creates a
> "text2" instead of a "text"
> 3. On text_save, let's save our text objects with selector "text2" if that
> was our creator at instantiation time.
> 4. When user inputs some text inside a "text2" in the GUI and tries to
> instantiate, the GUI splits the string into an array of characters and
> then maps each of those characters to one or more bytes using
> 5. The GUI sends "text2" a list of bytes
> 6. Pd receives the "text2" message and saves them to its buf.
> 7. Now, we've got a choice. We can either fudge around rtext_senditup,
> or we can make a special case in the GUI to use TextDecoder on the list
> of bytes we receive from Pd. I'm not sure how we signal our special case--
> we might be able to just query the <g> we belong to for a "text2" class
> or something like that.
> I just wrote this very quick, but it should cover:
> * displaying arbitrary comment content in GUI
> * sending arbitrary comment content GUI->Pd
> * storing it in Pd
> * saving it in Pd
> * sending it from Pd->GUI
> A nice side effect is that we'd get newlines and multiple contiguous
> spaces for free. :)
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the L2Ork-dev