#203648 - 2011-11-12 10:45 PM
Kixtart, Kixforms Duplicate Def's Nul Data...not playing..
|
MACE
Starting to like KiXtart
Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
|
I have a dim memory of something like this in the past but I have located no resolution to the problem. RE: http://www.kixforms.org/forum/viewtopic.php?t=1720 I am not sure whether it is ME, Kixforms/Kixtart or Windows. Explicit on in all scripts (Jochen)  I have global constants and flags set in scripts. I don't declare Form page variables as global until in the Function which creates the forms. All Event Functions see the global declarations so I can freely read and update the forms and pass back to KIX for output. The problem is, in Kixforms Classic DLL it does not appear to support .close and when the function closes, unlike KIXtart, the variables seem to remain registered as declared though not accessible so if I re-call the form function it does not simply rebuild but errors saying duplicate definition of form variables. If I set a global flag to indicate whether the form has already been built or not so bypasses re-building, kixtart then cant access the supposidly declared variables. VERY frustrating !  The only way I have, so far, is to re-RUN the script afresh and close the current one - just so I can use the same form again !! NB: I tried using VARTYPE on re-used form variables and it shows them as Nul. I also considered writing out temporary scripts and running them to create the forms with routines to write out results to temporary files for reading in the main kix script. Does seem to be a bit of overkill but needs must if its the only means of fixing the problem!
Anyone on the Kixtart side of the equation got any ideas as I need to use kixtart.dll for portability. Can't be installing .Net everywhere !
|
Top
|
|
|
|
#203658 - 2011-11-13 04:15 PM
Re: Kixtart, Kixforms Duplicate Def's Nul Data...not playing..
[Re: Lonkero]
|
MACE
Starting to like KiXtart
Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
|
Lokero, you are confusing .Net with Classic, .Net does work ! See http://rclarke.net/docs/chm/index.htm?page=source%2Ftabpageevents.htm properties of Forms; there is NO means of closing classic forms or disposing of them ! My exasperation is that iSdeclared is TRUE even though the Function which created the variables has closed.In Kixtart this change of scope clears the variables, not in Kixforms. If I turn off, contrary to policy, (EXPLICIT,ON) and Comment out Form variable Globals as implied above, get exactly the same result. Kixtart sees the form construction variables as declared even after the form function has closed. Looks like I am going to have to get creative and make self generating scriplets so always close on exititing script.
Edited by MACE (2011-11-13 04:18 PM)
|
Top
|
|
|
|
#203680 - 2011-11-14 12:09 PM
Re: Kixtart, Kixforms Duplicate Def's Nul Data...not playing..
[Re: Lonkero]
|
MACE
Starting to like KiXtart
Registered: 2004-09-07
Posts: 150
Loc: Manchester UK
|
|
Top
|
|
|
|
#203697 - 2011-11-14 05:45 PM
Re: Kixtart, Kixforms Duplicate Def's Nul Data...not playing..
[Re: MACE]
|
Lonkero
KiX Master Guru
   
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
Ok. so, you discovered already that using isdeclared works.
anyways, like said previously, we are talking about kixtart variables, so it has nothing to do with kixforms or forms. if you want to scope the variables into that function, you need to use DIM.
and, just to make it more confusing, kixforms classic has it's own variables, I think they were called expandos. anyways, once you dim your $subform1, it will get disposed on exit from that function.
also, $system should have it's own doevents. again, not 100% sure cause it's like 5 years since I last used classic. but if it, it should streamline the code quite a bit.
_________________________
!download KiXnet
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 323 anonymous users online.
|
|
|