This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#426 2012-06-14 08:08:34

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Block Files

Cool! What's you desktop? (Just curious, looking at the screenshot  tongue )

Also, can you mdls it?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#427 2012-06-14 08:37:12

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Hardmath123 wrote:

Cool! What's you desktop? (Just curious, looking at the screenshot  tongue )

Also, can you mdls it?

Queen.  smile  Queen is awesome. I love "the show must go on".
http://indexofwallpapers.com/wallpapers/queen-wallpapers/queen-wallpaper-2-13048.jpg

Offline

 

#428 2012-06-14 08:40:20

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Strangely enough it [the result of mdls] is the same as before I started. That's weird since it shows an icon but the UTI type is apparently ignored.

Offline

 

#429 2012-06-26 18:06:58

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Hardmath, this is amazing!
I found a code in squeak which let's you set the UTI type for a file!

Code:

setFileTypeToObject
    "On the Macintosh, set the file type and creator of this file to be a Squeak object file. On other platforms, do nothing. Setting the file type allows Squeak object files to be sent as email attachments and launched by double-clicking. On other platforms, similar behavior is achieved by creating the file with the '.sqo' file name extension."

    FileDirectory default
        setMacFileNamed: self fullName
        type: 'SOBJ'
        creator: 'FAST'.

all that needs to be done is change a few strings around.

Offline

 

#430 2012-06-27 06:13:23

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Block Files

dreamod wrote:

Hardmath, this is amazing!
I found a code in squeak which let's you set the UTI type for a file!

Code:

setFileTypeToObject
    "On the Macintosh, set the file type and creator of this file to be a Squeak object file. On other platforms, do nothing. Setting the file type allows Squeak object files to be sent as email attachments and launched by double-clicking. On other platforms, similar behavior is achieved by creating the file with the '.sqo' file name extension."

    FileDirectory default
        setMacFileNamed: self fullName
        type: 'SOBJ'
        creator: 'FAST'.

all that needs to be done is change a few strings around.

I was actually wondering about that a couple of days ago. Since Squeak was originally Apple's, I think, it would be silly of them not to add that functionality.

Anyway, does it work?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#431 2012-06-27 13:16:30

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

I'm running on a different computer now, (Mac OS X 10.4.11 Tiger, I love macs and I would never trade it for a new PC). I seem to get different results here. The Block Importer has never been run on this computer before and the results for an mdls are different than on my other computer. (I'm spending the summer somewhere else). They seem to automatically be a com.dreamod.block type on this computer. I'll try this again this fall on my snow leopard computer.
This should be the proper UTI tag (based off of the original Squeak VM).

Code:

<key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Block Importer Block File</string>
            <key>UTTypeIdentifier</key>
            <stringcom.dreamod.block</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>DRbl</string>
                <key>public.filename-extension</key>
                <array>
                    <string>block</string>
                </array>
                <key>public.mime-type</key>
                <string>application/dreamod-block</string>
            </dict>
        </dict>
    </array>

How do you make files have custom icons, rendered from the data in the file?

Offline

 

#432 2012-06-27 20:38:43

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Block Files

dreamod wrote:

I'm running on a different computer now, (Mac OS X 10.4.11 Tiger, I love macs and I would never trade it for a new PC). I seem to get different results here. The Block Importer has never been run on this computer before and the results for an mdls are different than on my other computer. (I'm spending the summer somewhere else). They seem to automatically be a com.dreamod.block type on this computer. I'll try this again this fall on my snow leopard computer.
This should be the proper UTI tag (based off of the original Squeak VM).

Code:

<key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Block Importer Block File</string>
            <key>UTTypeIdentifier</key>
            <stringcom.dreamod.block</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>DRbl</string>
                <key>public.filename-extension</key>
                <array>
                    <string>block</string>
                </array>
                <key>public.mime-type</key>
                <string>application/dreamod-block</string>
            </dict>
        </dict>
    </array>

How do you make files have custom icons, rendered from the data in the file?

That's part of the QuickLook plugin, I'll try and take care of it, too.  smile


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#433 2012-06-28 08:52:47

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Hardmath123 wrote:

dreamod wrote:

I'm running on a different computer now, (Mac OS X 10.4.11 Tiger, I love macs and I would never trade it for a new PC). I seem to get different results here. The Block Importer has never been run on this computer before and the results for an mdls are different than on my other computer. (I'm spending the summer somewhere else). They seem to automatically be a com.dreamod.block type on this computer. I'll try this again this fall on my snow leopard computer.
This should be the proper UTI tag (based off of the original Squeak VM).

Code:

<key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Block Importer Block File</string>
            <key>UTTypeIdentifier</key>
            <stringcom.dreamod.block</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>DRbl</string>
                <key>public.filename-extension</key>
                <array>
                    <string>block</string>
                </array>
                <key>public.mime-type</key>
                <string>application/dreamod-block</string>
            </dict>
        </dict>
    </array>

How do you make files have custom icons, rendered from the data in the file?

That's part of the QuickLook plugin, I'll try and take care of it, too.  smile

great so, to set the "Mac File Type" you need to input the code for the file ('DRbl') (Dreamod Block) and creator of the application 'DRMD' (Dreamod), which inscratch are respectively 'STsb' (Scratch Team Scratch Binary) and MITS (Massachusetts Institution of Technology Scratch (I think). I just hope the quicklook plugin works.  smile

Offline

 

#434 2012-06-28 10:57:55

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Block Files

dreamod wrote:

Hardmath123 wrote:

dreamod wrote:

I'm running on a different computer now, (Mac OS X 10.4.11 Tiger, I love macs and I would never trade it for a new PC). I seem to get different results here. The Block Importer has never been run on this computer before and the results for an mdls are different than on my other computer. (I'm spending the summer somewhere else). They seem to automatically be a com.dreamod.block type on this computer. I'll try this again this fall on my snow leopard computer.
This should be the proper UTI tag (based off of the original Squeak VM).

Code:

<key>UTExportedTypeDeclarations</key>
    <array>
        <dict>
            <key>UTTypeConformsTo</key>
            <array>
                <string>public.data</string>
            </array>
            <key>UTTypeDescription</key>
            <string>Block Importer Block File</string>
            <key>UTTypeIdentifier</key>
            <stringcom.dreamod.block</string>
            <key>UTTypeTagSpecification</key>
            <dict>
                <key>com.apple.ostype</key>
                <string>DRbl</string>
                <key>public.filename-extension</key>
                <array>
                    <string>block</string>
                </array>
                <key>public.mime-type</key>
                <string>application/dreamod-block</string>
            </dict>
        </dict>
    </array>

How do you make files have custom icons, rendered from the data in the file?

That's part of the QuickLook plugin, I'll try and take care of it, too.  smile

great so, to set the "Mac File Type" you need to input the code for the file ('DRbl') (Dreamod Block) and creator of the application 'DRMD' (Dreamod), which inscratch are respectively 'STsb' (Scratch Team Scratch Binary) and MITS (Massachusetts Institution of Technology Scratch (I think). I just hope the quicklook plugin works.  smile

Huh? Where?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#435 2012-06-28 13:15:50

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Hardmath123 wrote:

Huh? Where?

In the info.plist

Offline

 

#436 2012-07-05 16:19:56

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: Block Files

Could you also add this to my mod, PeckyBlocks?
http://misc.squawkerscreations.org/Peck … 7Alpha.EXE
its a preview-and a full version is coming soon
(Could you add this in a locked Dev tab?)

Last edited by Squawkers13 (2012-07-05 16:22:07)


http://pekkit.net/banners/pekkit.png

Offline

 

#437 2012-07-05 17:32:47

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Squawkers13 wrote:

Could you also add this to my mod, PeckyBlocks?
http://misc.squawkerscreations.org/PeckyBlocks/PeckyBlocks007Alpha.EXE
its a preview-and a full version is coming soon
(Could you add this in a locked Dev tab?)

Sure, but I'm a mac user so I can't open EXEs. Just give me the image file.

Offline

 

#438 2012-07-05 20:49:53

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: Block Files

dreamod wrote:

Squawkers13 wrote:

Could you also add this to my mod, PeckyBlocks?
http://misc.squawkerscreations.org/PeckyBlocks/PeckyBlocks007Alpha.EXE
its a preview-and a full version is coming soon
(Could you add this in a locked Dev tab?)

Sure, but I'm a mac user so I can't open EXEs. Just give me the image file.

http://scratchr.squawkerscreations.org/ … lpha.image
(never mind the locked Dev tab...)

Last edited by Squawkers13 (2012-07-07 17:57:42)


http://pekkit.net/banners/pekkit.png

Offline

 

#439 2012-07-07 14:51:11

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: Block Files

The file is hosted in last post...


http://pekkit.net/banners/pekkit.png

Offline

 

#440 2012-07-07 21:34:23

Squawkers13
Scratcher
Registered: 2010-11-20
Posts: 500+

Re: Block Files

Squawkers13 wrote:

The file is hosted in last post...

bump


http://pekkit.net/banners/pekkit.png

Offline

 

#441 2012-07-08 09:40:12

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

thanks

Offline

 

#442 2012-07-11 12:08:47

Randomno
Scratcher
Registered: 2012-06-04
Posts: 39

Re: Block Files

Hi. This topic is quite long and I've had problems with adding the code. Any help?


http://img209.imageshack.us/img209/5524/randomno.png
I do stuff with stuff. I also stuff stuff.

Offline

 

#443 2012-07-12 21:26:03

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

Randomno wrote:

Hi. This topic is quite long and I've had problems with adding the code. Any help?

http://www.mediafire.com/?bjdyg9wd965onla is the most recent version.

Offtopic: i just got an iPad and I love it  smile

Offline

 

#444 2012-07-13 06:34:05

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Block Files

2 or 3? I've got a 2. Quite fun. I'm also getting a new Mac sometime soon hopefully.  smile  [/offtopic]


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#445 2012-10-25 12:37:24

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

I'm going to completely redo the block importer, but the block file format will be exactly the same.

Offline

 

#446 2012-11-06 09:30:51

luluhouse7
New Scratcher
Registered: 2012-10-29
Posts: 5

Re: Block Files

Hey,

I'm really confused on what I should use for the block importer and how to get block files. Is it in a repository? (and if it is how do you access a repository from windows?) or do you need to manually copy code?

I'm using Windows 7 and the latest scratch version. I'm not familiar with scratch-type coding, but I'm good with bash and dos so I can get around if someone would be willing to explain.

thanks,
Lils

Offline

 

#447 2012-11-06 09:53:22

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

luluhouse7 wrote:

Hey,

I'm really confused on what I should use for the block importer and how to get block files. Is it in a repository? (and if it is how do you access a repository from windows?) or do you need to manually copy code?

I'm using Windows 7 and the latest scratch version. I'm not familiar with scratch-type coding, but I'm good with bash and dos so I can get around if someone would be willing to explain.

thanks,
Lils

You just need to download it from here and it should work fine: http://www.mediafire.com/download.php?b1uimly0wq83m3q

Offline

 

#448 2012-11-06 10:32:45

luluhouse7
New Scratcher
Registered: 2012-10-29
Posts: 5

Re: Block Files

How do I install it? Do I mount the image in the zip?

Offline

 

#449 2012-11-06 11:10:18

dreamod
New Scratcher
Registered: 2012-01-22
Posts: 100+

Re: Block Files

luluhouse7 wrote:

How do I install it? Do I mount the image in the zip?

yes

Offline

 

#450 2012-11-06 11:10:20

luluhouse7
New Scratcher
Registered: 2012-10-29
Posts: 5

Re: Block Files

WAIT. sorry, I thought for a second that it was an .img >_>

so basically, how do I get it into scratch? I did the whole "file it in" thing with the older version, but clearly this works differently...

Offline

 

Board footer