0

I've deployed a PowerBuilder application to a .net web form application. There are some menu items which I would like to disable in the web-application only. After deploying the application to web form application, I have two targets in my workspace, e.g. test and test_webform.

Both have same libraries etc. When I disable an item in m_test_frame in test_webform, it disables the menu item in the desktop application as well.

Can someone tell how I can disable only in the web application but keep them enabled in the desktop application. Thanks.

Terry
  • 6,160
  • 17
  • 16
user966585
  • 830
  • 3
  • 10
  • 15

2 Answers2

2

You probably want to look at conditional compilation around code that disables the menu items, like

#IF DEFINED PBWEBFORM THEN
   m_foo....Enabled = FALSE
#END IF

Good luck,

Terry

Terry
  • 6,160
  • 17
  • 16
1

We use a variable in our application manager (PFC application) to indicate the environment the app is running in (in our case this is Development/Test/Production). I don't know how you determine the app is running as a Web Form, but there must be something you could check. If nothing else you could stick an extra library & dummy object in one of the versions so you could tell. After your app determines the environment it is running in it can enable or disable the menu items as appropriate.

Hugh Brackett
  • 2,706
  • 14
  • 21