[lib/objc] fix NSWindow intialization. Tidy up samples.