QuickLook for Mac is absolutely one of the most handy tools around for previewing files on your system, but i bugged me I could not preview AS and MXML files.
After digging around trying to get a fix to let QuickLook on Mac OSX Snow Leopard to show Actionscript and MXML files i have found a fix! I found a plugin and with a little bit of hacking i was able to show AS files now! At the bottom of this post is a download to the plugin.
Now here is what is did: I found a post by Gilles on how to get it working with normal Mac OSX. Then I found another post on how to make it work for Leopard.
Basically it tricks Finder into thinking that files ending in .as (which are locked in association with the applesingle mime-type because Adobe don’t export a profile with their apps) *can* be previewed in QuickLook, whereas ordinarily they can’t (applesingle being a kind of archive file).
So besides previewing the file it also color codes it So good times are here again! Below is a screenshot:
To install QuickLook plugins, you should copy the “*.qlgenerator” file into /Library/QuickLook/ or ~/Library/QuickLook/.
Note that “*” in the filename will vary based on exactly which QuickLook item you choose to install.
If a QuickLook folder is no present, feel free to create one.
After copying the file into the directory you will need to logout and then back in to your account for it to become active. Alternatively, you can prevent having to logout by running the following command in Terminal: qlmanage -r
This will force OS X to search /Library/QuickLook and ~/Library/QuickLook for plugins and load them accordingly.
For quite some time now i’ve been following the developments of digital magazines especially on devices, because this opens up a whole new realm of communication
Today i’ve found a really cool app, called Flipboard. This concept is something me and my friends have been talking about building. Really glad somebody else did and in such a fantastic and groundbreaking way, because we need apps like this
I know i’m kinda late to this party, but i dont want to keep this from you, in case you haven’t seen it yet.
Takes about 15 minutes and is realy spot on. Below are some quotes from the video.
Clay Shirky:
If I was going to start a news business tomorrow, I would start a news business designed to produce not one new bit of news, but instead to aggregate news for individuals in ways that mattered to them.
David Weinberger:
We are always going to be filtering the filters that filter our filters. That filter our filters.
While doing a project at LBi Lost Boys (place where i work) I encountered some super weird bug/feature when requesting data over HTTPS from an insecure domain. Here is the situation: We have a swf hosted on Domain A, which uses vanilla HTTP and we request data from Domain B over HTTPS. First thing we did is place an crossdomain policy file on Domain B. It looks like this:
The ‘secure=false’ should make the communication between HTTP and HTTPS possible as described here. So that took care of that. Now the rest. We discovered the bug and though that buttons were not working in IE7/IE8. Then we figured out the button was working but the request was not being send
We used standard code for making a request:
var variables : URLVariables = new URLVariables();
variables.someVar = someValue;
var request : URLRequest = new URLRequest( "REQUEST TO HTTPS SERVER" );
var loader : URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
request.data = variables;
request.method = URLRequestMethod.POST;
loader.addEventListener(Event.COMPLETE, handleRequestLoaded);
loader.addEventListener(IOErrorEvent.IO_ERROR, handleIOError);
loader.load(request);
try {
trace(request.url + " - " + variables.toString() + " - " + request.method);
loader.load(request);
} catch (e : Error) {
//trace(e);
}
What did we do to fix it?
Turns out that IE7/IE8 just fails silently when you do a request from HTTP to HTTPS, it just blocks the request, it does not even check for a crossdomain file on Domain B. (I checked this with Charles and Fiddler)
After readingseveralposts on the internets, i discovered that we needed to set the header of the PHP file. After doing this, it fixed the problem.
PHP Code:
There comes a time when you dont have the time to create a combobox yourself and start using the standard components that Flash provides you. The problem I had was embedding the fonts in to it. I wrote alot on font embedding. But there are always special cases . Here’s how to do it:
var arr:Array = new Array();
arr.push({label:"One"});
arr.push({label:"Two"});
arr.push({label:"Three"});
arr.push({label:"Four"});
arr.push({label:"Five"});
arr.push({label:"Six"});
var cb:ComboBox = new ComboBox();
// embed fonts in main text field, ComboBox in its closed state.
cb.textField.setStyle("embedFonts", true);
cb.textField.setStyle("textFormat", tf);
// embed fonts in dropdown menu, ComboBox folded open.
cb.dropdown.setRendererStyle("embedFonts", true);
cb.dropdown.setRendererStyle("textFormat", tf);
cb.dataProvider = new DataProvider(arr);
cb.move(10, 10);
addChild(cb);
Also check the documentation for the ComboBox. Very usefull