[MacRuby-devel] Implementing Delegate Functions
Chris Williams
chris at iterativedesigns.com
Wed Oct 1 20:13:50 PDT 2008
OK so i tried this
browser = NSNetServiceBrowser.new
delegate = Object.new
def delegate.netServiceBrowserWillSearch(browser)
puts "search commencing!"
end
def delegate.netServiceBrowser(browser, didFindService:service,
moreComing:more)
puts "Found service #{service.name}."
end
def delegate.netServiceBrowser(browser, didRemoveService:service,
moreComing:more)
puts "lost service #{service.name}"
end
def delegate.netServiceBrowser(browser, didNotSearch:errorInfo)
puts "search not successful: #{errorInfo}"
end
browser.delegate = delegate
browser.searchForServicesOfType("_ssh._tcp.", inDomain:"")
I set up several services and many different types (roap ipp, smb,
sftp, etc), but the code never is executed. This URL http://skitch.com/voodootikigod/atg8/bonjour-browser
shows the services on there, as you can see there is SSH out there.
Any ideas sorry for being such a pest on this.
Thanks for the quick response to the previous email and all of the
effort
Christopher Williams
President/CEO
Iterative Designs LLC
http://www.iterativedesigns.com
1818 Library Street: Suite 500
Reston, VA 20190
info[:email] => chris at iterativedesigns.com
info[:office] => 703.956.3015
info[:cell] => 703.628.7533
info[:twitter] => voodootikigod ( http://www.twitter.com/voodootikigod )
More information about the MacRuby-devel
mailing list