ApplyToCalendar / SetMultipleResources(Ex)
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=13289
Printed Date: 10 May 2025 at 5:04am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: ApplyToCalendar / SetMultipleResources(Ex)
Posted By: Auge_Ohr
Subject: ApplyToCalendar / SetMultipleResources(Ex)
Date Posted: 30 January 2009 at 1:16am
hi,
i try to use multi Resources but i fail at ApplyToCalendar / SetMultipleResources(Ex)
g_DataResourcesMan := CreateObject( "Codejock.CalendarResourcesManager.12.1.1")
arResources := CreateObject( "Codejock.CalendarResources.12.1.1" )
pRes0 := CreateObject( "Codejock.CalendarResource.12.1.1" )
pRes1 := CreateObject( "Codejock.CalendarResource.12.1.1" )
...
g_DataResourcesMan:ApplyToCalendar(CalendarControl) -> crash
arResources := CreateObject( "Codejock.CalendarResources.12.1.1" )
...
CalendarControl:SetMultipleResources(arResources) -> crash
all Code between seems to work fine ... until i reach that Point
Question :
for arResources i got Type "AutomationObject", is it a Array or "Object" ?
for CalendarControl i got "ActiveXControl", must i use the "Pointer" to the ActiveX ?
OS() XP
Xbase++ v1.9.350 Code
------------- greetings by OHR
Jimmy
|
Replies:
Posted By: Auge_Ohr
Date Posted: 30 January 2009 at 5:40pm
hi,
perhaps my Question is not clear so here a (Xbase++) Sample
oTest := CalendarControl:MultipleResources() // "ICalendarResources"
nCount := oTest:Count()
IF nCount > 0
CalendarControl:SetMultipleResources( oTest ) // WORKS
ENDIF
// "ICalendarResources"
arResources := CreateObject( "Codejock.CalendarResources.12.1.1" )
...
arResources:Add( pRes0 ) // pRes0 is a "ICalendarResource"
arResources:Add( pRes1 ) // pRes1 is a "ICalendarResource"
nCount := arResources:Count()
IF nCount > 0
CalendarControl:SetMultipleResources( arResources ) // -> CRASH
ENDIF
pRes0 and pRes1 are "filled" in ...
Question : Why does "oTest" work but "arResources" crash with a "Typekonflikt" or "wrong Parameter" ?
-> VALTYPE: C VALUE: SetMultipleResources
-> VALTYPE: O CLASS: AutomationObject
------------- greetings by OHR
Jimmy
|
Posted By: Auge_Ohr
Date Posted: 08 February 2009 at 9:40pm
hi,
ok i got it: i use "wrong" Compiler :(
i was able to "translate" my Xbase++ into "other" X-Base Compiler and same Code run !
i was afraid of Xbase++ activeX Support and now i found that BUG !
Question to Codejock Support : Does Calender use IDispatch Interface or some "other" ?
with both X Compiler we did have Probem with Event send by Calender.
we must CreateObject() "all" in Main, use a Thread as Container for CJ Calender OCX
and pass CreateObject() to Thread
than MapEvent() / subscribeEvent() will recive it in Main Eventloop so we can react on it... but sometimes ... if someone have a Idee how to debug "where" a CalenderEvent are going to ?
------------- greetings by OHR
Jimmy
|
|