02 Aug 2012, 08:25
Generic-user-small

Ivo Balbaert (2 posts)

Hi Chris,

Executing the code in the Doomsday example of chapter 14 , § 14.2 Isolates throws an exception in this code line:

port.call({'year':year}).receive((message, replyTo) {
  print("Doom in $year is on a $message.");
});

Unhandled exception: NoSuchMethodException : method not found: ‘receive’ Receiver: Instance of ‘FutureImpl’ Arguments: [Closure: (Dynamic, Dynamic) => Dynamic]

How should this code be corrected to get it to work now ?

Thanks very much, Ivo Balbaert (ivo.balbaert@telenet.be)

08 Aug 2012, 22:54
Chris_strom_headshot_200_pragsmall

Chris Strom (79 posts)

Hrm… it’s possible they changed the syntax there, but I hadn’t thought so.

I’ll investigate, but can you let me know if you’re doing this in the SDK or Dartium?

12 Aug 2012, 20:59
Chris_strom_headshot_200_pragsmall

Chris Strom (79 posts)

Still works in try.dartlang.org: http://try.dartlang.org/s/7u1J, but I do see the reported error in the VM. I’m going to keep investigating to determine the best way to address.

  You must be logged in to comment