Cocoa

Learn

Cocoa

warning: Creating default object from empty value in /var/www/vhosts/mugginsoft/site/drupal/prod/drupal-6/modules/taxonomy/taxonomy.pages.inc on line 33.

Cocoa Uniform Grid control

Posted in:

TSUniformGrid is a simple uniform grid view for Cocoa that is similar in function to the WPF UniformGrid control.

NSTextView -textDidEndEditing: not sent

Posted in:

I have two sub views that I swap within a view:

NSTextView <=> NSOutlineView

An NSSegmentedControl serves to initiate the subview switching.

My NSTextView delegate responds to :
- (void)textDidEndEditing:(NSNotification *)aNotification

However, if I modify my NSTextView and then switch the views the
-textDidEndEditing: notification is not sent.

Presumably this should be sent when the NSTextView looses first responder status.

Adding a third party shared object library as a framework

Posted in:

The scenario here is that we have a third party shared object library that is built by an external makefile. This is fine but we want to try and maintain the OS X bundle structure and install the library within a framework.

Extending JAProcessInfo to Get Tasks Descendents

Posted in:
OS X has no custom API for getting process hierarchy information. Here we have a modified version of JAProcessInfo that gives all descendent PIDs of a given task.

Building a release with Xcode, AppleScript and agvtool

Posted in:

Whenever a release of KosmicTask is built agvtool is used to increment the bundle versions of all the various components. The bundle version is significant for the user because when the app is upgraded a change in the KosmicTaskServer component bundle version is what triggers that component to update all the application tasks.

NSEvent Timestamp

Posted in:

A category on NSEvent suitable for NSEvent time stamping.

Track GC Memory Usage Using Instruments

Posted in:

When tracking GC memory usage it is essential to be able to examine the heap object graph. That's where Instruments comes in.

Detecting Mouse Down NSEvent in NSView Subviews

Posted in:

I want to detect mouse down events in the subviews of an NSView so that I can highlight the NSView whenever any of its subviews are clicked.

The first thing we need is to build a list of the window subviews that want to be informed whenever one their subviews is clicked. We we are going to need an NSWindow subclass, say MGSMyWindow.


@interface MGSMyWindow : NSWindow {
	NSHashTable *_clickViews;
}

- (void)addClickView:(NSView *)aView;
@end

The use of NSHashTable indicates that garbage collection is required.

We initialise our window like so:

So Exactly Why are My Find Panel Buttons Dimmed?

Posted in:

My NSTextView find panel buttons are dimmed and I don't know why.

The Cocoa NSTextView docs refer to dimmed find panel buttons if the text view is made not selectable. But that isn't the case. My text view is both editable and selectable.

I have been implementing my applications menu and toolbar validation code so I suspect that have misrouted something in the responder chain.

OS X Missing Currency Symbol

Posted in:

On one of my development machines, which has seen a bit of fiddling it must be admitted, I find that the normal currency symbol for the locale is not displayed (be it £, $ or €). Instead I am presented with the following symbol: ¤.

Now I know that I have seen it before, but where? And secondly, what is it?

Answers:

Syndicate content