Java & Scratch on XO

John Maloney jmaloney at media.mit.edu
Mon Dec 1 10:30:48 EST 2008


Hi, Bert and Tomeu.

Many thanks for the pointers and examples. I've put together a  
mimetypes.xml file and will test it when I get home. (I don't have my  
XO with me.)

I will let you know if I have any problems or questions.

Thanks again!

	-- John

On Dec 1, 2008, at 9:50 AM, Bert Freudenberg wrote:
> On 01.12.2008, at 15:37, Tomeu Vizoso wrote:
>
>> On Mon, Dec 1, 2008 at 3:16 PM, John Maloney  
>> <jmaloney at media.mit.edu> wrote:
>>> Hi, Tomeu.
>>>
>>> Thanks for your reply. It's great that there is a way to handle  
>>> this!
>>>
>>> I took a quick look at the EToys .xo bundle and did not see a
>>> mimetypes.xml file. However, I did notice that EToys lists a lot of
>>> mime types in it's activity.info. What I don't see is how the system
>>> would know what file extension to associate with a type like
>>> "application/x-squeak-project". Is that what the mimetypes.xml is  
>>> for?
>>> Do you know of any other activity that uses a mimetypes.xml file  
>>> that
>>> would be a good model for Scratch?
>>
>> True, have talked with Bert and he said that the etoys.xml file they
>> have in the source repository is for the rpm, not for the .xo. So
>> sorry for the misleading pointer.
>>
>> The idea is that your scratch bundle would have a file named
>> mimetypes.xml in the activity dir (so next to the activity.info file,
>> the icon, etc) and the contents would be analogous to those in
>> etoys.xml. As you can see, that file relates extensions to mime  
>> types.
>>
>> Unfortunately, cannot find now an activity that currently uses it,  
>> but
>> ping me again if you have trouble putting that to work and I will  
>> look
>> harder or do a small experiment here.
>
>
> Yes - should be pretty simple. Here's the essence of the Etoys one  
> (John: we actually dropped the capital T):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info 
> ">
>   <mime-type type="application/x-squeak-project">
>     <sub-class-of type="application/zip"/>
>     <comment>Squeak Project</comment>
>     <glob pattern="*.pr"/>
>   </mime-type>
> </mime-info>
>
> - Bert -
>
>




More information about the Devel mailing list