Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Referring to 3D text objects as variables
Old
mdalis
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jun 2011
Smile Referring to 3D text objects as variables - 06-20-2011, 03:43 PM

Hi! This is my first post in the Alice Community, though I have been constantly referring to it throughout this summer as I have been doing Alice research at Duke University.

I'm writing a program to help kids learn how to multiply matrices. To multiply two 2x2 matrices together, I have 8 3D text objects to fill the matrices that I'm multiplying. I have an 8-item object array of these objects so I can easily refer to them and do the same thing to all of them, rather than doing it 8 times.

One thing I want to do to all of these number objects is change their text (set text to) to a number that the user inputs (or anything, for that matter), and I obviously use what as a string to change the number to a string type. The problem is that when I refer to an item in the array, Alice doesn't know for sure that it is a text object, so it doesn't let me drag objects from the array into set text to lines, or set the values of the arrays to strings. It seems to be that any object that is obviously a 3D text object can use the set text to, but if a variable object could be a 3D text object or could be something else, Alice doesn't let you use the text property. How can I, in a sense, promise Alice that my whole array is 3D text objects so that I can use the set text to method or the what as a string function?

Thank you so so much for all of your help!! Let me know if you need any more clarification! I don't think I want to post the whole program on the Internet (yet, but it will hopefully be available soon as a finished version on a Duke Alice website), but I can definitely write out some code if that would help.
   
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.