1. Sang Chul Song
  2. PowerServer 2020 or older (Obsolete)
  3. Friday, 11 May 2018 02:44 AM UTC

private variable is is_test of string type, in userobject.
is_test value is 1
create command button in this userobject
create event ue_test in userobject
command button call parent event ue_test


visual object u_privatevariable 

Instance variables
Private:
   String is_test = "1"

 

event

  ue_msgbox

 

controll

   command button cb_1 - title is userobject

       event clicked : parent.Event ue_msgbox()


 

use this object in window object.
this object same name instance variable is_test in window object.
window instance variable is_test value is 5
create command button in this window
command button call messagebox("", is_test)
this userobject ue_msgbox call messagebox("", is_test)


window object w_privatevariable

instance variables

  string is_test = "5"

 

controll

   command button cb_1 - title is windows

       event clicked : messagebox("", is_test)

   u_privatevariable uo_1

       event ue_msgbox : messagebox("", is_test)




run PB, window command button click message is 5, userobject command button click message is 5
run appeon, window command button click message is 5, userobject command button click message is 1

this userobject variable is private.

Alfredo Aldama Accepted Answer Pending Moderation
  1. Friday, 11 May 2018 13:42 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1
Hi, I understand your code of this form uo_1 string is_test=1 ue_msgbox(){messagebox('', is_test)} cb_in: parent.ue_msgbox() W_1 string is_test = 5 cb_out Messagebox('',is_Test) uo_1 Cb_in ue_msgbox('',is_test) 1.- Your code no show parameters for event 2.- the scope of var "is_test", in this case the object precedes 3.- Parent of Cb_in is Uo, that is the reason because you get 1
Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 11 May 2018 13:15 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Sang;

   Can you tell us ...

  • Version & build of PB that you are using.
  • Version & build of PowerServer that you are using.
  • What web browser are you using and its version.

Regards ... Chris

Comment
There are no comments made yet.
Matthew Balent Accepted Answer Pending Moderation
  1. Friday, 11 May 2018 11:43 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

Have you tried this without having the variable names the same?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.