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
to:

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!
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!
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
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:
I hope I’m not tempted to change things around again… I really need to get the backend going now!
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Slider Progress: Slider Styling Option Pane
During the great rewrite, I’ve been trying to focus on one section at a time. The first section to come under attack was “everything pertaining to the styling of Slider that is not Arrow-related”. After much mucking-about I decided to combine the Border, Rounded Corner, Background Image, Gradient and Background Colour onto one Pane.
I don’t know why I didn’t do this before, it is obvious and really the only logical way to present these controls – enabling some may disable others, it was confusing and clumsy when they were on different tabs.
Now users will be able to see what is being enabled/disabled without swapping between different tabs.
Here is a screenshot of the option page as it is currently:
This is about the 10th layout redesign, I’m quite sure there will be no major changes from now on.
Still a long way to go, but progress *is* being made.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Return an NSMutableString as NSString Avoiding “Uncaught Error 11″ with Cocoa
Another stumbling block on the road to Slider completion was this:
NSUncaughtSystemExceptionException — Uncaught system exception: signal 11
This vague and unhelpful error message (in this case) was caused by my trying to return an NSMutableString in place of an NSString:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - (NSString *)generateHTML{ NSMutableString *html = [NSMutableString string]; @try{ //Begin wrapper [html appendString:[NSString stringWithFormat:@"<div id=\"slider%@\" style=\"height:%ipx;width:%ipx;position:relative;z-index:0;margin-left:%ipx;%@\">", UID, (int)portalSize.height, (int)portalSize.width, leftMargin, [self generateBGCSS]]]; //Begin other content [html appendString:[self someYetToBeWrittenFunction]]; //Close wrapper [html appendString:@"</div>"]; } @catch (NSException *e) { NSLog(@"generateHTML: %@", e); } return html; } |
Googling resulted in this solution, from the Cocoa Dev Archives (which have saved me from suicide more times than I can count).
The successful code is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | - (NSString *)generateHTML{ NSMutableString *html = [NSMutableString string]; @try{ //Begin wrapper [html appendString:[NSString stringWithFormat:@"<div id=\"slider%@\" style=\"height:%ipx;width:%ipx;position:relative;z-index:0;margin-left:%ipx;%@\">", UID, (int)portalSize.height, (int)portalSize.width, leftMargin, [self generateBGCSS]]]; //Begin other content [html appendString:[self someYetToBeWrittenFunction]]; //Close wrapper [html appendString:@"</div>"]; } @catch (NSException *e) { NSLog(@"generateHTML: %@", e); } return [NSString stringWithString:html]; } |
This should have been obvious, I regret the shame I bring on my family.
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Accidentally Broken, Accidentally Fixed
Some hours after posting the previous post, I received an email from John informing me that the 0.95b version of Slider was … broken.
Seems I had changed something, and Slider would no longer install properly.
I managed to fix the problem, accidentally.
(hand on heart) I, Michael Robinson, solemnly swear to never, ever touch Xcode build options that I do not understand while working on a release-ready project.
I am so pleased that it works now, for about 3 hours I thought I might need to rewrite everything from 0.93b up…
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title
Short-Sighted Programming
Today a customer informed me that Slider wasn’t working properly on his webpage. They gave me the URL to the problem page, and for a page with a working (properly) version of Slider.
Initially I was perplexed, but it dawned on me that the code for parsing out the cell numbers can only parse single-digit numbers.
A classic case of short-sighted programming.
See the cells’ class attribute was put together like this:
cell + the cell’s number + unique ID.
Examples:
cell2page0
cell9page102
cell10page0
Code for parsing out the cell’s number:
1 | parseInt(jQuery(peeker).attr("class").substring(4,5)) |
Notice that it only gets one character.
To work correctly, two things needed to be changed.
First, I had to change the way the cells’ class attribute is put together:
cell + unique ID + the cell’s number
Second, the javascript for parsing out the number:
1 | parseInt(jQuery(peeker).attr("class").substring(("cell" + length of cell + unique ID),(length of class attribute))) |
The updated plugin is available here: Slider 0.95b
I’m confident that I’ve fixed the problem, but if I haven’t don’t hesitate to let me know!
Incidentally, the customer’s website is extremely well done, go and check it out!
Like this post? Move it on along with:
Email |
delicious |
Digg |
Tweet |
Reddit |
Newsvine |
Furl |
Google |
Stumble |
HaoHao
| Trackback: |
Scroll to post title





























Recent Comments
Great Wall
LinkedIn
Thu, 14 Jan 2010 12:54:50 +0000
Tag Cloud
LinkedIn
Thu, 14 Jan 2010 12:54:50 +0000
The Best Photographer In Shanghai
When we pick them up :( Don't know when that will be yet!
Chose another 49 today
Wed, 13 Jan 2010 14:13:21 +0000
The Best Photographer In Shanghai
When do we get to see them!!!!!
Tue, 12 Jan 2010 19:08:51 +0000
Installing Jdownloader In Ubuntu
Thank You!!!!
It works like a charm!!!!!!!!!!!!
Tue, 05 Jan 2010 13:02:35 +0000
Arrived In Shanghai
Done, look left!
Sun, 03 Jan 2010 15:37:03 +0000