SAP Knowledge Base Article - Preview

1952387 - PB .NET Assembly Build Fails When Using Global Variables

Symptom

  •  When creating a PB .NET assembly that uses global variables, the build process fails.

    The following can be found in the PowerBuilder 12.5 -> New Features -> PowerBuilder .NET Targets document.  

    "The global objects in the PB Assembly are not instantiated. They require a reference to the instantiated variables from the application. Pass the global variable instantiated in the application into the PB Assembly and assign it to the global variable defined in the PB Assembly target. "

  • Writing code in a function in a PB Assembly to set global variables to those of the main app does not compile and results in the following errors.

    Target CoreCompile
    Csc: Error CS0200 f_setglobals(QRCerror.Cmessage.Ctransaction.Cdynamicstagingarea.Cdynamicdescriptionarea.) (1,3): Property or indexer 'Sybase.PowerBuilder.PBApplication.Error' cannot be assigned to -- it is read only
    Csc: Error CS0200 f_setglobals(QRCerror.Cmessage.Ctransaction.Cdynamicstagingarea.Cdynamicdescriptionarea.) (2,3): Property or indexer 'Sybase.PowerBuilder.PBApplication.Message' cannot be assigned to -- it is read only
    Done building project "ClientFramework.csproj" -- FAILED.

    This same code will also not compile in an application target


Read more...

Environment

  • SY PowerBuilder 12.5.1 build 4541.  

Product

PowerBuilder 12.5

Keywords

KBA , BC-SYB-PB , PowerBuilder , Bug Filed

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.