Announcement

Collapse
No announcement yet.

Having what is probably a simple problem (application focus vs shell)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roy Cline
    replied
    I do know what the "right" solution is, however, search
    for notify on file change or waitonsinglebjectchange or some
    correct form of these two key words for possible insight into
    a solution to the problem.

    I would suggest that your program as it starts can get
    the correct information and then use some form of
    windows notification to know if there are changes, etc.

    My suggest relates to what I think is a program design
    problem not a problem with DIR$. However, I understand
    the limitations to advise or suggestions given to a problem
    which a careful a search of these forums coupled with
    an understand of the object of the "code" is not always
    apparent to someone who does not understand the
    situation being asked about, such as me.

    Leave a comment:


  • David Carle
    replied
    Michael-

    You might be right about the modifications between initiating the dir$. Will take a look.

    Thanks for the direction.

    -David

    Leave a comment:


  • Michael Mattias
    replied
    Best guess? You are modifying the directory you are searching between calls to DIR$ (add or delete a file, probably a delete)

    MCM

    Leave a comment:


  • Michael Mattias
    replied
    > bugs using the DIR$ function (does not always return all the files).

    Crapola. Show failing code. We'll tell you how to fix your bug.

    Leave a comment:


  • Edwin Knoppert
    replied
    David, i just posted a PwrDev-VarClass example on my board to enumerate folders..

    Leave a comment:


  • Adam J. Drake
    replied
    David - I actually wasn't suggesting using DIR$() at all - I was suggesting using the API Counterpart - have you tried it? I have yet to encounter a time when it doesn't return all files, including hidden ones.

    Leave a comment:


  • David Carle
    replied
    Roy-

    Thanks the reply. Not sure which problem you are referring. The DIR$ problem or lost focus in SHELL problem. If you don't mind, could you provide the link the solution you view as the right one.

    Your help appreciated.

    -David

    Leave a comment:


  • Roy Cline
    replied
    In source code forum are a number of solutions.

    Leave a comment:


  • David Carle
    replied
    would loved to have use the DIR$ (had been using this historically), the problem is periodically it does not return all the files in the directory. there a number of entries on the PB forums also showing this problem and the shell as the only solution.

    Leave a comment:


  • Adam J. Drake
    replied
    Rather than shelling, have you tried using the API Counterpart to DIR$()? Probably would be a lot less headaches...

    Leave a comment:


  • Having what is probably a simple problem (application focus vs shell)

    I have a small GUI application which is basically a text box to display status messsages and a progress bar to provide visually of where the application is.

    Part of the program is using

    Shell Environ$("COMSPEC")+" /C "+FOUTFILE, 6

    which I am using to capture an accurate directory because of bugs using the DIR$ function (does not always return all the files).

    After the above shell statement (which is doing what it is supposed to do), the textbox and progress bars no longer update, even though the rest of the program works through to completion doing what it should be doing.

    All thoughts or direction appreciated.

    Regards.

    -David
Working...
X