Hello i have a custom object I created and it i am trying to clone it with an identical object but it seems the object is by reference.
Here is just a sample of what I am doing to give you an idea possibly what I am looking for.
My object has one property that I can read and write to. (get set) named ID. It also has a constructor.
local myobject:myobject &oID = create myobject:myobject();
&oID.ID="cool1";
local myobject:myobject &oID2 = create myobject:myobject();
&oID2=&oID;
&oID2.ID="NOTCool";
If i now check &oID.ID and &oID2.ID they are both set to "NOTCool". I assumed create would have created a new instance of my object but it is looking as though that is incorrect.
Any suggestions on how i might be able to make this work?
Thanks.
| Title | Under | Posted on |
|---|---|---|
| how to create application status in peoplesoft campus solutions 8.9 version | PeopleSoft Functional | 05/17/2012 - 4:09am |
| horizantal text in charts | PeopleSoft Technical | 05/10/2012 - 4:57am |
| no current buffer context error | PeopleSoft Technical | 05/10/2012 - 1:19am |
| Integration Broker : Operating Instance/Pub Contracts/Sub Contracts | PeopleSoft Technical | 04/24/2012 - 11:05am |
May I know why you assigned:
&oID2=&oID;
I think the above statement causing both the objects point to same memory location.
correct me if i am wrong.
&oID2=&oID.ID;
may be this could work
Post new comment