call procedure in 2 smart viewers

symonbobo

New Member
Hi everybody.

I have:
1 main window w1.
1 smartfolder in my main window h1.
2 folders in my folder h1.
2 viewers (v1 in folder 1 and v2 in folder 2)

Question:
how can I do to call a procedure in v1 from v2 ?

Thank you very much
 
You can do it in different ways. Try using PUBLISH - SUBSCRIBE facility in Progress Or get the handle of the viewer and run that procedure in handle.

Rgeards
Philip
 

symonbobo

New Member
Hi philippoommen1.

Thank you very much for your reply. :)
It is exactly that I wanted.

Can you just explain to me how can I get the handle of a viewer.
Thanks a lot
 
As quick response please try the following

In Viewer1 create new internal procedure called test then write message "Hello" view as alert-box buttons ok.

In viewer2 put button and write PUBLISH "test".

Add a New smart-link between viewer1 to Viewer2 name should be test

Run the window and click on the button in viewer1.

And see test procedure from v2 is working or not

I hope this is enough to Start with your R&D
icon7.gif


Regards
Philip P Oommen
 

symonbobo

New Member
Your exemple doesn't work.
But it works if I use SUBSCRIBE with PUBLISH without smartlink between v1 & v2.

Do you know how to get a handle ?

Regards
 
get handle

Greetings,

Somewhere in the object of where U want 2 know the handle; use this syntax:
ASSIGN
hdlObject = THIS-PROCEDURE:HANDLE /*assign local var object handle*/
.

Then make that variable available the procedure that needs it.
This is why PSC introduced the PUBLISH & SUBSCRIBE mecanism in V9
Makes a log simpler, when don`t need the handle just PUBLISH an event.
Progress for tomorrow, today.
 
Top