Hello,
I'm wondering about the fact that it seems not able to return a new object from an existing script object into a LiveCycle Designer Field.
Let's say we have follwing situation:
1. A Script object named "LcdObjects" with an object "Field":
function Field(som) {
this.som = som;
this.hideField = function() { som.presence = "hidden";}}
2. Now i want to create a new instance of the "Field" object within an existing text field (in the "click" event):
f = new LcdObjects.Field(this);
f.hideField();
3. The above code does not work with the text field. It seems that there is no new object created.
4. It seems that i have to create an auxiliary function for every object in the script object to get a successful return of a new object:
function newField(som) { returnnew Field(som); }
5. With the auxiliary function i can create a new instance of the Field object within my text field:
f = LcdObjects.newField(this);
f.hideField();
But i'm not very happy with this solution because with this workaround i have to create an auxiliary return function for every single object which seems not very smart to me.
Is there no general soltution to return an instance of an object without using this kind of workaround?
Thank you.