John Colby
jwcolby at ColbyConsulting.com
Thu Oct 20 09:10:46 CDT 2005
LOL, Borg, I am impressed! I must admit that I haven't had anyone EVER contact me about this stuff, which is one reason that I don't spend a lot of time on the demo stuff after I write it. One quick question, did you work through all the articles or are you jumping in at the end? I don't care, if you know what you are doing and are jumping in that is cool, I'm just curious. If you worked through all the articles and the example code then I am absolutely floored at your persistence. This stuff is not necessarily easy. As for your problem, the framework is looking for a sysvar called "EnblPtrStack", which should be true or false. I use SysVars to turn on/off functionality in my framework, and this code is telling the cIS class to either use the class logging mechanism or do not use it. The class logging mechanism is a class which tracks the names of the classes as they are instantiated, so that you can get a listing in instantiation order of all the class instances currently loaded. I also have to say that "it is not failing here". I just opened the zip file, unzipped it and relinked FE to BE, and it runs perfectly, at least until you try and close the database, whereupon the module in the usysFrmFWCleanup in the framework throws a runtime error. There is a me. Code fragment in the form_Close. Sigh. I have fixed that and will upload the zip to my site. So what happens with the crash? Is SV() not returning a value (returning a null) which the cIS.EnblPtrStack cannot accept? IIRC, I return a null if the SysVar doesn't exist, which would indicate that the sysvar was not loaded from the SysVar table. Can you step into SV("EnblPtrStack"), and in the debug window ask for the count of the SysVar collection? Are there ANY sysvars in the SysVar collection? John W. Colby www.ColbyConsulting.com Contribute your unused CPU cycles to a good cause: http://folding.stanford.edu/ -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Borge Hansen Sent: Thursday, October 20, 2005 8:48 AM To: Access Developers discussion and problem solving Subject: [AccessD] OT Colby's Framework Hi John, This probably doesn't belong here... but Is someone framing me? Case : DemoFW_FE.mdb I have problem initializing..... When executing the line mclsFramework.Init Nothing in function FWinit() it runs the init of the clsFramework: Public Sub Init(ByRef robjParent As Object) Set mobjParent = robjParent cIS.Register Me assDebugPrint "init " & mstrInstanceName, DebugPrint mclsSVFW.Init Nothing, gfwcnn, "usystblFWSysVars" cIS.EnblPtrStack = SV("EnblPtrStack") <================== crashes here cIS.EnblNameStack = SV("EnblNameStack") mclsZip.Init Nothing End Sub The function Public Function SV(strSVName As String) As Variant SV = mclsSVFW.SV(strSVName) End Function takes us to : with "EnblPtrStack" as the strSVName value Function SV(strSVName As String, Optional strSVFld As String = "SV_VarValue") As Variant On Error GoTo Err_SV Select Case strSVFld Case "SV_VarValue" SV = mcolSysVars(strSVName).Value() <========= errors here (error number 5) Case "SV_Memo" SV = mcolSysVars(strSVName).Memo() Case "SV_UserEditable" SV = mcolSysVars(strSVName).UserEditable() Case "SV_AllowOverride" SV = mcolSysVars(strSVName).AllowOverride() Case Else End Select Exit_SV: Exit Function Err_SV: Select Case Err Case 0 Resume Exit_SV Case 5 SV = Null <======== You set the SV to null, but then errors with : "Invalid Use of NULL" Resume Exit_SV Case Else MsgBox Err.Description, , "Error in Function clsSysVars.SV" Resume Exit_SV End Select Resume 0 '.FOR TROUBLESHOOTING End Function ....... Being able to run your sample code is the first step ... Persistence is getting me nowhere! Any suggestions? /borge -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com