PDA

View Full Version : Multiple users merging methods


parrisgeiser
12-22-2011, 03:38 PM
I'm teaching a course using Alice.
The students are working on a project as a team.
:confused: How can they merge together various parts of the project?

arty-fishL
12-22-2011, 03:51 PM
I'm teaching a course using Alice.
The students are working on a project as a team.
:confused: How can they merge together various parts of the project?
Well, emm, they cant really :( . Not easily certainly.

Mr Kidnapper
12-22-2011, 04:16 PM
I bet if you tried you could write a script that extracts the .a2c files as a zip in the TEMP folder, copies the folders from one .a2c to the other and reads the toplevel elementData.xml for the lines <child filename=""/> and <item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion"></item> and copypasta them into the main elementData.xml

The only things you have to edit in the elementData.xml are those two lines to get Alice to read them properly.

arty-fishL
12-22-2011, 04:26 PM
I bet if you tried you could write a script that extracts the .a2c files as a zip in the TEMP folder, copies the folders from one .a2c to the other and reads the toplevel elementData.xml for the lines <child filename=""/> and <item criterionClass="edu.cmu.cs.stage3.alice.core.criterion.InternalRef erenceKeyedCriterion"></item> and copypasta them into the main elementData.xml

The only things you have to edit in the elementData.xml are those two lines to get Alice to read them properly.

As I said, not easily. Is this a challenge? I'm presuming it is. The way I would do it though wouldn't have involved entering the .a2w , but you have given advice and I am going to attempt to follow it now.

arty-fishL
12-22-2011, 06:18 PM
See this thread (http://www.alice.org/community/showthread.php?t=7858).

I could create a script, but the way you said would cause too much ambiguity, with a high possibility of overlapping names.

CSS562
12-23-2011, 03:21 PM
See this thread (http://www.alice.org/community/showthread.php?t=7858).

I could create a script, but the way you said would cause too much ambiguity, with a high possibility of overlapping names.

Thanks for your info. But, for me, this is way to complicated. I'm pretty sure that the students will have enough on their plate just creating the "worlds". It would seem to me that since Alice is supposed to teach programming, that it would allow methods or objects created to be easily incorporated into a world.
Much like any programming language would allow this.

TauTrumpsPi
12-24-2011, 09:20 AM
Well, you can do objects, just not methods... Actually, you can import a method by putting it into an object then saving that object.

arty-fishL
12-24-2011, 09:41 AM
you can import a method by putting it into an object then saving that object.That's essentially what my method does. I remembered how X had come up with a similar idea of just renaming an a2w to an a2c and importing. But that had many complications which made it both impractical and much harder in this scenario.

All my method does is completely convert a world to an object, then you can do what TauTrumpsPi said (do you have a nickname on the forums, something like TTP?).

Sorry, I have a habit of over-complicating things that aren't actually that hard when you try them. Maybe I will make a script, but not a clean, bug free one, just a quick thing.

TauTrumpsPi
12-24-2011, 03:12 PM
(do you have a nickname on the forums, something like TTP?).

To be honest, if I recognize it, and it's not intentionally insulting, I don't care what you call me.

arty-fishL
12-24-2011, 03:57 PM
Well, I've made a script that should work, but I'm getting an error from within the jython modules. It seems the ziplib.py module has bugs and has not been built to call the Java code properly in part of it, so I will need to make a workaround.