Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Reply
 
Thread Tools Display Modes
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-17-2011, 07:45 AM

Quote:
Originally Posted by arty-fishL View Post
If you want a new line at any time just add in \n .
Add it in where?


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 06-17-2011, 09:05 AM

Wherever you're writing just add \n into the string for a new line. For example:

"hi there \n my name is Bob\nGreat!"

would produce

Code:
hi there 
 my name is Bob
Great!
Anyway, what you were looking for was writing to line 0, not line 1.

I could maybe update it to change writing line 0 to line 1 instead (so the numbers are shifted down one) and so on. I could also add a function to create a new line or set of lines; one for changing a string to a number; maybe even also a variable saving function.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-17-2011, 09:46 PM

It failed as well when I tried writing to line 0.


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 06-18-2011, 05:14 AM

Quote:
Originally Posted by DensetsuNoKaboom View Post
It failed as well when I tried writing to line 0.
Ensure the file exists first - use new_file with overwrite set to false. If writing to line 0 doesn't work then try using write. It should work, I've tested it lots.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 06-29-2011, 04:06 PM

Is this compatible with Mac OS X? I recognized it started with C:// so I changed it to the Mac filepath and when I ran the world it threw an error:


Error during simulation.


Alice version: 2.2 09/10/2010

Throwable that caused the error:
Traceback (innermost last):
File "edu.cmu.cs.stage3.alice.core.property.ScriptPrope rty[name=script,owner=edu.cmu.cs.stage3.alice.core.res ponse.ScriptResponse[world.iOTool.event.__Unnamed0__]]", line 1, in ?
File "<string>", line 26, in ?
File "<string>", line 12, in patchOS
IOError: File not found - jython-2.1\Lib\javaos.py (No such file or directory)
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Default 06-29-2011, 05:56 PM

Quote:
Originally Posted by Dj Tech42 View Post
Is this compatible with Mac OS X? I recognized it started with C:// so I changed it to the Mac filepath and when I ran the world it threw an error:


Error during simulation.


Alice version: 2.2 09/10/2010

Throwable that caused the error:
Traceback (innermost last):
File "edu.cmu.cs.stage3.alice.core.property.ScriptPrope rty[name=script,owner=edu.cmu.cs.stage3.alice.core.res ponse.ScriptResponse[world.iOTool.event.__Unnamed0__]]", line 1, in ?
File "<string>", line 26, in ?
File "<string>", line 12, in patchOS
IOError: File not found - jython-2.1\Lib\javaos.py (No such file or directory)
Ehh, sorry, it seems your version (either your version is broken or Mac version is broken) of Alice has its file directory incorrectly referenced. You could try updating Alice, there's a newer version of 2.2 available, but I'm not sure that will help.


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 06-29-2011, 06:20 PM

I already have the latest version. I think it has something to do with the file system being different on Mac OS X. I think this is a very important feature that needs to be implemented into Alice and I am sad that it isn't working
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 06-29-2011, 06:58 PM

Is there a way I can change how Alice accesses the internal files? It can't find one of its own files, which is really annoying
   
Reply With Quote
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Question 06-29-2011, 07:14 PM

Quote:
Originally Posted by Dj Tech42 View Post
I already have the latest version. I think it has something to do with the file system being different on Mac OS X. I think this is a very important feature that needs to be implemented into Alice and I am sad that it isn't working
Oh, the latest Windows version is a 2011 version, youve got a 2010 (maybe Mac isn't as updated yet).

Quote:
Originally Posted by Dj Tech42 View Post
Is there a way I can change how Alice accesses the internal files? It can't find one of its own files, which is really annoying
Elaborate on this error, I may be able to help. What file cant it find?


█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█
█░░▓░░░░░░░▓░░░░░░░░░░░▓▓░░▓░░░░░░▓░░░▓░░░░█
█░▓░▓░▓▓▓░▓▓▓░▓░▓░░░░░░▓▒▒░░▒░░▓▓░▓▓▓░▓▒░░░█
█░▓▓▓▒▓▒▒▒░▓▒▒▓▓▓▒▓▓▓░▓▓▓░░▓░░░▓▒▒▓▒▓▒▓▒░░░█
█░▓▒▓▒▓▒░░░▓▓░░▒▓▒░▒▒▒░▓▒▒░▓▓░▓▓▒░▓▒▓▒▓▒░░░█
█░▓▒▓▒░▒░░░░▒▒▓▓▓▒░░░░▓▓▒░░░▒▒░▒▒░░▒░▒▓▓▓░░█
█░░▒░▒░░░░░░░░░▒▒▒░░░░░▒▒░░░░░░░░░░░░░░▒▒▒░█
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█

I have mostly moved on from Alice, but may still respond to messages if important [-]
   
Reply With Quote
Old
Dj Tech42
Senior Member
 
Dj Tech42's Avatar
 
Status: Offline
Posts: 202
Join Date: Feb 2011
Default 06-29-2011, 07:46 PM

/Applications/Alice 2.2.app/Contents/Required/jython-2.1/Lib/javaos.py

javaos.py is the file it is looking for, and I know where it is ^. Is there some way I can show Alice where to look for the file?

And the Mac version was released September 2010.
   
Reply With Quote
Reply

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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.