Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error? with cnavbuttons.refresh
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00093690
Message ID:
00093864
Views:
28
Tom,

>I have 2 forms based on CBizObjMaintenanceForm. When I made the change from cdmm2.07 to cbmm3.01 I began getting an error #1924 in cnavbuttons.refresh() when entering form A.
>
>ACTIVEFORM is not an object
>
>SET DATASESSION TO _SCREEN.ActiveForm.DataSessionID
>
>I solved this by changing it to
>
>IF NOT TYPE('_SCREEN.ActiveForm.DataSessionID') = 'U'
> SET DATASESSION TO _SCREEN.ActiveForm.DataSessionID
>ENDIF
>
>Now I will say that I did not do this with screen B. Screen A begins by calling aCBbaseModalForm in its INIT method so that I can retrieve view parameters. Things seem fine, but I thought I would ask.

Calling a modal form from another form's Init() is somewhat unusual...normally, by definition, CNavToolbar does not exist unless there is an ActiveForm. It seems that your technique is throwing a bit of a curve at just the right (or wrong <s>) time for CNavToolbar.

However, if there is no ActiveForm and the correct Data Session is not being set, there isn't much value in executing cnavbuttons.refresh().

At any rate, this bears further investigation. I'll check into this further and let you know what I discover.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform