Information générale
Catégorie:
The Mere Mortals Framework
>Steve,
>
>>I still don't get it. I specified the location of the metadata tables to be my app DATA directory on the server. This directory is configurable by the user at runtime. Is it legitimate for me to 'hardcode' that directory in this property?>
>
>>When I try to run my app in non-debug mode, I get a 'Cannot find database: CMS' in the cDataEnvironment.INIT when Stonefield tries to instantiate its DE. The code that checks for TYPE("goApp") == "O" returns .F. and therefore it cannot use GetSetting to retrieve the location of the data files.>
>
>OK...now I understand the situation!
>
>Here's what you need to do (assuming your Stonefield MetaData is in your application's Data directory):
>
>1. Add the following code to the Init() of your CStoneField subclass...it will pick up the location of the data directory as specified in the Windows Registry (or .ini file):
>
>This.cMetaDataDir = ;
> JustPath(This.cDELoader.oDataEnvironment.cDefaultDatabase) + '\'
>DODEFAULT()
>
>2. Rather than instantiating the Stonefield class in your Application class's AddChildren() method, place the following line at the top of your Application class's Do() method:
>
>This.Add('oSDT', 'StoneField')
>
>At this point in the application startup process, goApp is available for access.
>
>Regards,
Kevin,
That worked great!
Thanks a million.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement