ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication
by Ryan Sturmer other posts by this author
Jul 10 2007 5:45PM messages near this date
view in the new Beta List Site
Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication | Re: [pyxpcom] Python Scripting Component/PyXPCOMInterprocessCommunication
I guess the part that I'm missing is, that when I instantiate an xpcom
object X from javascript, that object represents an instance of executing
python code.  If I instantiate an xpcom object Y from that python code, how
do I arrange it such that that object Y has access to variables in the
environment that instantiated X?


On 7/10/07, Mark Hammond <mhammond@[...].au>  wrote:
> 
>  > Picture having an object within the pyshell environment called
>  parentUserInterface
>  > which has methods such as setIndicatorColor(), setIndicatorBlinkRate(),
>  etc...
>  > allowing my user (equipped with appropriate documentation regarding what
>  parts
>  > of the user interface are scriptable to write code like this
>  >
>  > def alert():
>  >    parentUI.setIndicatorColor(255,0,0)
>  >    parentUI.setIndicatorBlinkRate(10)
>  >    return
> 
>  > and call alert() from within his code, confident that it will in fact
>  effect
>  > the user interface in the way she specifies.
> 
>  parentUI can be any xpcom object at all.  It could be implemented in
>  JavaScript or Python (the former might be easier for interaction with the
>  UI).
> 
>  > Does this make sense at all?   I'm either horribly misusing the
>  programming model,
>  > or am missing something pretty basic.
> 
>  I'm almost certainly still missing something; I don't see why you think
>  there would be a problem with this.
> 
>  Cheers,
> 
>  Mark
> 
> 
Thread:
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer
Mark Hammond
Ryan Sturmer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved