Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2881

PB.NET creating ancestor classes in separate assemblies

$
0
0

Hello, all

Can someone point me to a walkthrough on how to create ancestor classes and lock them into either PB or .NET assemblies?

 

Becasue, after creating an assembly with an ancestor class, I cannot inherit from it when I add this assembly as reference another PB.NET project.

 

I tryed creating a PB assembly with a class called "nvo_anc_service"

 

I manage to inherit from its reference, but when I try to create a .NET assembly from it it sees none of the ancestor public functions.

 

Even when I am not trying to export the ancestor classes, this is the most common MSBuild error:

//-----------------

 

The name '__nvo__' does not exist in the current context

 

//----------------

 

this is the difference between working code and non-working code in atuo generated c#

//--------------WORKING CODE-----------------------

[System.Diagnostics.DebuggerStepThrough]

public class n_datastore : System.IDisposable

{

  internal c__n_datastore __nvo__;

  private bool ____disposed____ = false;

  public void Dispose()

  {

   if (____disposed____)

    return;

   ____disposed____ = true;

   c__gst_sync.InitSession(__nvo__.Session);

   Sybase.PowerBuilder.WPF.PBSession.CurrentSession.DestroyObject(__nvo__);

   c__gst_sync.RestoreOldSession();

  }

  public n_datastore()

  {

  

   c__gst_sync.InitAssembly();

   __nvo__ = (c__n_datastore)Sybase.PowerBuilder.WPF.PBSession.CurrentSession.CreateInstance(typeof(c__n_datastore));

   c__gst_sync.RestoreOldSession();

  }

  internal n_datastore(c__n_datastore nvo)

  {

   __nvo__ = nvo;

  }

}

//---------------------------------------------------------

 

//--------NOT WORKING CODE----------------------

[System.Diagnostics.DebuggerStepThrough]

public class n_datastore : silverbyte.common.data.c__n_anc_datastore

{

  public n_datastore() : base()

  {

  

   c__guest_profile_service.InitAssembly();

   __nvo__ = (c__n_datastore)Sybase.PowerBuilder.WPF.PBSession.CurrentSession.CreateInstance(typeof(c__n_datastore));

   c__guest_profile_service.RestoreOldSession();

  }

  internal n_datastore(c__n_datastore nvo) : base()

  {

   __nvo__ = nvo;

  }

}

 

//-------------------------------------------------------------

 

 

 

 

So, is it possible to create an exposed ancestor class and later inherit from it in PB.NET?


Viewing all articles
Browse latest Browse all 2881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>