Page 1 of 1

VLWEB Property Question

Posted: Fri Mar 16, 2018 11:06 am
by soa
I have a RP with the following property defined

Define_Pty Name(eFormSaveRequired) Get(*AUTO #m_datachanged) Set(*AUTO #m_datachanged)

Define Field(#m_datachanged) Type(*BOOLEAN)

In another RP which inherits from this one I'm trying to test this value with

If Cond(#COM_OWNER.eFormSaveRequired)
#COM_OWNER.SaveeFormValue
Endif

but I'm getting 'The definition of property eFormSaveRequired in class EFORMVTX is invalid or not complete.

I can't see what wrong with it. I can access other properties & methods without issue.

Any ideas?

Re: VLWEB Property Question

Posted: Fri Mar 16, 2018 12:25 pm
by dannyoorburg
Hi,

VL doesn't like you defining a property using a locally defined field.

I agree it probably should or at least the message could be better...

For now, you better use a repository defined field or a just a define com of a PRIM_BOLN.

Cheers,
Danny

Re: VLWEB Property Question

Posted: Fri Mar 16, 2018 12:29 pm
by soa
Thanks Danny. I've come across this before but its been a while!

Re: VLWEB Property Question

Posted: Fri Mar 16, 2018 12:30 pm
by GregSippel
Soa,

When it comes to inheritance and its generally best practice anyway, for properties and method use #COM_SELF instead of #COM_OWNER in the top level object.

So in your RP try

Code: Select all

If Cond(#COM_SELF.eFormSaveRequired)
#COM_SELF.SaveeFormValue
Endif
In regards to your issue, do the properties that can be seen do they store the value in a component (DEFINE_COM) or a Field (DEFINE)

Cheers
Greg