I have a collection in my model and I want to store a reference to the currently selected item. When I load a List from my collection I have.
Add_Entry To_List(#List)
#List.CurrentItem.RelatedReference <= #list
And in the Item click event I want to store the selected item
#model.CurrentVisotRef <= #CurrentItem.Related Reference
My problem is in defining the property. I have
Define_Com Class(#M01VisitEntry) Name(#m_SelectedVisit)
but
Define_Pty Name(SelectedVisitRef) Get(*AUTO #m_SelectedVisit)Set(#m_SelectedVisit)
tells me #m_SelectedVisit is not a valid name. Class M01VISEN does not contain a default property
Trying to create a property Set does the same thing.
ANy ideass about what I'm doing wrong?
Storing Reference in model. VLWEB
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Storing Reference in model. VLWEB
Hi,
Aren't you just missing *AUTO in the Set?
Cheers,
Danny
Aren't you just missing *AUTO in the Set?
Cheers,
Danny
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Storing Reference in model. VLWEB
Ah. Just looked again. Your reference is not *dynamic either....
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Storing Reference in model. VLWEB
Correction (that will teach me quickly answering from my phone on the train trying to look clever
)
Try this:
Try this:
Code: Select all
Define_Com Class(#PRIM_OBJT) Name(#MyObject) Reference(*DYNAMIC)
Define_Pty Name(Object) Get(*REFERENCE #MyObject) Set(*REFERENCE #MyObject)Re: Storing Reference in model. VLWEB
Thanks Danny. That makes a difference!