Re: Scripting question...
| Date : Thu, 27 Dec 2007 16:42:25 -0600 |
| To : XSI(at)Softimage.COM |
| From : "Bradley Gabe" <withanar(at)gmail.com> |
| Subject : Re: Scripting question... |
XSI Factory will work for scripts inside XSI as well as for netview development.
The real question is, how much netview development have you done to date? How much do you intend to do in the future?
If you haven't done much of any, there are a number of other things you will have to do to all your code to make sure it works well in the netview environment. Doing a search/replace on every instance of instantiating a collection is small potatoes compared to renaming each and every variable to be name scope safe, so I wouldn't worry too much about specifically future proofing your current scripts for netview.
On the other hand, if you do intend to start working with netview GUI's and XSI, which is very nice for larger pipelines, sharing your tools, and opening up to lots of other fun toolkits, let me know and I can fill you in on what I meant by the variable name scope mentioned above.
-B
On Dec 27, 2007 3:58 PM, Ponthieux, Joey <j.ponthieux(at)nasa.gov> wrote:
Brad, Stephen,
Thanks for the replies. Would you suggest that just using
XSIFactory is sufficient for all purposes or should I reserve it only
for times when scripting needs to be written for NetView?
Thanks
Joey Ponthieux
NCI Information Systems Inc.
NASA Langley Research Center
____________________________________________________________
Opinions stated here-in are strictly those of the author and
do not represent the opinions of NASA or any other party.Stephen Blair wrote:
>
> XSIFactory.CreateActiveXObject allows you to do this in NetView:
>
> var fso = oFactory.CreateActiveXObject("Scripting.FileSystemObject");
>
> Scripting.FileSystemObject is clearly not a "safe" object, and you'll
> get IE security warnings if you try to create that object in NetView
> with 'new ActiveXObject'.
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
> *From:* owner-xsi(at)Softimage.COM [mailto: owner-xsi(at)Softimage.COM] *On
> Behalf Of *Bradley Gabe
> *Sent:* Thu 27 December 2007 2:24 PM
> *To:* XSI(at)Softimage.COM
> *Subject:* Re: Scripting question...
>
> They both create the same collection object.
>
> The main difference , I think, is instantiating the new ActiveXObject
> only works when you are inside the XSI scripting envrionment for
> jscript/vbscript. If you are writing an application using the MS
> scripting framework outside of XSI, such as a Netview or web interface
> for XSI, you'll need to access the XSI object factory to instantiate
> XSI specific collections.
>
>
> On Dec 27, 2007 1:00 PM, Ponthieux, Joey <j.ponthieux(at)nasa.gov> <mailto:j.ponthieux(at)nasa.gov>> wrote:
>
> Yeah, your right, I interpreted this from VBScript code in XSI docs. I
> rarely use VBScript and I assumed that it was directly interchangable
> with JSCript. This raises an interesting point though. I was unaware
> that there are commands derived for specific languages as opposed
> to the
> languages only changing the basic constructs and syntax. I see
> from the
> man pages that these are accepted methods for creating an
> XSICollection.
>
> VBScript
> Set oColl = CreateObject("XSI.Collection")
> set oColl = XSIFactory.CreateActiveXObject( "XSI.Collection " )
>
> JScript
> var oColl = new ActiveXObject("XSI.Collection") ;
> var oColl = XSIFactory.CreateActiveXObject ("XSI.Collection");
>
>
> So I think the question I really meant to ask was what is the
> difference
> between
>
> var oColl = new ActiveXObject(" XSI.Collection") ;
> and
> var oColl = XSIFactory.CreateActiveXObject("XSI.Collection");
>
> You've answered that in how it might relate to NetView, but if you are
> not writing scripts to be used in NetView is it otherwise assumed
> that
> they are identical commands? I've been using XSIFactory, I wasn't sure
> if this was considered the norm or the exception.
>
> Thanks
>
>
> Joey Ponthieux
> NCI Information Systems Inc.
> NASA Langley Research Center
> ____________________________________________________________
> Opinions stated here-in are strictly those of the author and
> do not represent the opinions of NASA or any other party.
>
>
>
> Bernard Lebel wrote:
> > There is no such thing as CreateObject in JScript. You're either
> > referring to the VBScript function for creating ActiveX objects,
> or to
> > new ActiveXObject() of JScript.
> >
> > I was once told that using the XSIFactory methods in-place of the
> > language constructs (new ActiveXObject() for JScript, CreateObject()
> > for VBScript) prevented security issues when that code is ran in
> > NetView, as ActiveX is generally considered unsecure in browsers.
> > That's all I know!
> >
> >
> > Cheers
> > Bernard
> >
> >
> >
> > On Dec 27, 2007 11:21 AM, Ponthieux, Joey < j.ponthieux(at)nasa.gov> <mailto:j.ponthieux(at)nasa.gov>> wrote:> <mailto:Majordomo(at)Softimage.COM> with the following text in body:
> >
> >> Is there any fundamental difference between
> >>
> >> var oColl = XSIFactory.CreateActiveXObject("XSI.Collection ");
> >>
> >> and
> >>
> >> var oColl = CreateObject( " XSI.Collection" );
> >>
> >> and is it better to use one versus the other?
> >>
> >>
> >>
> >> --
> >> Joey Ponthieux
> >> NCI Information Systems Inc.
> >> NASA Langley Research Center
> >> ____________________________________________________________
> >> Opinions stated here-in are strictly those of the author and
> >> do not represent the opinions of NASA or any other party.
> >>
> >> ---
> >> Unsubscribe? Mail Majordomo(at)Softimage.COM
> <mailto:Majordomo(at)Softimage.COM> with the following text in body:
> <mailto: Majordomo(at)Softimage.COM> with the following text in body:
> unsubscribe xsi
>
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
- References:
- Scripting question...
- From: "Ponthieux, Joey" <j.ponthieux(at)nasa.gov>
- Re: Scripting question...
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- Re: Scripting question...
- From: "Ponthieux, Joey" <j.ponthieux(at)nasa.gov>
- Re: Scripting question...
- From: "Bradley Gabe" <withanar(at)gmail.com>
- RE: Scripting question...
- From: "Stephen Blair" <Stephen_Blair(at)Softimage.COM>
- Re: Scripting question...
- From: "Ponthieux, Joey" <j.ponthieux(at)nasa.gov>
- Scripting question...
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: Re: Bug on renaming objects
- Next by Date: Re: Bug on renaming objects
- Previous by Thread: Re: Bug on renaming objects
- Next by Thread: Re: Bug on renaming objects
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |