Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form A setting properties of Form B
Message
From
30/04/2002 07:17:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/04/2002 20:06:43
Rick Graves
Advanced Approach Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00650688
Message ID:
00650784
Views:
19
>Hello world,
>
>The manual says you can do it but it is not working for me -- what am I doing wrong?
>
>The manual says you can do it, see Using VFP, Programming in VFP, Object-Oriented Programming Concepts, Setting Properties.
>
>In form A, I want to set a property in form B. But if I do it, VFP says Form B is not an object.
>
>Actually, both Form A and Form B are formsets, so the property I want to set is a property of the formset. The manual says you can do that also.
>
>The code not working is this:
>
> IF TYPE( "frsItems" ) = "O" && Items is in use
> frsItems.lModelsUpDate = .T. && tell Items that the Models table is updated
> ENDIF
>
>
>The TYPE( "frsItems" ) = "O" test is never true, if I go around it I get the error frsItems is not an object.
>
>Any suggestions?
>
>Also, how do I look at the other forms and formsets open in the debugger? I do not know how.
>
>Thanks,
>
>Rick Graves

Rick,
Manuals are right :)
It's a scoping problem. If you have access to frsItems variable then you can do it.

do form FormB name frsItems
frsItems.lModelsUpDate = .T.
frsItems.Refresh()

etc


Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform