Also, you just posted what you did last time above ^^ was that the plist which gave you working UTIs?
Offline
That works?
Offline
Offline
I GOT IT!
You can't do it within the Squeak source, you need to make a new application called MacBlock which, given the source, creates a .block file with a com.dream.block file. I made myself that app.
Seriously, when I mdls'ed that I did a little victory dance in front of my computer.
Offline
Hardmath123 wrote:
I GOT IT!
You can't do it within the Squeak source, you need to make a new application called MacBlock which, given the source, creates a .block file with a com.dream.block file. I made myself that app.
Seriously, when I mdls'ed that I did a little victory dance in front of my computer.
Wait, are you saying I need a different application which writes the file?
Offline
dreamod wrote:
Hardmath123 wrote:
I GOT IT!
You can't do it within the Squeak source, you need to make a new application called MacBlock which, given the source, creates a .block file with a com.dream.block file. I made myself that app.
Seriously, when I mdls'ed that I did a little victory dance in front of my computer.Wait, are you saying I need a different application which writes the file?
Ummm...
Yeah. It just needs to process the file; it takes in a file "a.block" and saves a new "a-uti.block" wherever a.block is.
Offline
Hardmath123 wrote:
dreamod wrote:
Hardmath123 wrote:
I GOT IT!
You can't do it within the Squeak source, you need to make a new application called MacBlock which, given the source, creates a .block file with a com.dream.block file. I made myself that app.
Seriously, when I mdls'ed that I did a little victory dance in front of my computer.Wait, are you saying I need a different application which writes the file?
Ummm...
Yeah. It just needs to process the file; it takes in a file "a.block" and saves a new "a-uti.block" wherever a.block is.
So the block importer would export the block file and then launch the application which would read a file which the block importer has written the file directory to, and then it would rewrite the block file?
Offline
What is the 'read file' method in Objective-C?
I want it to read a certain file.
This is a good writter isn't it?
- (void)writeBlockFile(id)sender{ NSString *filePath; filePath = [//a reading method to a predetermined file that gets edited by the block importer app]; [" " writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:NULL];} //It just needs to write any data, spaces are ignored when reading the block file, anyway.
So, I just need the read file method.
Offline
I think it's [NSString stringWithContentsOfURL: [NSURL URLWithString:@"path here"]]
not sure though, check the developer docs (search for NSString class reference).
Offline
dreamod wrote:
Hardmath123 wrote:
dreamod wrote:
Wait, are you saying I need a different application which writes the file?Ummm...
Yeah. It just needs to process the file; it takes in a file "a.block" and saves a new "a-uti.block" wherever a.block is.So the block importer would export the block file and then launch the application which would read a file which the block importer has written the file directory to, and then it would rewrite the block file?
Yeah. I just updated it, so it's not automatic. Imagine it's like TextEdit: you open up a file, then simply save it again, and it will add the UTI for you.
Offline
Hardmath123 wrote:
dreamod wrote:
Hardmath123 wrote:
Ummm...
Yeah. It just needs to process the file; it takes in a file "a.block" and saves a new "a-uti.block" wherever a.block is.So the block importer would export the block file and then launch the application which would read a file which the block importer has written the file directory to, and then it would rewrite the block file?
Yeah. I just updated it, so it's not automatic. Imagine it's like TextEdit: you open up a file, then simply save it again, and it will add the UTI for you.
I want it automatic. The user won't notice it. So, it opens up and then reads a file which specified the file it's supposed to read from. Then it writes a space to it (" "). Then the UTI type is applied.
Offline
Hmm. I'll have to think about that.
Last edited by Hardmath123 (2012-05-27 11:08:46)
Offline
Here's a wild guess (add this into your info.plist):
<key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>Block file</string> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> <string>com.dream.block</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>block</string> </array> </dict> </dict> </array> <key>CFBundleDocumentTypes</key> <array> <dict> <key>LSItemContentTypes</key> <array> <string>com.dream.block</string> </array> <key>CFBundleTypeExtensions</key> <array> <string>block</string> </array> <key>CFBundleTypeIconFile</key> <string></string> <key>CFBundleTypeName</key> <string>Block File</string> <key>CFBundleTypeOSTypes</key> <array> <string></string> </array> </dict> </array>
Offline
Hardmath123 wrote:
Here's a wild guess (add this into your info.plist):
Code:
<key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>Block file</string> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> <string>com.dream.block</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>block</string> </array> </dict> </dict> </array> <key>CFBundleDocumentTypes</key> <array> <dict> <key>LSItemContentTypes</key> <array> <string>com.dream.block</string> </array> <key>CFBundleTypeExtensions</key> <array> <string>block</string> </array> <key>CFBundleTypeIconFile</key> <string></string> <key>CFBundleTypeName</key> <string>Block File</string> <key>CFBundleTypeOSTypes</key> <array> <string></string> </array> </dict> </array>
I'm not a big application maker could you make it in Xcode and send it? Here's my exclusive dreamod adress, not a personal one. I don't really check it at all. [email removed by moderator]
Last edited by sparks (2012-05-27 13:00:51)
Offline
You can make email tags, you know? [email removed by moderator]. But I use Google Docs for file sharing because I don't like sharing my email all over the place.
[/offtopic]
I can actually just give you the edited plist over here, because it's just text. I'll do it tomorrow, I'm really tired now. Or maybe I'll be back after a milkshake booster.
Last edited by sparks (2012-05-27 13:01:18)
Offline
Try this plist:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>Block file</string> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> <string>com.dream.block</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>block</string> </array> </dict> </dict> </array> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>image</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakImage.icns</string> <key>CFBundleTypeName</key> <string>Squeak Image File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STim</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sources</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakSources.icns</string> <key>CFBundleTypeName</key> <string>Squeak Sources File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STso</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>changes</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakChanges.icns</string> <key>CFBundleTypeName</key> <string>Squeak Changes File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STch</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sprite</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchProject.icns</string> <key>CFBundleTypeName</key> <string>Scratch Sprite File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsp</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSTypeIsPackage</key> <false/> <key>NSPersistentStoreTypeKey</key> <string>XML</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>scratch</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchProject.icns</string> <key>CFBundleTypeName</key> <string>Scratch Project File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsb</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSTypeIsPackage</key> <false/> <key>NSPersistentStoreTypeKey</key> <string>XML</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sb</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchSprite.icns</string> <key>CFBundleTypeName</key> <string>Scratch Project File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsb</string> </array> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>bundle</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakPlugin.icns</string> <key>CFBundleTypeName</key> <string>Squeak Plugin</string> <key>CFBundleTypeOSTypes</key> <array> <string>BNDL</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>LSItemContentTypes</key> <array> <string>com.dream.block</string> </array> <key>CFBundleTypeExtensions</key> <array> <string>block</string> </array> <key>CFBundleTypeIconFile</key> <string></string> <key>CFBundleTypeName</key> <string>Block File</string> <key>CFBundleTypeOSTypes</key> <array> <string></string> </array> </dict> </array> <key>CFBundleExecutable</key> <string>Scratch</string> <key>CFBundleGetInfoString</key> <string>Scratch VM 3.8.14b7y http://www.mit.edu </string> <key>CFBundleIconFile</key> <string>ScratchApp</string> <key>CFBundleIdentifier</key> <string>edu.mit.scratch</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Scratch</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>Scratch VM 3.8.14b7y</string> <key>CFBundleSignature</key> <string>MITS</string> <key>CFBundleVersion</key> <string>3.8.14b7y</string> <key>CGDisableCoalescedUpdates</key> <true/> <key>LSBackgroundOnly</key> <false/> <key>SqueakBrowserMouseCmdButton1</key> <integer>3</integer> <key>SqueakBrowserMouseCmdButton2</key> <integer>3</integer> <key>SqueakBrowserMouseCmdButton3</key> <integer>2</integer> <key>SqueakBrowserMouseControlButton1</key> <integer>1</integer> <key>SqueakBrowserMouseControlButton2</key> <integer>3</integer> <key>SqueakBrowserMouseControlButton3</key> <integer>2</integer> <key>SqueakBrowserMouseNoneButton1</key> <integer>1</integer> <key>SqueakBrowserMouseNoneButton2</key> <integer>3</integer> <key>SqueakBrowserMouseNoneButton3</key> <integer>2</integer> <key>SqueakBrowserMouseOptionButton1</key> <integer>2</integer> <key>SqueakBrowserMouseOptionButton2</key> <integer>3</integer> <key>SqueakBrowserMouseOptionButton3</key> <integer>2</integer> <key>SqueakBrowserUnTrustedDirectory</key> <string>~/Library/Preferences/Squeak/Internet/My Squeak/</string> <key>SqueakEncodingType</key> <string>UTF-8</string> <key>SqueakFloatingWindowGetsFocus</key> <true/> <key>SqueakImageName</key> <string>Scratch.image</string> <key>SqueakMaxHeapSize</key> <integer>536870912</integer> <key>SqueakMouseCmdButton1</key> <integer>3</integer> <key>SqueakMouseCmdButton2</key> <integer>3</integer> <key>SqueakMouseCmdButton3</key> <integer>2</integer> <key>SqueakMouseControlButton1</key> <integer>1</integer> <key>SqueakMouseControlButton2</key> <integer>3</integer> <key>SqueakMouseControlButton3</key> <integer>2</integer> <key>SqueakMouseNoneButton1</key> <integer>1</integer> <key>SqueakMouseNoneButton2</key> <integer>3</integer> <key>SqueakMouseNoneButton3</key> <integer>2</integer> <key>SqueakMouseOptionButton1</key> <integer>2</integer> <key>SqueakMouseOptionButton2</key> <integer>3</integer> <key>SqueakMouseOptionButton3</key> <integer>2</integer> <key>SqueakPluginsBuiltInOrLocalOnly</key> <true/> <key>SqueakUIFlushPrimaryDeferNMilliseconds</key> <integer>20</integer> <key>SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds</key> <integer>20</integer> <key>SqueakUIFlushSecondaryCleanupDelayMilliseconds</key> <integer>25</integer> <key>SqueakUIFlushUseHighPercisionClock</key> <true/> <key>SqueakWindowAttribute</key> <data> ggAAHw== </data> <key>SqueakWindowHasTitle</key> <true/> <key>SqueakWindowType</key> <integer>6</integer> </dict> </plist>
Offline
Nice to see the project is coming along nicely
Since hardmath123 has the email now and even non-personal ones shouldn't be shared and I'm technically a moderator I've removed it from the posts - you'll get less spam that way!
Offline
Hardmath123 wrote:
Try this plist:
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UTExportedTypeDeclarations</key> <array> <dict> <key>UTTypeDescription</key> <string>Block file</string> <key>UTTypeConformsTo</key> <array> <string>public.data</string> </array> <key>UTTypeIconFile</key> <string></string> <key>UTTypeIdentifier</key> <string>com.dream.block</string> <key>UTTypeTagSpecification</key> <dict> <key>public.filename-extension</key> <array> <string>block</string> </array> </dict> </dict> </array> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeExtensions</key> <array> <string>image</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakImage.icns</string> <key>CFBundleTypeName</key> <string>Squeak Image File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STim</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sources</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakSources.icns</string> <key>CFBundleTypeName</key> <string>Squeak Sources File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STso</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>changes</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakChanges.icns</string> <key>CFBundleTypeName</key> <string>Squeak Changes File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STch</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sprite</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchProject.icns</string> <key>CFBundleTypeName</key> <string>Scratch Sprite File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsp</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSTypeIsPackage</key> <false/> <key>NSPersistentStoreTypeKey</key> <string>XML</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>scratch</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchProject.icns</string> <key>CFBundleTypeName</key> <string>Scratch Project File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsb</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSTypeIsPackage</key> <false/> <key>NSPersistentStoreTypeKey</key> <string>XML</string> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>sb</string> </array> <key>CFBundleTypeIconFile</key> <string>ScratchSprite.icns</string> <key>CFBundleTypeName</key> <string>Scratch Project File</string> <key>CFBundleTypeOSTypes</key> <array> <string>STsb</string> </array> </dict> <dict> <key>CFBundleTypeExtensions</key> <array> <string>bundle</string> </array> <key>CFBundleTypeIconFile</key> <string>SqueakPlugin.icns</string> <key>CFBundleTypeName</key> <string>Squeak Plugin</string> <key>CFBundleTypeOSTypes</key> <array> <string>BNDL</string> </array> <key>CFBundleTypeRole</key> <string>Editor</string> </dict> <dict> <key>LSItemContentTypes</key> <array> <string>com.dream.block</string> </array> <key>CFBundleTypeExtensions</key> <array> <string>block</string> </array> <key>CFBundleTypeIconFile</key> <string></string> <key>CFBundleTypeName</key> <string>Block File</string> <key>CFBundleTypeOSTypes</key> <array> <string></string> </array> </dict> </array> <key>CFBundleExecutable</key> <string>Scratch</string> <key>CFBundleGetInfoString</key> <string>Scratch VM 3.8.14b7y http://www.mit.edu </string> <key>CFBundleIconFile</key> <string>ScratchApp</string> <key>CFBundleIdentifier</key> <string>edu.mit.scratch</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Scratch</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>Scratch VM 3.8.14b7y</string> <key>CFBundleSignature</key> <string>MITS</string> <key>CFBundleVersion</key> <string>3.8.14b7y</string> <key>CGDisableCoalescedUpdates</key> <true/> <key>LSBackgroundOnly</key> <false/> <key>SqueakBrowserMouseCmdButton1</key> <integer>3</integer> <key>SqueakBrowserMouseCmdButton2</key> <integer>3</integer> <key>SqueakBrowserMouseCmdButton3</key> <integer>2</integer> <key>SqueakBrowserMouseControlButton1</key> <integer>1</integer> <key>SqueakBrowserMouseControlButton2</key> <integer>3</integer> <key>SqueakBrowserMouseControlButton3</key> <integer>2</integer> <key>SqueakBrowserMouseNoneButton1</key> <integer>1</integer> <key>SqueakBrowserMouseNoneButton2</key> <integer>3</integer> <key>SqueakBrowserMouseNoneButton3</key> <integer>2</integer> <key>SqueakBrowserMouseOptionButton1</key> <integer>2</integer> <key>SqueakBrowserMouseOptionButton2</key> <integer>3</integer> <key>SqueakBrowserMouseOptionButton3</key> <integer>2</integer> <key>SqueakBrowserUnTrustedDirectory</key> <string>~/Library/Preferences/Squeak/Internet/My Squeak/</string> <key>SqueakEncodingType</key> <string>UTF-8</string> <key>SqueakFloatingWindowGetsFocus</key> <true/> <key>SqueakImageName</key> <string>Scratch.image</string> <key>SqueakMaxHeapSize</key> <integer>536870912</integer> <key>SqueakMouseCmdButton1</key> <integer>3</integer> <key>SqueakMouseCmdButton2</key> <integer>3</integer> <key>SqueakMouseCmdButton3</key> <integer>2</integer> <key>SqueakMouseControlButton1</key> <integer>1</integer> <key>SqueakMouseControlButton2</key> <integer>3</integer> <key>SqueakMouseControlButton3</key> <integer>2</integer> <key>SqueakMouseNoneButton1</key> <integer>1</integer> <key>SqueakMouseNoneButton2</key> <integer>3</integer> <key>SqueakMouseNoneButton3</key> <integer>2</integer> <key>SqueakMouseOptionButton1</key> <integer>2</integer> <key>SqueakMouseOptionButton2</key> <integer>3</integer> <key>SqueakMouseOptionButton3</key> <integer>2</integer> <key>SqueakPluginsBuiltInOrLocalOnly</key> <true/> <key>SqueakUIFlushPrimaryDeferNMilliseconds</key> <integer>20</integer> <key>SqueakUIFlushSecondaryCheckForPossibleNeedEveryNMilliseconds</key> <integer>20</integer> <key>SqueakUIFlushSecondaryCleanupDelayMilliseconds</key> <integer>25</integer> <key>SqueakUIFlushUseHighPercisionClock</key> <true/> <key>SqueakWindowAttribute</key> <data> ggAAHw== </data> <key>SqueakWindowHasTitle</key> <true/> <key>SqueakWindowType</key> <integer>6</integer> </dict> </plist>
Well, I meant that other application which would apply the UTI, as an Xcode project.
Offline
Looking at what your doing, doesn't that limit what platforms are supported (mac only)
Offline
dreamod wrote:
rookwood101 wrote:
Looking at what your doing, doesn't that limit what platforms are supported (mac only)
well, you really only NEED the image. The application is an extra for mac users.
What is it used for?
Offline
rookwood101 wrote:
dreamod wrote:
rookwood101 wrote:
Looking at what your doing, doesn't that limit what platforms are supported (mac only)
well, you really only NEED the image. The application is an extra for mac users.
What is it used for?
QuickLook generators.
Offline
sparks wrote:
Nice to see the project is coming along nicely
Since hardmath123 has the email now and even non-personal ones shouldn't be shared and I'm technically a moderator I've removed it from the posts - you'll get less spam that way!
...
Oops. Thanks, sparks.
Offline