<div dir="ltr">ahhh,<div><br></div><div>Yep adding [PythonType] to my class made it work.</div><div><br></div><div>Thanks</div><div><br></div><div>Jonathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 10, 2014 at 3:56 AM, Jeff Hardy <span dir="ltr"><<a href="mailto:jdhardy@gmail.com" target="_blank">jdhardy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Oct 6, 2014 at 12:57 AM, rabidgremlin <<a href="mailto:rabidgremlin@gmail.com">rabidgremlin@gmail.com</a>> wrote:<br>
> Hi there,<br>
><br>
> I'm using IronPython to add scripting to my app. I have some classes with<br>
> methods that I don't wish to expose to the IronPython scripting engine.<br>
><br>
> Doing some googling it looks like I should be able to add [PythonHidden] to<br>
> my class methods to achieve this, however it doesn't appear to work.<br>
><br>
> eg I have a Layer class with the following method<br>
><br>
> [PythonHidden]<br>
> public Canvas GetLayerCanvas()<br>
> {<br>
> return layerCanvas;<br>
> }<br>
><br>
> In my Python script I am still able to call this method and a dir() command<br>
> on a Layer object results in:<br>
><br>
> ['AddElement', 'Delete', 'GetElements', 'GetLayerCanvas', 'GetName',<br>
> 'MoveBottom', 'MoveDown', 'MoveElementBottom', 'MoveElementDown',<br>
> 'MoveElementTop', 'MoveElementUp', 'MoveTop', 'MoveUp', 'RemoveElement',<br>
> 'SetName', '__class__', '__delattr__', '__doc__', '__format__',<br>
> '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__',<br>
> '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__',<br>
> '__subclasshook__']<br>
><br>
> Any ideas?<br>
<br>
</div></div>[PythonHidden] requires the class to have the [PythonType] (or<br>
[PythonModule]) attribute.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Jeff<br>
</font></span></blockquote></div><br></div>