Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird problem...
Message
 
 
To
04/10/2011 19:38:32
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01525574
Message ID:
01525598
Views:
34
>Naomi,
>
>Can you show your code when you click Cancel?
>
>Dennis

In the Cancel button I have this code
select rsShows
thisform.cancel()
thisform.ActivateParentPage(3)
Cancel method of the form has
DODEFAULT()
thisform.lMadeChanges = .f.
and default code is
thisform.lAdded = .f.
thisform.lAdding = .f.
IF NOT EMPTY(ALIAS()) AND CURSORGETPROP("Buffering") > 2
	tablerevert(.t.)
ENDIF
And ActivateParentPage is
lparameters tnPage
local lnIndex, lnParentIndex
thisform.pageframe1.ActivePage = m.tnPage
try   
   with thisform.ProductionSeriesTree as TListProLibCtl
      lnIndex = .listindex
      IF m.lnIndex < 0 && The item was deleted
         lnIndex = thisform.LastSelectedIndex 
      endif   
      lnParentIndex = .ItemParent(m.lnIndex)

      .selected(m.lnParentIndex) = .t. && Activate the parent
   endwith
catch to loError
   **
endtry
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