FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Coding issue / Harbour 3/ MSVC
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Coding issue / Harbour 3/ MSVC
Posted: Sat Dec 17, 2011 07:25 PM
I am having a problem with a small piece of code using Codejock Calendar. Perhaps someone can tell me what is wrong. The configuration with xHarbour(.com)/xCC works fine, but the Harbour 3.0/MSVC 2010 does not.

Here is the manual instruction from Codejock:

Remarks
Any number and any type of objects can be attached to an event using the Property collection.
When adding a custom property, a string name must be given to the custom property. This string name will also be used to retreive the custom property from the collection.
Example
[CustomProperties Sample (Visual Basic)] This sample illustrates how to get and set custom properties for an event.
Dim NewEvent As CalendarEvent
Set NewEvent = CalendarControl.DataProvider.CreateEvent

'Add some custom properties
NewEvent.CustomProperties.Property("String Value") = "Hello"
NewEvent.CustomProperties.Property("Numeric") = 500
NewEvent.CustomProperties.Property("Boolen Value") = False

'Retrieve the custom property
Dim nInt As Integer
nInt = NewEvent.CustomProperties.Property "Numeric"

So I’m assigning a custom ID to each record that is processed.

In xHarbour it was written as:

:CustomProperties:Property( "id", ::aptuid )

And in Harbour ( that doesn’t work ), I have written it as:

:CustomProperties:Property( "id" ) = ::aptuid

When trying to compile with Harbour/MSVC, it generates an error E0022 invalid lvalue

Any idea why ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion