Hi there,
I recently upgraded to Snow Leopard and was shocked to see that Apple have not kept up support for DVI to S-Video output. The output on screen appears in greyscale and poor quality. Even with restarting I had the same problem. The latest patch for Snow Leopard doesn’t seem to have anything to fix this problem so I was left with no alternative but to revert back to Leopard or lose my TV in my room, no thanks. Also upon upgrading I lost some widgets I used such as MenuMeters and my replacement for the time stopped working also.
Luckily I had a backup with Time Machine from a few days ago which could be restored!
Beware of Snow Leopard!
EDIT: I’ve just upgraded again and these issues appear to be fixed, damn right!
I got this the other day when I was attempting to search for some text. Nothing had visibly changed that I could see and for some reason the search was always returning ‘No files were found to look in’ regardless of the search options I entered (i.e. types to search, looking in entire solution, project etc).
I cannot explain this but focus on Visual Studio and press Ctrl + Scroll Lock fixes it. Yes it is mad and doesn’t make sense.
Credit goes to: here
Quick post that might help someone.
I had an XML file that I had changed in Dashcode and for some reason the older XML content was being read into my app. I ‘re-touched’ it in XCode and even though the right XML showed up within the project the wrong XML was being loaded up in the simulator.
A little perplexed by this I checked what file was being loaded by stepping through code and saw that the XML was being loaded up from a path that looked something like “/Users//Library/Application Support/iPhone Simulator/User/Applications/xxx”. This location obviously contained the old version of the XML file and not the new one I had in XCode. To solve this problem I cleaned the project and performed a full re-build and low-and-behold the correct XML was loaded. I suspect cleaning the project deletes the app and all associated data from the simulator cache.
I found myself in the position that I had a string that came in from XML and wanted to create an appropriate class from this string. After some searching I found the neat little function NSClassFromString. So given a string I could allocate a class by doing
id newClass = [[NSClassFromString(string) alloc] init];
I also needed to go back the other way, get the name of the class as a string. Again there is a similar function definition
NSString* name = NSStringFromClass([self class]);
This above shows how to get the class from self using [self class].
I’ve needed to figure out if a certain function exists for a class before instantiating a new class. However the init function takes two parameters and all code samples I’ve seen use selectors with just a single parameter. Below is the code that checks if a selector with two parameters is present.
if([NSClassFromString(classType) instancesRespondToSelector: @selector(initWithTwoParameters: withSecondParameter:)])
{
}
Hi,
I’ve regularly needed to post code in blogs and there are many plugins out there that do this job. However as I upgrade WordPress they regularly break which is highly annoying. At the moment I’m using SyntaxHighlighter. It works with the latest WordPress 2.9.2 and seems fairly easy to use.
Syntax Highlighter
The usage is quite straight-forward
…Your Code Here
The list of valid code-aliases are shown here (the middle column):
Brushes