1. David Vasconcelos
  2. PowerServer 2020 or older (Obsolete)
  3. Tuesday, 18 June 2019 18:30 PM UTC

How can you detect a Powerserver Web Application running in a browser  (or any app, I need to see if our HELP files are already running in a browser)?  If I have a web app running and a user try's to open a second instance in the same or different browser how can check to see if its already running.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2019 20:54 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi David;

   I worked on this problem some more last night and now this latest version of my framework "nails" any 2nd Web App instance from running! Either within the same web browser or across any combination of web browsers on the users entire PC!   ;-)

  I just updated a new version on SF of the OE Demo App with this new framework code for you to test:  https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2017

    Have a look at the "nc_app_controller_master" base object class in the "STD_FC_Base" PBL and in particular, the updated code in the "of_is_application_instantiated" method.

Regards .... Chris

They can run but, they cannot hide (anymore) - LOL!

Comment
  1. David Vasconcelos
  2. Thursday, 27 June 2019 09:51 AM UTC
Thanks for the dedication...Chris, I will have it downloaded later today.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 27 June 2019 19:07 PM UTC
You are most welcome David! It was a very interesting coding challenge. I had thought about this aspect a few years ago - but, your question got me going on it again. ;-)
  1. Helpful
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Monday, 24 June 2019 16:23 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Thanks Chris, I am in the process of looking at the one you mentioned yesterday.  I will also download this one later today.

Thanks again..

Dave V.

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 24 June 2019 14:29 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

Hi David;

  Update: I made some more progress over the weekend on web browser App instances. I am now able to detect IE Web browser based Apps trying to open multiple instances of itself. You can view the updated example code in my frameworks "OrderEntry" demo app. I just uploaded a new "beta" version last night that has this code ...

FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2017

  Have a look at the "nc_app_controller_master" base object class in the "STD_FC_Base" PBL and in particular, the "of_is_application_instantiated" method.

  I have not been able to get the multi-browser code working from the EDGE, FF, Chrome or Opera side. These Apps can see the IE side of the App, but not their web browser specific Apps. The multi-browser web plug-in that drives these web browsers is a different architecture though than IE's. I think that I just need a little more time to nail this aspect down.  ;-)

Actual IE / Chrome test ...

HTH

Regards ... Chris

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 19:02 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

Hi David;

  Here is what your PS Web App looks like from the IE perspective ...

HTH
Regards ... Chris

Comment
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 18:50 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

where can I find your PB Explorer?  or is it in part of your framework?

Comment
  1. Chris Pollach @Appeon
  2. Friday, 21 June 2019 18:57 PM UTC
Hi David;

Its just another example App built from my framework. I built it to show that any PB App can fully introspect the MS-Windows O/S it if they want to. ;-)

FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/WindowsExplorer

Regards ... Chris
  1. Helpful
  1. David Vasconcelos
  2. Friday, 21 June 2019 19:22 PM UTC
Thanks Chris.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 18:44 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 6

Hi David;

  I just did a quick test with the MS-Edge browser and my framework test app (OrderEntry) and my PB Explorer utility for MS-Windows (native PB App) and the explorer can locate the PowerServer web App already running. I think that you should be able to do the same from within the PS Web app - but, have not tried to do that yet.

Regards ... Chris

Comment
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Friday, 21 June 2019 18:06 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 7

Anyone have any ideas?

Comment
There are no comments made yet.
David Vasconcelos Accepted Answer Pending Moderation
  1. Thursday, 20 June 2019 10:22 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 8

Your approach won't work if the app crashes and does not update the info in the registry.

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 19 June 2019 01:19 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 9

Hi David,

Please try solution below.

1 Using AppeonGetBrowserVersion function to get browser type.
https://www.appeon.com/support/documents/appeon_online_help/ps2019/workarounds_and_api_guide/ch01s03s02.html#AppeonGetBrowserVersion_function

2 Check and record the application name and browser type when application start, you can write it to registry or local file.

3 Update application information when exit application.

Regards,
ZhaoKai

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.