Hello,
I have seen your contribution to the xBase++ forum about CodeJock. We want to start using CodeJock within our application. Now we run in the situation that calling the method applyToCalender() has no effect. I think that de problem have something to do with the pointer that has to be passed as parameter. See below out code snap. Have you a suggestion how to solve this?
* >>>>>>> .
******************************************************************************
STATIC FUNCTION bowaPlanBord(_oParent, _nRow, _nCol, _nColWd, _nRowHt)
******************************************************************************
LOCAL oResult := NIL //
LOCAL aRect := {} //
LOCAL nPxX := 0 //
LOCAL nPxY := 0 //
LOCAL nPxWd := 0 //
LOCAL nPxHt := 0 //
LOCAL oResManager := NIL //
LOCAL oCalDatProv := NIL //
LOCAL oSchedules := NIL //
LOCAL oHlp := NIL //
LOCAL cCfgFile := 'c:\temp\calc,xml'
LOCAL oDataPicker := NIL //
aRect = _oParent:currentSize()
nPxX = (_nCol * M->COL_PX)
nPxY = aRect[2] - ((_nRow + 10) * M->ROW_PX)
oDataPicker = xbpActiveXControl():new( _oParent)
oDataPicker:useGuiThread = .F. // -[MGHW]- Alaska Workaround ???
oDataPicker:CLSID = 'Codejock.DatePicker.15.3.1'
oDataPicker:create( , , {nPxX, nPxY}, {200, 200})
_nRow += 12
_nRowHt -= 12
nPxX = ((_nCol - 1) * M->COL_PX)
nPxY = aRect[2] - ((_nRow - 1 + _nRowHt) * M->ROW_PX)
nPxWd = _nColWd * M->COL_PX
nPxHt = _nRowHt * M->ROW_PX
oResult = xbpActiveXControl():new( _oParent)
oResult:useGuiThread = .F. // -[MGHW]- Alaska Workaround ???
oResult:CLSID = 'Codejock.CalendarControl.15.3.1'
oResult:create( , , {nPxX, nPxY}, {nPxWd, nPxHt})
oResManager = createObject('Codejock.CalendarResourcesManager.15.3.1')
if (oResManager == NIL)
msgBox('1. Nee')
else
if .not. oResManager:addDataProvider('Provider=XML;Data Source=c:\temp\calc.xml', cToN(DC_Dec2Hex(1)))
msgBox('addDataProvider: Nee')
endif
oCalDatProv = oResManager:dataProvider(0)
oSchedules = oCalDatProv:schedules
oSchedules:addNewSchedule('Dr. Tom')
oSchedules:addNewSchedule('Dr. Bob')
oCalDatProv:save()
oResManager:addResource('Dr. Tom', .T.)
oResManager:addResource('Dr. Bob', .T.)
oHlp = oResManager:resource(0)
oHlp:resource:setDataProvider(oCalDatProv, .F.)
oHlp:resource:scheduleIds:add(oSchedules:item(0):id)
oHlp:generateName = .T.
oHlp = oResManager:resource(1)
oHlp:resource:setDataProvider(oCalDatProv, .F.)
oHlp:resource:scheduleIds:add(oSchedules:item(0):id)
oHlp:generateName = .T.
oResManager:saveCfg(cCfgFile)
oResManager:applyToCalendar(oResult:getHWND())
oResult:populate()
oResult:redrawControl()
endif
oDataPicker:attachToCalendar(oResult)
RETURN(oResult)
Best regards,
Martijn G.H. Wagelaar
BOWA Automatisering B.V.
Postbus 212, 7480 AE Haaksbergen
Kruislandstraat 44a, 7481 KX Haaksbergen
T: +31 (0)53 573 06 10
F: +31 (0)53 573 06 19
E: MartijnWa@bowa.nl
Bezoek ook eens een van onze websites:
www.bowa.nl , www.vitris.nl , www.flexisoft.nl
www.glasplaza.nl , www.glaswijzer.nl
Calendar question from a non XCodeJock user
Calendar question from a non XCodeJock user
I received this private email. Does anyone have experience with the :applyToCalendar method of the CodeJock Calendar system?
The eXpress train is coming - and it has more cars.