[L2Ork-dev] request for mentorship: comment parsing

Ivica Bukvic 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
the road.

Best,

Ico


-- 
Ivica Ico Bukvic, D.M.A.
Creative Technologies in Music
Director -- DISIS, L2Ork, CTM
ICAT Senior Fellow
Virginia Tech
School of Performing Arts – 0141
Blacksburg, VA 24061
(540) 231-6139
ico at vt.edu
www.performingarts.vt.edu
disis.icat.vt.edu
l2ork.icat.vt.edu
ico.bukvic.net

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
> TextEncoder
>
> 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. :)
>
> Thoughts?
>
> -Jonathan
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20180430/ba764d18/attachment.html>


More information about the L2Ork-dev mailing list