Re: [webkit-dev] nested scopes

2009-02-26 Thread Raj Kiran Talusani
Darin,

You are right. I was using SpiderMonkey before switching to JavaScriptCore.
And i am developing on Android plaform. on Android, public API is not
compiled into the libraries.. so i am using kjs API from Interpreter.h. Is
there anyway i can implement scopes using the private/internal API. any
pointers?

Raj

PS: i had sent this mail to Android list, but didnot not get any response.
So i thought its better to talk to the original developers.



If you are wrapping JavaScriptCore you should use the public API, not the
 internals. The public API is in headers like JSBase.h, JSValueRef.h,
 JSObjectRef.h, and JSClassRef.h. However, the public API doesn't have any
 concept of explicitly creating scopes; instead scopes are created by the
 engine automatically for the various language constructs that require them.
 An explicit way to create a scope doesn't seem to be necessary API for use
 of the engine, and there are other reasons not to add it — different scopes
 have different semantics in the language. I'm assuming this requirement is
 baggage from whatever engine previously implemented this js_push_scope API.

-- Darin


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] nested scopes

2009-02-24 Thread Raj Kiran Talusani
Hi all,

I am developing a wrapper API on top of JavaScriptCore for integration with
my application.

Here is an overview of my API.

In my application scripts are executed and variables are defined in
different scopes. This example shows the functionality needed.

js_init(); - initialize
js_set_var(abc,2); - set abc=2 in global scope
js_push_scope(); - create a new scope
js_set_var(abc,4); - set abc=4 in new scope
js_print_var(abc); - should print 4 as we are in new scope
js_pop_scope(); - pop most recent scope. i,e. the new scope
js_print_var(abc); - Now it should print 2 because we are back to global
scope.

My question is what should i be doing in js_push_scope and js_pop_scope so
that a new JavaScript scope is created and destroyed.

I have seen that there is a ScopeChain.cpp/h .. but its not very clear as to
how to use them.

Raj
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] XML Events in WebKit

2007-12-07 Thread Raj Kiran Talusani
Guys,

thanks very much for all the comments. let me be more specific about my
problem.

i want to add multimodal capabilities to the webkit. I want to trigger (or
communicate with) an external app based on events happening in the xhtml
document. Also i want to insert custom events into the XHTML context based
on results from the external process. Is there any way i can do this with
current version of webkit. any pointers on what needs to be done?

Raj

On Dec 8, 2007 5:44 AM, Ian Hickson [EMAIL PROTECTED] wrote:

 On Fri, 7 Dec 2007, Antoine Quint wrote:
 
  XML Events basically come in handy when you want a generic markup-based
 way to
  add event listeners for custom events. For instance, if XBL was
 implemented in
  WebKit, and I had my own custom magic UI control implemented with some
 custom
  XML element, [...]

 ...then you shouldn't be sending it over the wire, so it shouldn't
 matter... (You shouldn't send custom, aka proprietary, vocabularies over
 the wire, since you have no way to guarentee the end user can handle it.)

 --
 Ian Hickson   U+1047E)\._.,--,'``.fL
 http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
 Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
 ___
 webkit-dev mailing list
 webkit-dev@lists.webkit.org
 http://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] XML Events in WebKit

2007-12-06 Thread Raj Kiran Talusani
Hello all,

Does webkit support the XML Events specification 
http://www.w3.org/2001/xml-events.
To be specific, some thing like the following is valid for WebKit?

ev:listener event=focus observer=mytextbox handler=myhandler/

thanks in advance

Raj
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-dev