Calling method

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

Calling method

Postby angbf » Fri 17. Aug 2018 7:20:21

Hi, I am new to promotic.
I wish to do a calling method that can pass the value from a panel to another panel.
Example : graphic Item1 in panel A is calling method which send the value to graphic item2 in panel B.
Can I know how to deal with this?
angbf
 
Posts: 2
Joined: Sun 15. Jul 2018 13:43:10

Re: Calling method

Postby admin » Mon 20. Aug 2018 9:56:18

Hello,

if you want to send values from one panel into another panel this is possible only when second panel is opening.
Then you can use Openview method to open panel and use 4-th parameter of this method to send required values into opened panel.
Example ho to do this is in PmiButton preconfigurations when you create new one-state button and you select Action named "Open modal panel ...".
But this is only 1-st part of this problem, 2-nd part is in modal dialog, when you create new object in application you select group "Panels (PmPanel)/Common inputbox".
I recommend you to create first this panel and after that create button, where you can select path to opened panel.

If both panels are opened there is no possibility to send data directly between them.
You can send data from one panel to application (server) and than second panel must determine, that new data are available and then this pnel can read this data from server.
admin
Administrátor
 
Posts: 70
Joined: Wed 12. Dec 2012 15:43:09

Re: Calling method

Postby angbf » Tue 21. Aug 2018 6:56:01

Hi, sir. Thanks for your reply.
Lets said i have two panel named "Execution" and "Homepage".
Inside Execution panel, there is a PmiButton while there is a PmiText in HomePage.
When the button pressed, it call to the method "test" inside PmiText to retrieve the value.
is possible to call method from graphic item to another item in different panel directly?
i tried to put the path inside the method, but it is undefined or null object.
angbf
 
Posts: 2
Joined: Sun 15. Jul 2018 13:43:10

Re: Calling method

Postby Kazimierz Heczko » Wed 22. Aug 2018 9:27:17

Hello,
it is possible to call methods in one graphic item from another graphic item in the same panel.
But it is NOT possible to call methods in one graphic item from graphic item in other panel.
It is not possible to refer to objects in editor application inside script in graphic panel, and it is not possible to refer to other panels or graphic items in other panels.
Kazimierz Heczko
 
Posts: 69
Joined: Thu 13. Dec 2012 9:28:56


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 4 guests

cron