Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CRASH: remove the ActivePage object
Message
De
30/06/2004 08:36:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
CRASH: remove the ActivePage object
Divers
Thread ID:
00918948
Message ID:
00918948
Vues:
38
* VFP : 6.5,7.1,8.1,9b

Observed : if an Active Page is removed, VFP removes it,
but the operation is not really completed;
then the internal status becomes unstable and clicking afterwards on the tabs area
crashes with a C05 exception

Expected : The operation should complete successfully,
- the pageframe should stay in a stable condition
- the first available page should be activated,
if PageCount = 0, then a "Form search focus loop" is started,
and the first form control available receives the focus.

Steps: run this code and observe
PUBLIC oform1
 
oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form
      AutoCenter = .T.
      AllowOutput = .F.
      Name = "Form1"
      Caption = "Observe the simulation"

      ADD OBJECT pageframe1 AS pageframe WITH ;
            ErasePage = .T., ;
            PageCount = 2, ;
            Top = 56, ;
            Left = 52, ;
            Width = 241, ;
            Height = 169

      ADD OBJECT timer1 AS timer WITH ;
            Top = 14, ;
            Left = 46, ;
            Height = 23, ;
            Width = 23, ;
            Interval = 1000

      PROCEDURE Load
            CLEAR
      ENDPROC

      PROCEDURE Pageframe1.Page1.Click
            THIS.Parent.RemoveObject(THIS.Name)
      ENDPROC

      PROCEDURE Pageframe1.Page1.Destroy
            ? PROGRAM()
      ENDPROC

      PROCEDURE Timer1.Timer
            this.Enabled=.F.
            DO CASE
                  CASE THIS.Tag==''
                        this.Tag='1'
                        MOUSE CLICK AT 80,100 PIXELS WINDOW form1
                  CASE THIS.Tag=='1'
                        this.Tag='2'
                        ? "Pageframe PageCount is :" ,thisform.Pageframe1.PageCount
                        ON ERROR ?? MESSAGE()
                        ? "Pageframe Page[1] Name is :"    ,thisform.Pageframe1.Page[1].Name
                        ON ERROR
                        WAIT WINDOW "Wait please ..." TIMEOUT 5
                  CASE THIS.Tag=='2'
                        this.Tag='3'
                        MOUSE CLICK AT 80,200 PIXELS WINDOW form1
            ENDCASE
            this.Enabled=.T.
            this.Reset
      ENDPROC

ENDDEFINE
Fabio
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform