Mercurial > pymonkey
changeset 79:228a56e7e793
Added docs for context.get_object_private().
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 07 Aug 2009 18:56:32 -0700 |
parents | c48b393f6461 |
children | 4945e4073110 |
files | docs/rendered/_sources/pymonkey.txt docs/rendered/genindex.html docs/rendered/pymonkey.html docs/rendered/searchindex.js docs/src/pymonkey.txt |
diffstat | 5 files changed, 45 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/rendered/_sources/pymonkey.txt Fri Aug 07 11:21:21 2009 -0700 +++ b/docs/rendered/_sources/pymonkey.txt Fri Aug 07 18:56:32 2009 -0700 @@ -64,9 +64,21 @@ Returns the :class:`Runtime` that the context belongs to. - .. method:: new_object() + .. method:: new_object([private_obj]) + + Creates a new :class:`Object` instance and returns + it. ``private_obj`` is any Python object that is privately + stored within the new JS object; it can be retrieved using + :func:`.get_object_private()`. - Creates a new :class:`Object` instance and returns it. + .. method:: get_object_private(object) + + Returns the ``private_obj`` passed to :func:`.new_object()` + when `object` was first created. If it doesn't exist, ``None`` + is returned. + + This functionality is useful if you want to represent Python + objects in JS-land. .. method:: init_standard_classes(object)
--- a/docs/rendered/genindex.html Fri Aug 07 11:21:21 2009 -0700 +++ b/docs/rendered/genindex.html Fri Aug 07 18:56:32 2009 -0700 @@ -66,6 +66,7 @@ <table width="100%" class="indextable"><tr><td width="33%" valign="top"> <dl> +<dt><a href="pymonkey.html#pymonkey.Context.get_object_private">get_object_private() (pymonkey.Context method)</a></dt> <dt><a href="pymonkey.html#pymonkey.Context.get_runtime">get_runtime() (pymonkey.Context method)</a></dt> <dd><dl> <dt><a href="pymonkey.html#pymonkey.Object.get_runtime">(pymonkey.Object method)</a></dt>
--- a/docs/rendered/pymonkey.html Fri Aug 07 11:21:21 2009 -0700 +++ b/docs/rendered/pymonkey.html Fri Aug 07 18:56:32 2009 -0700 @@ -115,8 +115,21 @@ <dl class="method"> <dt id="pymonkey.Context.new_object"> -<tt class="descname">new_object</tt><big>(</big><big>)</big><a class="headerlink" href="#pymonkey.Context.new_object" title="Permalink to this definition">¶</a></dt> -<dd>Creates a new <a title="pymonkey.Object" class="reference" href="#pymonkey.Object"><tt class="xref docutils literal"><span class="pre">Object</span></tt></a> instance and returns it.</dd></dl> +<tt class="descname">new_object</tt><big>(</big><span class="optional">[</span><em>private_obj</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#pymonkey.Context.new_object" title="Permalink to this definition">¶</a></dt> +<dd>Creates a new <a title="pymonkey.Object" class="reference" href="#pymonkey.Object"><tt class="xref docutils literal"><span class="pre">Object</span></tt></a> instance and returns +it. <tt class="docutils literal"><span class="pre">private_obj</span></tt> is any Python object that is privately +stored within the new JS object; it can be retrieved using +<a title="pymonkey.Context.get_object_private" class="reference" href="#pymonkey.Context.get_object_private"><tt class="xref docutils literal"><span class="pre">get_object_private()</span></tt></a>.</dd></dl> + +<dl class="method"> +<dt id="pymonkey.Context.get_object_private"> +<tt class="descname">get_object_private</tt><big>(</big><em>object</em><big>)</big><a class="headerlink" href="#pymonkey.Context.get_object_private" title="Permalink to this definition">¶</a></dt> +<dd><p>Returns the <tt class="docutils literal"><span class="pre">private_obj</span></tt> passed to <a title="pymonkey.Context.new_object" class="reference" href="#pymonkey.Context.new_object"><tt class="xref docutils literal"><span class="pre">new_object()</span></tt></a> +when <cite>object</cite> was first created. If it doesn’t exist, <tt class="xref docutils literal"><span class="pre">None</span></tt> +is returned.</p> +<p>This functionality is useful if you want to represent Python +objects in JS-land.</p> +</dd></dl> <dl class="method"> <dt id="pymonkey.Context.init_standard_classes">
--- a/docs/rendered/searchindex.js Fri Aug 07 11:21:21 2009 -0700 +++ b/docs/rendered/searchindex.js Fri Aug 07 18:56:32 2009 -0700 @@ -1,1 +1,1 @@ -Search.setIndex({desctypes:{"0":"method","1":"exception","2":"class","3":"data"},terms:{spidermonkei:[0,1],represent:1,all:0,code:[0,1],execut:[0,1],less:0,path_to_objdir:0,untrust:0,lack:0,becaus:0,intermediari:0,product:0,veri:0,concept:0,particularli:0,languag:0,involv:0,web:0,onli:[0,1],depend:0,just:0,expos:0,field:0,readabl:0,except:1,should:0,platform:0,add:[],busi:0,want:0,requir:0,easier:0,isinst:1,them:0,liter:1,"return":1,around:0,thei:[],without:0,python:[0,1],swig:0,none:1,pave:0,obtain:0,atul:0,envis:0,capi:0,increas:0,world:0,now:[],vast:0,enabl:0,xpcom:0,like:[0,1],level:1,vibrant:0,get_runtim:1,anyth:0,probabl:0,resolv:0,server:0,"try":0,easili:0,off:0,either:0,each:1,debug:0,through:1,where:0,manag:0,mean:0,right:[],new_context:1,some:0,back:0,realli:0,wrap:1,see:1,"static":0,mirror:0,disadvantag:0,stack:0,collector:0,casual:0,librari:0,out:0,even:[],index:0,detect:0,string:1,collect:0,test_pymonkei:[],someth:0,abl:0,best:1,rhino:0,access:[0,1],state:1,outstand:0,dynam:0,rational:0,between:0,print:1,"new":1,objdir:0,forth:1,method:1,challeng:0,refer:0,docutil:1,process:0,full:0,run:0,complex:0,garbag:0,javascript:[0,1],situat:0,new_object:1,here:0,standard:[0,1],objcec:[],extens:0,reason:[],base:0,preprocessor:0,repositori:0,complementari:0,path:0,come:0,don:0,valu:1,thrown:1,about:0,actual:0,easi:0,thread:1,befor:0,similar:0,current:[0,1],moment:0,page:0,blargh:[],instanc:[0,1],doctest:0,context:1,logic:0,freeli:1,chang:1,com:0,tremend:0,singleton:1,via:[0,1],simpli:[],eval:1,obviou:0,pyrex:0,feel:[],solut:0,arrai:1,js_initstandardclass:1,number:0,latter:0,header:0,instruct:0,api:0,serverj:0,contributor:0,side:0,mark:0,facil:0,your:0,duplic:0,quit:0,given:1,span:1,advantag:0,wai:0,script:0,ergonom:0,interact:1,init_standard_class:1,due:0,custom:0,avail:0,falsi:1,program:1,call:1,low:1,lot:0,suit:[],interfac:1,type:1,"final":0,too:0,free:[],from:[0,1],relationship:0,offer:1,tool:0,mozilla:[0,1],huh:[],search:0,ctype:0,indic:0,known:0,central:0,eas:0,repres:1,"true":1,than:0,must:0,count:0,wide:0,kind:[],made:0,possibl:[],provid:0,straight:0,work:0,conceptu:1,can:[0,1],learn:0,akin:0,modul:[0,1],more:[0,1],root:0,browser:0,pre:1,would:0,traceback:0,file:0,creat:[0,1],give:0,runtm:1,unintuit:[],readm:0,ani:[0,1],doesn:0,trap:0,blah:[],exist:0,have:0,tabl:0,need:0,unfortun:[],featur:0,check:[],contribut:0,packag:0,alwai:0,sweep:0,"null":1,engin:[0,1],goal:0,equival:1,secur:0,boop:[],parti:0,make:0,belong:1,error:1,cross:0,same:1,client:0,note:0,how:0,ideal:0,other:[0,1],read:0,build:0,which:[0,1],test:0,verifi:1,you:0,document:[0,1],noth:0,boof:[],runtim:1,map:1,matur:0,relat:1,http:0,clone:0,object:[0,1],wherea:0,usabl:0,hand:0,fairli:0,plai:0,never:0,mai:1,develop:0,defin:[0,1],associ:1,"class":1,pymonkei:[0,1],built:1,directori:0,memori:0,todo:[],land:0,sphinx:0,write:0,third:0,java:0,also:[0,1],macro:0,cycl:0,counter:1,doe:[],inform:1,sandbox:0,exampl:[],environ:0,obj:1,thi:[0,1],undefin:1,programm:0,model:0,profil:0,evaluate_script:1,awesom:0,know:[]},titles:["Pymonkey Documentation","<tt class=\"docutils literal docutils literal\"><span class=\"pre\">pymonkey</span></tt> — Access SpiderMonkey from Python"],modules:{pymonkey:1},descrefs:{"pymonkey.Runtime":{new_context:[1,0]},"pymonkey.Object":{get_runtime:[1,0]},"pymonkey.Context":{new_object:[1,0],init_standard_classes:[1,0],get_runtime:[1,0]},pymonkey:{Object:[1,2],Runtime:[1,2],undefined:[1,3],Context:[1,2],error:[1,1]}},filenames:["index","pymonkey"]}) \ No newline at end of file +Search.setIndex({desctypes:{"0":"method","1":"exception","2":"class","3":"data"},terms:{spidermonkei:[0,1],represent:1,all:0,code:[0,1],execut:[0,1],less:0,also:[0,1],abl:0,untrust:0,lack:0,becaus:0,cross:0,veri:0,concept:0,particularli:0,equival:1,get_object_priv:1,languag:0,involv:0,web:0,onli:[0,1],depend:0,just:0,expos:0,how:0,readabl:0,except:1,should:0,platform:0,add:[],busi:0,requir:0,easier:0,isinst:1,build:0,them:0,runtm:1,"return":1,around:0,thei:[],python:[0,1],swig:0,kind:[],pave:0,obtain:0,print:1,envis:0,capi:0,increas:0,world:0,now:[],"class":1,vast:0,enabl:0,xpcom:0,like:[0,1],anyth:0,vibrant:0,get_runtim:1,level:1,probabl:0,resolv:0,server:0,"try":0,easili:0,either:0,each:1,debug:0,through:1,where:0,manag:0,mean:0,right:[],new_context:1,clone:0,some:0,back:0,realli:0,contributor:0,see:1,"static":0,mirror:0,disadvantag:0,collector:0,casual:0,librari:0,out:0,even:[],index:0,detect:0,string:1,collect:0,facil:0,someth:0,path_to_objdir:0,rhino:0,access:[0,1],state:1,outstand:0,dynam:0,rational:0,between:0,atul:0,"new":1,objdir:0,forth:1,method:1,challeng:0,refer:0,docutil:1,full:0,run:0,garbag:0,javascript:[0,1],situat:0,new_object:1,here:0,standard:[0,1],objcec:[],extens:0,reason:[],base:0,preprocessor:0,repositori:0,complementari:0,path:0,come:0,sphinx:0,valu:1,thrown:1,search:0,actual:0,easi:0,thread:1,fairli:0,root:0,current:[0,1],http:0,plai:0,page:0,blargh:[],instanc:[0,1],doctest:0,context:1,logic:0,freeli:1,chang:1,com:0,other:[0,1],first:1,tremend:0,singleton:1,via:[0,1],simpli:[],obviou:0,pyrex:0,feel:[],solut:0,arrai:1,js_initstandardclass:1,number:0,header:0,instruct:0,api:0,serverj:0,central:0,wrap:1,side:0,custom:0,test_pymonkei:[],your:0,duplic:0,quit:0,given:1,span:1,creat:[0,1],wai:0,script:0,ergonom:0,interact:1,init_standard_class:1,due:0,mark:0,avail:0,falsi:1,program:1,call:1,low:1,lot:0,suit:[],interfac:1,type:1,"final":0,store:1,too:0,free:[],from:[0,1],relationship:0,offer:1,tool:0,mozilla:[0,1],huh:[],about:0,ctype:0,within:1,known:0,don:0,eas:0,"true":1,than:0,must:0,count:0,wide:0,none:1,made:0,retriev:1,obj:1,possibl:[],provid:0,straight:0,work:0,never:0,private_obj:1,exampl:[],conceptu:1,can:[0,1],which:[0,1],learn:0,akin:0,modul:[0,1],more:[0,1],similar:0,browser:0,pre:1,"function":1,would:0,traceback:0,have:0,advantag:0,give:0,process:0,unintuit:[],pass:1,readm:0,ani:[0,1],doesn:[0,1],repres:1,blah:[],liter:1,exist:[0,1],file:0,tabl:0,need:0,unfortun:[],featur:0,check:[],contribut:0,packag:0,alwai:0,sweep:0,"null":1,engin:[0,1],goal:0,want:[0,1],secur:0,boop:[],parti:0,latter:0,belong:1,when:1,intermediari:0,same:1,client:0,note:0,field:0,ideal:0,complex:0,best:1,indic:0,evaluate_script:1,test:0,verifi:1,you:[0,1],document:[0,1],noth:0,boof:[],runtim:1,map:1,product:0,relat:1,matur:0,privat:1,trap:0,object:[0,1],wherea:0,usabl:0,hand:0,befor:0,moment:0,eval:1,mai:1,develop:0,defin:[0,1],associ:1,stack:0,pymonkei:[0,1],built:1,directori:0,memori:0,todo:[],land:[0,1],off:0,write:0,third:0,java:0,read:0,macro:0,cycl:0,counter:1,doe:[],inform:1,sandbox:0,without:0,environ:0,error:1,thi:[0,1],undefin:1,programm:0,model:0,profil:0,make:0,awesom:0,know:[]},titles:["Pymonkey Documentation","<tt class=\"docutils literal docutils literal\"><span class=\"pre\">pymonkey</span></tt> — Access SpiderMonkey from Python"],modules:{pymonkey:1},descrefs:{"pymonkey.Runtime":{new_context:[1,0]},"pymonkey.Object":{get_runtime:[1,0]},"pymonkey.Context":{get_object_private:[1,0],new_object:[1,0],init_standard_classes:[1,0],get_runtime:[1,0]},pymonkey:{Object:[1,2],Runtime:[1,2],undefined:[1,3],Context:[1,2],error:[1,1]}},filenames:["index","pymonkey"]}) \ No newline at end of file
--- a/docs/src/pymonkey.txt Fri Aug 07 11:21:21 2009 -0700 +++ b/docs/src/pymonkey.txt Fri Aug 07 18:56:32 2009 -0700 @@ -64,9 +64,21 @@ Returns the :class:`Runtime` that the context belongs to. - .. method:: new_object() + .. method:: new_object([private_obj]) + + Creates a new :class:`Object` instance and returns + it. ``private_obj`` is any Python object that is privately + stored within the new JS object; it can be retrieved using + :func:`.get_object_private()`. - Creates a new :class:`Object` instance and returns it. + .. method:: get_object_private(object) + + Returns the ``private_obj`` passed to :func:`.new_object()` + when `object` was first created. If it doesn't exist, ``None`` + is returned. + + This functionality is useful if you want to represent Python + objects in JS-land. .. method:: init_standard_classes(object)