Try this
IF PEMSTATUS(this.Parent,"lFlag",5)
BINDEVENT(this.Parent,"lFlag",this,"dosomething")
ENDIF
This way dosomething() will run each time the lFlag (or your edit flag) changes.
>I'm working on developing some base classes but am running across a problem in which I could use some help.
>
>I've got a container class and a form class.
>
>I want the container class to hook itself into the form when it is dropped onto my base form class as follows:
>
>container.init
>
>
>IF PEMSTATUS(this.Parent,"lFlag",5)
> IF this.Parent.lFlag
> this.dosomething()
> BINDEVENT(this.Parent,"addeditstatus_assign",this,"dosomething")
> ENDIF
>ENDIF
>
>
>But when I execute this code the assign method is not visible. It sees my "addeditstatus" but not the "addeditstatus_assign". Is this by design or am I just missing something at this point?
>
>I would like the container to change color when I put the form into edit mode and back when out of edit mode. I've previously accomplished this through the Form.Refresh method. This works but I would like to accomplish this through a single property .T./.F. flag on the form as a base function of my container class and not have to add code to each one of my forms.
>
>I think I'm on the right track here but let me know if anyone has a "better" approach or if you've got some insight to working with the Assign methods.
>
>Thanks,
>-Sid Meyers.