Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Framework object and making reference to it
Message
De
17/04/2006 16:19:46
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Titre:
Framework object and making reference to it
Divers
Thread ID:
01114144
Message ID:
01114144
Vues:
59
I had to make a change in my framework and have all my applications (desktop, Web Services and ASP.NET) to use it by the use of an instance of the class and not directly, as it was before. The framework is a DLL file having a bunch of .vb files. Before, any application was able to access the framework properties such Framework.App.cStartupDirectory. But, this is no longer possible as I require each application to create an instance of the class. Thus, the creation of the object goes like this:
            Dim oApp As Framework.App = New Framework.App
So, in that application, I can now refer to the framework application such as oApp.cStartupDirectory.

However, in order to compile an updated version of that DLL, I need to be able to resolve all internal references first. Many .vb files are making us of the framework application properties. So, for example, I have Browser.vb file, which is compiled inside the Framework.dll, having this:
Public Class Browser

    ' Add an option in the record
    ' expC1 Url
    ' expC2 Image
    ' expC3 Tooltip
    Public Shared Function AddRecordOption(ByVal tcUrl As String, ByVal tcImage As String, _
     ByVal tcTooltip As String) As String
        Dim lcHtml As String
        lcHtml = "<A HREF=LX" + tcUrl + "><IMG SRC=file:///" + _
         Framework.Internet.EncodeUrl(oApp.cStartupDirectory + tcImage + ".gif") + _
         " BORDER=0 ALT=""" + tcTooltip + """ WIDTH=19 HEIGHT=18></A>"
        Return lcHtml
    End Function

End Class
As you can see, I changed the reference from Framework.App.cStartupDirectory to oApp.cStartupDirectory. The problem I have is that oApp does not exist in the Framework.dll as this only goes live once an application creates an instance of the framework application such as demonstrated at the top of this message. So, how can I succeed to compile Framework.dll and resolve the "oApp is not declared" message.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform