bb.donnay-software.com

Donnay Software Web Forums
It is currently Fri Aug 23, 2019 8:29 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Tue Jun 12, 2012 10:03 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 3958
Location: Boise, Idaho USA
I received this private email. Does anyone have experience with the :applyToCalendar method of the CodeJock Calendar system?

Quote:
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

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group