Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas on solution?
Message
From
31/01/2003 13:19:21
 
General information
Forum:
Visual FoxPro
Category:
Project manager
Miscellaneous
Thread ID:
00747185
Message ID:
00747750
Views:
16
Hi David,
Works like a charm, but I have 2 questions.

1. In QMF() do you know how I can get the name of the window that is going to be opened?
DODEFAULT(oFile,cClassname) doesn't seem to do it, because Wontop() still has the Project name.
I'm thinking about creating my own ProjectHook.AfterClosingFile() method, but I would need to have the name of the window.

2. Do you know of a more elegant way to get a timer control to release itself?

I did this:
procedure QueryModifyFile(oFile,cClassName)
if <my test for qualified classes>
  lcWindow = 'CLASS DESIGNER - ' ;
    + UPPER(JUSTFNAME(oFile.name)) ;
    + ' (' + UPPER(cClassName) + ')'
  lc = 'go' + cClassName
  public (lc)
  &lc = CREATEOBJECT( 'myTimer', lc, lcWindow )
endif

method myTimer.Init(cPublicVariable,cWindowToCheck)
this.cPublicVariable = cPublicVariable
this.cWindowToCheck = cWindowToCheck

method myTimer.TimerEvent()
if !wexist(this.cWindowToCheck)
  ...
  lc = this.cPublicVariable
  release &lc
endif
>Bill,
>
>>It would be perfect if the projecthook had an AfterModifyFile() method, but it doesn't, only a QueryModifyFile() that executes BEFORE the file is modified.
>
>I'm not sure I full understand what you are trying to do here, but what about using the QMF() event to create a timer, that fires say once every 5 seconds, when it does it looks to see if the designer window is still open, if the window is open the timer just does nothing and will fire again at the next interval. If the designer window is gone then you can call the code to go do the stuff to rebuild the class.
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform