On Fri, May 1, 2009 at 4:17 PM, Alex Iskander <[email protected]> wrote:
> Handle<Object> obj = Handle<Object>::Cast(val); //just like
> Handle<Function>::Cast()
> Handle<Value> bazVal = obj->Get(String::New("baz"));
> Handle<Function> baz = Handle<Function>::Cast(bazVal);

Be aware, however, that the various Cast() routines will fail (by
crashing your app) if the requested cast cannot succeed. So always
check the type (e.g. using IsObject()) before using Cast().

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to