Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Bridge This Return Type Yet Error #30

Open
sorin-ionescu opened this issue Jan 7, 2012 · 0 comments
Open

Can't Bridge This Return Type Yet Error #30

sorin-ionescu opened this issue Jan 7, 2012 · 0 comments

Comments

@sorin-ionescu
Copy link

In the code bellow, Nu does not like printSongInformation: (NSNotification) notification. However, if I change it to printSongInformation: (id) notification, it works fine. (puts (notification class)) prints __CFNotification. I am using version 2.0.1.

2012-01-07 01:45:29.119 nush[63156:d07] I can't bridge this return type yet: (NSNotification) ()
Nu uncaught exception: NSInvalidArgumentException: NSGetSizeAndAlignment(): unsupported type encoding spec '?' at '?' in '?'
  from ./iTunes.nu:8: in -
  from ./iTunes.nu:7: in class
  from /Library/Frameworks/Nu.framework/Resources/help.nu:136: in progn
#!/usr/bin/env nush

(load "Nu")
(load "Foundation")
(load "Cocoa")

(class ApplicationDelegate is NSObject
   (- (void) printSongInformation: (NSNotification) notification is
      (set information (notification userInfo))
      (puts "track information: #{(information description)}"))

   (- (void) applicationDidFinishLaunching: (id) sender is
      (set dnc (NSDistributedNotificationCenter defaultCenter))
      (dnc
          addObserver:self
          selector:"printSongInformation:"
          name:"com.apple.iTunes.playerInfo"
          object:nil)))

(set delegate ((ApplicationDelegate) alloc) init)
((NSApplication sharedApplication) setDelegate:delegate)
((NSApplication sharedApplication) run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant