Is there s simple way the browse screen will either load empty or full with data (according to some parameter)?
If load empty then filtered locator will be used to show subset of data.
ABC, standard browse, sql database
Is there s simple way the browse screen will either load empty or full with data (according to some parameter)?
If load empty then filtered locator will be used to show subset of data.
ABC, standard browse, sql database
I haven’t tried this…
But How about something like this.
DerivedBrowseClass CLASS(BrowseClass)!.....
ForceEmpty BOOL
DerivedBrowseClass.ResetQueue PROCEDURE(BYTE RefreshMode),DERIVED
END
DerivedBrowseClass.ResetQueue PROCEDURE(BYTE RefreshMode)
CODE
IF SELF.ForceEmpty
SELF.LoadPending = 1
RETURN
END
PARENT.ResetQueue( RefreshMode )
For empty, set filter to 1=0 based on parameter. Otherwise, load full with data.
thanks, good idea…
Mark, but it can be applied to standard Clarion ABC Browse?
Clarion_Clarion, I was talking about a standard Clarion ABC Browse
The way that embeds work, is you derive the base class
If it’s hard to add a property to the derived class (note: I don’t use APPs - hand code only)
Then just create a procedure level variable, and use side-effect
Mark,
I found that I can use code below directly in standard browse
in ResetQueue before Parent Call:
IF MyCondition
RETURN
END
But the problem is when I have Locators fields. It became disabled.
I need to have it (Locator) enabled so I can type something and my Browse will be loading. After that, I need to turn MyCondition OFF so browse will continue loading data. Not sure how to do this.
In your Browse UpdateWindow method after the parent call:
IF <your condition> and RECORDS(SELF.Q) = 0
IF ~SELF.Sort.Locator &= NULL
SELF.Sort.Locator.SetEnabled(true)
END
END
Thank you, Rick, will give it a try
Trying this approach, but derived CLASS gives me an error
Invalid use of PRIVATE data
for this code
SELF.LoadPending = 1
since LoadPending declared as
LoadPending BYTE,PRIVATE
not sure how I can use it from my derived class? please advise
You could change to
LoadPending Byte,PROTECTED
This won’t break any functionality in the shipping classes.
Obviously when there’s a clarion update you would get a compile error, but as you are just changing the protection level, it would be an easy one to fix again.
Why the obsession with PRIVATE in the ABC classes can be quite frustrating.
Mark
Thanks, Mark… … .. .