Alaska Software Inc. - How to access property (VB6 sample)
Username: Password:
AuthorTopic: How to access property (VB6 sample)
Jack DuijfHow to access property (VB6 sample)
on Mon, 28 Jan 2019 17:51:25 +0100
Hello,

I have a VB6 sample i want to convert to xBase++
The helpmanual says:

Description	: Returns/sets the Code of the Contact associated with this appointment.
Property type	: Read-write property
Syntax
Visual Basic 	: Public Property Appointment_ContactCode( _  ByVal nIndex As Integer _) As Integer

Parameters	: nIndex  The 1-based index value of the appointment. 
Return Type	: Integer value that relates to a Contact_Code value of a Contact in the control.

I can READ the value as oCalendar:Appointment_ContactCode(nIndex) 

De VB6code looks like:
ctxCalendar1.Appointment_ContactCode(nIndex) = 2

But how kan i SET the value 2 in Xbase++ ?

I tryed: 
oCalendar:Appointment_ContactCode(nIndex,2)    Results in runtime error: Invallid number of parameters
oCalendar:Appointment_ContactCode(nIndex) := 2   Results in complile error: XBT0231: Invalid lvalue

oCalendar:Appointment_ContactCode[nIndex] := 2   Results in complile error: Parameter not optional.



Regards
Jack Duijf

-------------------------------------------------------------
Also a member off the XXP (http://www.xxp.nl)
Jack DuijfRe: How to access property (VB6 sample)
on Mon, 28 Jan 2019 18:57:55 +0100
Hello,

I found it !

oCalendar:setProperty("Appointment_ContactCode",nIndex,2)

Regards
Jack Duijf

-------------------------------------------------------------
Also a member off the XXP (http://www.xxp.nl)