Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making an object available in a NameObjectCollectionBase
Message
From
28/01/2011 11:37:09
 
 
To
28/01/2011 11:20:51
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01497597
Message ID:
01497673
Views:
27
>I'm pretty sure that you use an instance of your oApp object throughout your app, but is that class a singleton where you have a shared/static method to get the instance? If so, then you could access it like this:
>
>lnLanguage = MyAppClass.GetoAppInstance().nLanguage

That's what I figured out after. I have tested it yet. But, I believe that if that App.vb is shared, than I can use it like App.oApp.nLanguage, where oApp becomes available under it at initialization time.

For desktop application, this might do it. But, for the Web, as my oProcess object is not shared, I haven't found an architecture which would allow me to do it. So, what I did was to create a Label class, which contains all the most commonly used labels defined already in several languages where I can refer as oProcess.oLabel.cCompany, for example, which would then be initialized to the language of the user.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform