Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refresh() locking form?
Message
From
01/07/2003 17:49:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Refresh() locking form?
Miscellaneous
Thread ID:
00805862
Message ID:
00805862
Views:
58
I'm using VFP 7.0

myContainer does a cancel when a particular error occurs.
myContainer contains myCmdButton and myChkAuto.
myContainer.Refresh() looks at myChkAuto and executes myMethod()
myContainer.myCmdButton.Click() executes myMethod()

When an error() occurs during myMethod():
if it was triggered by myCmdButton everything is fine.
but if it was triggered by myContainer.Refresh() the form cannot be closed.

There are no objects created. In fact that's what the error is - no object was created.
I can't see any differenct between the 2 triggers. Is there something internal in Refresh() that locks the form if it's cancelled?
myContainer.Refresh()
  DODEFAULT()
  IF VARTYPE(THIS.lRefreshed) = 'U'
    THIS.ADDPROPERTY('lRefreshed',.T.)
    IF ! EMPTY(THIS.myChkAuto.VALUE)
      THIS.myMethod()
    ENDIF
  ENDIF

myContainer.myCmdButton.Click()
  this.parent.myMethod()

this rest of this code is abbreviated.

myContainer.myMethod()
  this.oIE.myOtherMethod()
  .....

myContainer.oIE_Access()
  this.oIE = createobject(this.myClass)
  if isNull(this.oIE)
    messagebox( 'Cannot create ' + this.myClass )
    cancel
  endif
  return this.oIE

myContainer.Error(nError,cMethod,nLine)
  if nError = 1733 and lower(cMethod) = 'oie_access'
    return
  endif
  return dodefault(nError,cMethod,nLine)
Bill Morris
Next
Reply
Map
View

Click here to load this message in the networking platform