tag:blogger.com,1999:blog-7591641845060677730.post7744787233379647551..comments2024-02-26T23:40:53.404-05:00Comments on PeopleSoft Learning : Instance Variable in Peoplecode - Application packagesSandeep Ghttp://www.blogger.com/profile/16233707014779544910noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7591641845060677730.post-67064942241815287642015-07-29T16:53:51.512-04:002015-07-29T16:53:51.512-04:00Hi All,
Sorry for the confusion Instance variable...Hi All,<br /><br />Sorry for the confusion Instance variable is not the static variable, similar to Java application, hope it was same, but not.<br /><br />Private variable cannot manipulated by other objects.<br />Private Instance Variable can be manipulated by other objects of the same class and not by objects on the different class.Ganeshhttps://www.blogger.com/profile/05671330781617372189noreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-62640955043162300002014-11-17T18:27:13.958-05:002014-11-17T18:27:13.958-05:00if you wanted to do
1) if you want to count how ...if you wanted to do <br /><br />1) if you want to count how many objects of the class was created you increment this variable in the constructor of the class.<br /><br />you would need to declare the variable outside the class as global scope and increment the counter in the constructor of the class.kane81https://www.blogger.com/profile/14471355777720928832noreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-91298630887357469342014-11-17T18:24:41.221-05:002014-11-17T18:24:41.221-05:00Sorry but instance variable are != static variable...Sorry but instance variable are != static variables. That is just plain wrong.<br /><br />See here more about private variables:<br /><br /><br />http://jjmpsj.blogspot.com.au/2014/07/private-app-class-members.htmlkane81https://www.blogger.com/profile/14471355777720928832noreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-16533721637436757472014-03-09T05:41:02.396-04:002014-03-09T05:41:02.396-04:00Are you really sure peoplesoft Instance variables ...Are you really sure peoplesoft Instance variables equal to Java static variables? I think Peoplesoft Instance variable is the opposite of Java static variables. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-85407207452816883492010-10-05T01:43:49.836-04:002010-10-05T01:43:49.836-04:00AG,
If each instance variable is different from a...AG,<br /><br />If each instance variable is different from another one, what is the difference from normal variable and instance variable ?<br /><br />Private instance variable and <br />private variable - how are they different ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-64708898032491708512010-10-01T07:55:45.775-04:002010-10-01T07:55:45.775-04:00I wrote the below code inside one Application Pack...I wrote the below code inside one Application Package whose name was ZC_TEST<br /><br />class zc_test<br /> method zc_test();<br /> method printcount();<br />private<br /> instance number &objectcount;<br />end-class;<br /><br />method zc_test<br /> &objectcount = &objectcount + 1;<br />end-method;<br /><br />method printcount<br /> MessageBox(0, "", 0, 0, "The value of &objectcount = " | &objectcount);<br />end-method;<br /><br />Then created one small Application Engine program to access the same class using the below code:<br />import ZC_TEST:*;<br /><br />Local ZC_TEST:zc_test &obj1 = create ZC_TEST:zc_test();<br />&obj1.printcount();<br />Local zc_test:zc_test &obj2 = create zc_test:zc_test();<br />&obj2.printcount();<br /><br />But the out of the program is not as desired.<br /><br />PeopleTools 8.50.09 - Application Engine<br />Copyright (c) 1988-2010 PeopleSoft, Inc.<br />All Rights Reserved<br /><br /><br />The value of &objectcount = 1 (0,0)<br /> Message Set Number: 0<br /> Message Number: 0<br /> Message Reason: The value of &objectcount = 1 (0,0) (0,0)<br /><br />The value of &objectcount = 1 (0,0)<br /> Message Set Number: 0<br /> Message Number: 0<br /> Message Reason: The value of &objectcount = 1 (0,0) (0,0)<br />Application Engine program Z_TEST ended normally<br /><br />After looking at the log file I did not feel that instance variables are same like static variables. Please suggest.<br /><br />Thanks,<br />-Kiran PKiran_PShttps://www.blogger.com/profile/05094351197938707432noreply@blogger.comtag:blogger.com,1999:blog-7591641845060677730.post-37920296060508999312010-09-16T11:20:23.173-04:002010-09-16T11:20:23.173-04:00one of my friend read this and started correlating...one of my friend read this and started correlating component variable to an Instance variable. <br /><br />and object is identified by its class, again if multiple instances of the same class are present as different objects each instance variable is different than the other one.AGnoreply@blogger.com