Eclipse Negative Colour Scheme

Moving from XCode to Eclipse, I miss the simplicity of switching colour schemes in XCode. My eyes have become accustomed to light text on black, and the reverse shocks them.

After some googling I found this eclipse negative colour scheme preferences file: Inkpot. If you don’t like that one, there are more at the Eclipse Colour Scheme page.

Prepare your eyes for a feast, for I have included a screenshot of Inkpot below:

Ooooooh yeeeeeaaaah.....

Ooooooh yeeeeeaaaah.....

No comments | Trackback

Slider Update – Tab Feature Coming Together

As I finally reached a programming goal I had set – the tab hover javascript was working fairly well – I realised that users would want the option of positioning the tabs in the middle or corners of Slider’s four sides. Initially I had assumed it would be OK for users to have tabs positioned only in the center of either of the four sides.

Great, I thought. This shouldn’t be too bad – just increase the number of radio buttons available and position the tabs accordingly.

Four hours later, I “achieve” a build of Slider that exports without the dreaded Uncaught Exception 10.

None of the Javascript works, turns out that was where the final erroneous lines were. Not in the 6 other class files I combed through. Duh.

The radio buttons for selecting tab position changed from:

Ugh, these are so yesterday

Ugh, these are so yesterday

to:

Positioning Radios as they should be.

Positioning Radios as they should be.

Here is an example of the type of thing you’ll be able to do with Slider, when the rewrite is finally done:

It's getting there!

It's getting there!

Finally, I feel like the hours I’ve spent mashing my hands on my keyboard are starting to show results.

Not working, releasable results, but results all the same.

Still not working: arrows, timer, content (!), table row repositioning, titles, text shadow, effects (or any sliding at all, come to think of it), cell links.

I have another project that I will soon have to devote serious time to, but I’ll continue plugging away at Slider, I’m excited about the new version!

No comments | Trackback

How to Prevent Noisy NSBitmapImageReps

Before

Images generated for Slider’s background and tabs contained a lot of noise – random ugly pixels throughout the images.

I was unsure why this was happening, so I asked the Cocoa-Dev mailing list.

Rob Keniger kindly replied with the following solution:

“An NSBitmapImageRep is not guaranteed to be empty when you create it and in general it’s just full of random bits. You need to clear it explicitly if you are drawing non-opaque content”

He included the following snippet that solved my problem nicely:

1
2
3
4
5
6
7
- (void) clearBitmapImageRep:(NSBitmapImageRep *)bitmap {
   unsigned char* bitmapData = [bitmap bitmapData];
   if (bitmapData != NULL)
   {
       bzero(bitmapData, [bitmap bytesPerRow] * [bitmap pixelsHigh]);
   }
}

I call it as soon as I’ve created a new NSBitmapImageRep, like so:

1
2
3
4
5
NSBitmapImageRep  *theImage = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:imageSize.width pixelsHigh:imageSize.height
                            bitsPerSample:8 samplesPerPixel:4 hasAlpha:YES isPlanar:NO
                            colorSpaceName:NSDeviceRGBColorSpace bytesPerRow:0 bitsPerPixel:0];
 
[self clearBitmapImageRep:theImage];

This results in noise-free images.

After

Thanks Rob!

No comments | Trackback

The Mutations of Slider’s Tab Option Pane

During the past week, I’ve been working on Slider’s new Tab option pane.

I took screen shots before making changes to the layout.

Here they are:

Tabs Iteration #1

Tabs Iteration #2

Tabs Iteration #3

Tabs Iteration #4

I hope I’m not tempted to change things around again… I really need to get the backend going now!

No comments | Trackback

en.grand-piano.org Comment Spam!

What are spam comments?

From Wikipedia:

Spam in blogs (also called simply blog spam or comment spam) is a form of spamdexing. It is done by automatically posting random comments or promoting commercial services to blogs, wikis, guestbooks, or other publicly accessible online discussion boards. Any web application that accepts and displays hyperlinks submitted by visitors may be a target.

Adding links that point to the spammer’s web site artificially increases the site’s search engine ranking. An increased ranking often results in the spammer’s commercial site being listed ahead of other sites for certain searches, increasing the number of potential visitors and paying customers.

Examples of en.grand-piano.org’s comment spam. Click image to see more examples of the unrelated posts they’ve been commenting on.

Stupid PianoMan Spam

If you’re in the market for a new Grand Piano, please take their questionable tactics into consideration before making your final decision. If are willing to use such lowly methods to gain customers, can you really trust the way they handle other aspects of business?

Who engages in this practice, presumable to increase search engine prominence and thus sales?

http://www.en.grand-pianos.org/

I use JS-Kit to handle comments on my blog, and so have disabled WordPress’ native commenting system. Yet everyday I receive emails informing me that “PianoGuy”, “GoPiano”, “PianoDraft”, “PianoTrade”, “PianoFan”, “LePiano” … found posts as unrelated to Pianos as: “Write Your Own Listener Interface (you know you want to)” or “Auto-Notification of Broken Links, Fantastic Pre-Written Anti-Spam .htaccess File!” (irony?) interesting and helpful.

Right.

Mr. PianoMan, this behaviour is not acceptable. We would like you to please leave our blogs never return. Or if you do insist on reading our posts, at least wait until we write something actually related to Pianos before leaving a advertisment comment.

Thanks.

Update: the spambot has attempted to comment on this post!

What what whaaat?!

What what whaaat?!

No comments | Trackback