About conditional compilation – PB Docs 115
About conditional compilation You can use the number sign (#) at the start of a line or block of code in PowerBuilder to mark the code for specialized processing prior to PowerScript compilation. Each line of code or block of conditional code set off by a leading number sign is automatically parsed by a PowerBuilder…
Writing code inside a .NET block – PB Docs 115
Writing code inside a .NET block Because the main PowerBuilder compiler does not recognize the classes imported from .NET assemblies, you must surround the code referencing those classes in a conditional compilation block for a .NET application. For example, to reference the .NET message box Show function, you must surround the function call with preprocessor…
PowerScript syntax for .NET calls – PB Docs 115
PowerScript syntax for .NET calls When you make calls to .NET assemblies or their methods or properties from PowerBuilder, you must follow PowerScript syntax rules. The following syntax rules are especially important for C# developers to keep in mind: Instantiating a class To instantiate a class, use “create”, not “new”. Even when you are referencing…
Adding .NET assemblies to the target – PB Docs 115
Adding .NET assemblies to the target If you want to call methods in .NET assemblies in your .NET application, you need to import the assemblies into the target. To import a private .NET assembly into a .NET target: Right-click the target in the System Tree and select .NET Assemblies. The Target Properties dialog box displays…
Configuring ASP.NET for a .NET Web Service project – PB Docs 115
Configuring ASP.NET for a .NET Web Service project IIS and ASP.NET You configure ASP.NET for .NET Web Service projects the same way you configure ASP.NET for .NET Web Forms projects. This includes making sure the Web server has a compatible version of IIS and the 2.0 version of ASP.NET is selected for your Web service…
Calling assembly methods from PowerScript – PB Docs 115
Calling assembly methods from PowerScript When you call methods from managed assemblies in PowerScript, you must use PowerBuilder datatypes in any method arguments or return values. Table 14-3 shows the mappings between .NET, C#, and PowerBuilder datatypes. Table 14-3: Datatype mappings in managed assembly methods .NET datatype C# datatype PowerBuilder datatype System.Boolean boolean Boolean System.Byte…
About PowerBuilder Web Forms applications – PB Docs 115
About PowerBuilder Web Forms applications The PowerBuilder .NET Web Forms solution employs ASP.NET technology. It has a three-tier architecture, with the browser client as the front end, and the PowerBuilder components on the IIS server as the middle tier. The database tier remains unchanged. Moving an existing application from client-server architecture to three-tier Web architecture…
WebPermission – PB Docs 115
WebPermission The WebPermission class belongs to the System.Net namespace described on the Microsoft Web site . Table A-16 shows the required WebPermission setting for features and functions in .NET targets. Table A-16: WebPermission required in .NET targets Function or feature Permission required GetURL (Inet function) Connect for urlname argument PostURL (Inet function) Connect for urlname…
Chapter 3 Client-Side Events and Default Event Handlers – PB Docs 115
Chapter 3 Client-Side Events and Default Event Handlers About this chapter This chapter describes the client-side events available to Web Forms DataWindow controls and the default JavaScript event handlers that post back to the server. Contents Topic About client-side programming Default event handlers Client-side support for the Web DataWindow control Alphabetical list of Web DataWindow…
Other custom permission types – PB Docs 115
Other custom permission types Other permission types that you can customize on the Security tab page of the Project painter (aside from the permissions described in this appendix) have no direct impact on PowerScript functions or properties in .NET targets. However, if you use the language interoperation feature of PowerBuilder, you might also want or…