Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - ApplyToCalendar /  SetMultipleResources(Ex)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

ApplyToCalendar / SetMultipleResources(Ex)

 Post Reply Post Reply
Author
Message
Auge_Ohr View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auge_Ohr Quote  Post ReplyReply Direct Link To This Post Topic: ApplyToCalendar / SetMultipleResources(Ex)
    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
Back to Top
Auge_Ohr View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auge_Ohr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Auge_Ohr View Drop Down
Groupie
Groupie


Joined: 20 December 2008
Status: Offline
Points: 65
Post Options Post Options   Thanks (0) Thanks(0)   Quote Auge_Ohr Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.