Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AddViewParameter enhancement?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00400165
Message ID:
00400179
Views:
19
Hi Alex,

Currently, the view parameters do get updated with the current value of the property (or whatever you specify) when you run the BizObj's Requery() method. The Requery() method has code in it to assign the value of the second parameter passed to the AddViewParameter method to the first parameter of the AddViewParameter method.

For example:
AddViewParameter("vp_MyParam", "ThisForm.MyParam")

When the Requery() of the biz obj is called, vp_MyParam gets assigned the value of ThisForm.MyParam.

What I like to do, is create a property on my BizObj to store the value for the view parameter, instead of using the form. This just makes it easier to use the biz obj when you move it away from the interface. Using my example, that would be:
AddViewParameter("vp_MyParam", "This.MyParam")

HTH

>Hi,
>
>I've been thinking and tinkering...
>
>I looked at the code in the AddViewParameter method of kbiz and noticed that it blindly adds parameters to the array.
>
>Wouldn't it be a good idea if it was a bit smarter and if you passed it the name of a parameter already in the list, it updated the existing element?
>
>Right now, what I'm doing whenever I have a parameter whose value might change is to assign it to a property of the form and then keep changing the property as I need, but I thought it would be easier to simply build some smarts into the bizobj and have AddViewParameter deal with changes as well as additions.
>
>What do you think?
>
>Alex

Doug Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform