Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When does datasession change ?
Message
From
23/06/2001 16:46:33
 
 
To
23/06/2001 10:04:25
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00521629
Message ID:
00522820
Views:
12
>Hi Lutz,
>
>MY connection to Internet last night had some trouble and I can't
>reply to you.
>
>As for 'SET VIEW ON', I don't take complete 'Loose coulping' in my
>development environment, form itselt can't be run at command window
>without supe class's instanciation such as 'goApp', I will look over
>more to do loose coupling next time.

Start the debugger from your form, simple add some object, alter click method to 'SUSPEND'. If run from foxpro, just click the object and you are within command window. 'RESUME' will restart your form.
Look at FAQ fore a way to add a way to start debugger without harm your customer. The click may be on even on some label or ather, usually not-to-click objects. I alter all forms to show a brand showing name and version. If the EXE is running from environment it's clickable.<g>


>As you recommended, i've already read "Kill Objects Dead" from Doug Hennig
>and i'm trying to be so careful whenever declare variables or make refer-
>ences to some object, and in this case i thoughly chechked if there is un-
>released reference.

Be carefull to declare ALL variables with LOCAL, otherwise the effect may be strange.


>Regarding your suggestion to clear useless command like 'SET DATASESSION..',
>you are right. It's my wrong habbit to be accustomed in kind of framework's
>situation. But to assign a property to tell some object was made is not my
>preferable method. I usually take this method even not better..^^;;
>
>1. to open concerned form from LOOPUP FORM, I indicated form's name by hard
>. codeing. because form itself is diffrent according to PK value.
>
>. goApp.Doform("myform",parms)..actually wraps following command only
>. DO FORM XXX with parms...and augments form's collection array to +1.

Yeah, may way describes a way for classes - I've stoped using SCX. ::|


>
>2. At Init() of called form, calling form's name and some variables are saved in
>. form's property. and when he is released it is checked whether someone
>. calls him or not. If someone calls, the calling form is activated at
>. UNLOAD method as Following.
>
>UNLOAD METHOD;
>
>Thisform.iscalledform()
>DODEFAULT()
>SET MESSAGE TO
>
>ISCalledform;
>
>
>LOCAL lcFormName,lnCount
>
>lcFormname=UPPER(AllT(Thisform.cForm))  && calling form's name
>
>IF !EMPTY(lcFormname)  && someone called
>
> FOR lnCount = 1 TO goApp.nFormCount    && form's collection
>   IF UPPER(ALLT(JUSTSTEM(goApp.aFormNames[lnCount])))==lcFormName AND ;
>     VARTYPE(goApp.aForms[lnCount])="O"

>     && if data changed,talk to calling form here is some change and reflects
>        changes when activated.
>
>     goApp.aForms[lnCount].lDatachanged=This.lDatachanged
>
>     && activate calling form
>     goApp.aForms[lnCount].Show
>
>     EXIT
>
>   ENDIF
> ENDFOR
>
>ENDIF
>

The IF clause may fail, because .aForms[lnCount] may be type object but point to nothing (related to your framework).
More secure is:

>   IF UPPER(ALLT(JUSTSTEM(goApp.aFormNames[lnCount])))==lcFormName;
     AND (;
>    VARTYPE(goApp.aForms[lnCount])="O" AND !ISNULL(goApp.aForms[lnCount]);
     )


>
>However, One thing embarrassing makes me fool...huh~
>I copied same form which has a problem to another project what I'm upgrading now
>and just..just changed Dataenvironment and controlsource of each control and
>some specific property values because the function is same.
>There was no problem completely, even consistently opened several times from
>menu directly with multi-instancing and from other lookup form's calling together. I was really really embarrassed.

This closely looks like your problem is within your lookup form, this form seems to be o.k.


>I think i have to completely re-make this form and try it again. I guess there
>would be some unknown generic errors in this form.
>After trying, I'will report you the result.
>I heartedly appreciate Your kind attention and good assistence and sorry not
>to explain quite clearly with my short English.

Your english is fine, but we translate from korean to english to german language, so there will always be some lack of information ::(



Have you checked out the point where your code crashes?

Beg your pardon, but how to call you? I know you do some reverse naming in korea, so I'm mixed up a little bit ...

Lutz
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform