Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageCount property not updating when removing a page...
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00462615
Message ID:
00463182
Vues:
16
James,

No solution yet...

I should have mentioned that before. I use the RemoveObject method to remove the page. I have tried manually setting the PageCount after the ReomveObject method and that does cause an exception error. I even tried setting the PagCount to itself (.PageCount = .PageCount) thinking it may trigger the value to update with no luck.

Simply diminishing the PageCount property (.PageCount = .PageCount - 1) is not an option since any Page can be removed from the PageFrame not just the last one.

I am using Mark Hall's OOP menu classes found in the files section. The classes have made manipulating menus so much easier. I contacted him to see if there may possibly be a conflict with method names or something of that nature. I may be reaching but I've run out ideas on what could be causing this strange behavior.

I'll let you know. Thanks for your help.

>>Hey James,
>>
>>Thanks for your reply.
>>
>>Depending on user settings, the toolbar may or may not be available. That's the reason for adding the menu pad.
>>
>>>>Hello All,
>>>>
>>>>I have a form method that removes pages from a PageFrame. The method is accessed from a toolbar button or a menu pad. The intermittent problem is the PageCount property does not update when the method is called from the menu. The PageCount does however update properly when called from the toolbar button.
>>>>
>>>>There are no dangling references to the page of any of the page’s controls. From the debugger’s watch window I can see the pages have been destroyed. When I manually set the PageCount property from the watch window I get a Fatal error: Exception code = C0000005.
>>>>
>>>>The method has worked fine for 6 months when called from the toolbar button. I just added the menu pad call and ran into this problem.
>>>>
>>>>Any thoughts?
>>>>
>>>>Running VFP 6.0 SP4 on Windows 2000 and Windows NT.
>>>>
>>>>Thanks,
>>>>Billy D.
>>>
>>>Have the menu option run the click() event on the toolbar button.
>
>William,
>
>Did you find a solution? The only thing I can tell you is that if you try to reset the pagecount property after the page has been destroyed you will probably get an exception error. By the way, how are removing the page? Are you resetting the page count or using the the removeobject method on the pageframe?
Heavy Metal Pedal - click with care
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform