Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To iif or not to iif = .t.
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513276
Message ID:
00514643
Views:
10
>>Hi!
>>
>>Yes, it is released inproperly. Some files could be opened or loaded in the memory etc. You can figure out exctly which file is in use by a simple way - met the situation with access denied, then try to delete or move all files from the projects folder to other location. All opened files will fail to being deleted/moved.
>
>Vlad,
>
>Thanks a lot. I tried to copy files and it said: "Can not copy IndxDict"
>

Vlad,

Seems like this didn't fix the problem. I can move whole directory to another place, but it still gives me "File access denied". This project uses files from some other places, do I have to check each reference?



>I had these lines:
>
>loPrivateDS=newobject("DataDictDS","DataDictDS.prg")
>   llReturn=loPrivateDS.DoFunction(m.tcRunMode, m.tcDBCName, m.tcProcess, m.tcInputTable)
>   release loPrivateDS
>
>So I thought all tables are automatically closed. But apparently it's not, so I added explicit use in select('IndxDict') and use in select('DataDict') at the end
>>
>>>>Hi!
>>>>
>>>>Usually I do the same too. However, the interruption of long process looks for me like the 'Cancel' command in VFP. The "return to..." here looks like the Cancel command, but it do not cancels it at all, just returns to the higher levels of the call stack. VFP is designed also to be universal to organize the long data processing, thus there are some things that are unusual for structured programming and are quite useful.
>>>
>>>Thanks again. I'll think about it some more. In the meantime we found another problem with this particular application, which I'm trying to debug right now.
>>>We have a main application called JobControl. If somebody opens JobControl, run my application, then move to other regimes, I now can not recompile the project on my machine (I have File access denied). My colleague suggested, that it might be not proper release of application, but I'm not sure, this is the problem. Do you have suggestions, I can check?
>>>
>>>Thanks in advance.
>>>
>>>>
>>>>>>Hi!
>>>>>>
>>>>>>Then, if subroutines used, this approach might be even more better.
>>>>>>Take a look to the RETURN command help. As you see, you can return to any procedure from the procedures call stack missing the rest of all other procedures code that are called after the procedure where you returning to. For example:
>>>>>>
>>>>>>
>>>>>>A.pRG
>>>>>>....
>>>>>>DO B
>>>>>>    B.PRG
>>>>>>    ....
>>>>>>    DO C
>>>>>>         C.PRG
>>>>>>         ....
>>>>>>         DO D
>>>>>>              D - return to B here
>>>>>>         ... - this code not running after return from D to B
>>>>>>    .... the rest code of B
>>>>>>
>>>>>>
>>>>>>I guess you can use that way to return to special program that call the entire process from any subroutines.
>>>>>>
>>>>>>PS: I understand that certainly the thread was about other things, however, I just tried to answer your particular question about returning from the any point of the long process. As you see, you can organize this without constant checking for some logical variable. Tough this violates the OOP and structured programming, so this should have limited use.
>>>>>>
>>>>>
>>>>>Vlad,
>>>>>
>>>>>Thanks for the explanation. My original intent was to re-write code using structured programming...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform