Hi! Your code seems correct to me. Can you file a bug with a sysdiagnose? It's possible this is an issue in the system code.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: