What do you mean by Uninitialized?  Are you getting back None?

 

What you should get back is an instance of the class that implements the interface.  If the class is implementing the interface explicitly (so the method is actually declared w/o public in C# and w/ the interface name) then you’ll need to call through the interface passing in the instance directly, eg:

 

result = gp.Execute(…)

IGeoProcessorResult.DoSomething(result, …)

 

 

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Pardy
Sent: Wednesday, October 18, 2006 2:05 PM
To: [email protected]
Subject: [IronPython] Intefaces

 

All,

 

I have a case where my namespace contains many interfaces and classes. One of my classes contains a method that returns a pointer to an interface:

 

>>> gp.Execute.__doc__

'IGeoProcessorResult Execute(self, str Name, IVariantArray ipValues, ITrackCance

l pTrackCancel)'

>>> 

 

Anytime I do the following, my return object is unintialized:

 

result = gp.Execute(tool, parameters, None)

 

My question is how to I do this correctly? How would I get a result object that is initialized?

 

Thanks,
Jason

_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to