Archive for January, 2007

Similar Interests

Steve and I really seem to enjoy the same television shows. (well, except Desperate Housewives. nobody likes that show.)

TV Shows

Honestly. 24, Scrubs and The Office. The three best shows still on television. You know Arrested Development would be up there, if all was just with the world.

Without Weekends?

LRCalendarView Without WeeekendsIt was suggested to me by a friend that Assignment Planner’s calendar view would work well as a 5-day view without weekends, rather than as a 7-day view with weekends. I figured it would make sense to make it a preference, so in Assignment Planner version 2.4, this is the case; you can completely hide the weekends all together. I figured that it would also be good to add this functionality to LRCalendarView, so it has been updated to version 1.1 with the appropriate setter and getter functions added. Since I have gotten absolutely zero feedback regarding the LRCalendarView (except for the 48 downloads as of right now), I hope that this feature comes in useful to someone. Let me know if you like it!

If you build it…

iPhoneIf we get some sort of tools and Apple allows for third party development for the new iPhone, Assignment Planner will definitely be right there. Portability is really one of the problems with Assignment Planner, since you’ll want to add an assignment instantly when you know of it and your computer might not always be at hand. I doubt that they’ll allow for third-party software in this first revision, but you never know…

Oh, and while we’re looking at pretty images, Daniel Garte has designed the program a new icon after participating in MacHeist. I think it looks great and will be added into the program in the next version.

URLs in NSTextView Fix

So, when messing around with Assignment Planner over the past couple of days, I realized that my example of having clickable URLs in an NSTextView that I previously blogged about has a minor flaw. When trying to edit text that was at the bottom of the NSTextView, it acted just fine. But if you tried to go back and edit something elsewhere, after each character you typed, the cursor would jump back to the end of your text. This simply has to do with the fact that after each character, we reset the attributed string in the view. So, to fix it, we just need to save the location of the insertion point before the string replacement and restore it afterwards. We can do this by changing didChangeText as follows…

- (void)didChangeText
  int insertionPointerLocation = [self selectedRange].location;

  NSMutableAttributedString* inputValue = [[[NSMutableAttributedString
alloc] initWithString:[NSString stringWithFormat:@"%@", [self string]]]
  [inputValue detectURLs:[NSColor blueColor]];
  [[self textStorage] setAttributedString:inputValue];

  [self setSelectedRange:NSMakeRange(insertionPointerLocation,0)];

  [super didChangeText];

:: RSS Feed :: Archive :: Categories :: Admin