[AccessD] OT Colby's Framework

Borge Hansen pcs at azizaz.com
Mon Oct 24 00:58:57 CDT 2005


John,
Reply in line below... and then more
----- Original Message ----- 
From: "John Colby" <jwcolby at colbyconsulting.com>
Subject: Re: [AccessD] OT Colby's Framework

> 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.

I am jumping in at the [deep] end!
I have been stepping through your code a few times, and hopefully learnt a
bit.

My knowledge and experience with class modules, objects, eventsinking etc.
is minimal.


> 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.

In your table "usystblFWSysVars " in the MDA code library your have the two
sysvar records:
53 EnblPtrStack
54 EnblNameStack

In the Init() code of the clsInstanceStack the corresponding two variables
blnEnblPtrStack and blnEnblNameStack are set to True by default.

So while initializing the Framework class logging is On by default. Then you
can have it turned on or off





> 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?



>
> -----Original Message-----
 [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Borge Hansen
> Sent: Thursday, October 20, 2005 8:48 AM
> 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




More information about the AccessD mailing list