First time here? Check out the FAQ!
x

how to create text field in a sound

0 votes
18 views
Hello, I'm having real difficulty creating a text field.  There are sounds I use and want to add a text field to put notes, capytalk expressions, etc.  

What I've tried so far - when I have a sound I want to add a text box to, I will start with New Class from Example.  I will put a !textp in whatever parameter I can to force the new class to add an extra parameter slot.  It's at this point I am stuck. I've tried multiple parameter types, codeString, stringOrNil, but none of them give an option for field type text.  Is that what I should be looking for?  

I have also tried New Class from Example on the Annotation sound, putting a ? inside the text field thinking that maybe the new class would show me what the text parameter type is, but it doesn't (I assume the text field behaves differently from an event field).

Any advice greatly appreciated!
asked 1 day ago in Capytalk & Smalltalk by john-balcom (270 points)

1 Answer

0 votes

I might be making progress.  I found in Kyma X Revealed parameter type string is 'A text editor that will accept any sequence of characters. It cannot be set to a variable.'  I successfully was able to change textp parameter to string.  But, even with that parameter set to string, I can't type text into the parameter field. 

 

answered 22 hours ago by john-balcom (270 points)
I've made a bit more progress.  When I choose new class from example, if I type this ?Textp. !AnotherEvent, I get a a pop up asking to assign ?Textp a value.  if I give it a value in single quotes, ie 'text' then the parameter is not assigned as an event, which is what I think was happening in my previous post. Doing it this way I can save the parameter as a script, and now have a text box in my sound.  I can't see the text in the VCS though, because I can't get the Visible in VCS toggle to be part of my new class.

I think it would be useful to be able to add a text box and the visible in VCS toggle to any sound.  I know I can  use the annotation and attach it to whatever sound I want.  But the way my brain works, having everything in one sound, not two, is ideal, especially if copying and pasting capyexpressions.
...