# \[FEATURE\] Casting function for Perspective properties

**URL:** <https://forum.inductiveautomation.com/t/feature-casting-function-for-perspective-properties/27146>\
**Category:** Ignition Early Access\
**Created:** [August 5, 2019, 7:50am UTC](https://forum.inductiveautomation.com/t/feature-casting-function-for-perspective-properties/27146 "2019-08-05T07:50:58Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 5, 2019, 5:29pm UTC](https://forum.inductiveautomation.com/t/feature-casting-function-for-perspective-properties/27146/3 "2019-08-05T17:29:55Z")

</div>

> [@paul-griffith](#):
>
> This is a feature I’m actively working on.

Consider doing this entirely with the python wrappers. The resulting objects will retain their Java identity and function within Perspective but will be mutable and iterable as if they were native python objects. If you register the wrappers correctly in the Python subsystem, the wrapping will be entirely automatic anywhere python calls a java method to retrieve one of these objects. And anywhere you deliberately call java2py within perspective to expose one of these objects to a python interface. Please take a look at my experience with Vision's PyComponentWrapper:

> [@Transaction groups triggered expression item updating when trigger is false](http://forum.inductiveautomation.com/t/transaction-groups-triggered-expression-item-updating-when-trigger-is-false/17196/14):
>
> Ok, so I’ve been down the rabbit hole and found Ignition’s (undocumented) PyComponentWrapper. I haven’t deciphered it enough to be sure, but it seems to be invoked only for particular situations, based on the string constants in the class file (like “getComponent” and “getComponents”). To play with this, I constructed a conversion adapter like so: public class PyComponentAdapter implements PyObjectAdapter { public PyComponentAdapter() {} @Override public boolean canAdapt(Object jObj) { …

Perspective's java objects treated this way will simply _ **be** _ python objects, too.

---

_[View the full topic](https://forum.inductiveautomation.com/t/feature-casting-function-for-perspective-properties/27146)._
