Io Language : Exception: Object does not respond to 'URL'

跟風遠走 提交于 2019-12-11 02:18:27

问题


Today I'm exercising an Io example of "seven language of seven weeks."

Example code:

futureResult := URL with("http://google.com/") @fetch
writeln("Do something immediately while fetch goes on in background...")

writeln("This will block until the result is available.")

writeln("fetched ", futureResult size, " bytes")

Running with exception:

Io$ io future.io

  Exception: Object does not respond to 'URL'
  ---------
  Object URL                           future.io 1
  CLI doFile                           Z_CLI.io 140
  CLI run                              IoState_runCLI() 1

Directly run URL in io with following error:

~$ io
Io 20110905
Io> URL

  Exception: Object does not respond to 'URL'
  ---------
  Object URL                           Command Line 1

Io> 

My environment is:

Ubuntu 14.04


回答1:


Followed post , I have done following:

$ sudo apt-get install libevent-dev
$ ./build.sh
$ ./build.sh install

URL error is fixed. But following error thrown:

Do something immediately while fetch goes on in background... This will block until the result is available. fetched Exception: Error does not respond to 'size' --------- Error size
future.io 6 Error size future.io 6 CLI doFile Z_CLI.io 140 CLI run
IoState_runCLI() 1

Post help to install Io



来源:https://stackoverflow.com/questions/25078127/io-language-exception-object-does-not-respond-to-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!