Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - problems with multiple resources
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

problems with multiple resources

 Post Reply Post Reply
Author
Message
mario.painsi View Drop Down
Newbie
Newbie


Joined: 20 November 2006
Location: Austria
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote mario.painsi Quote  Post ReplyReply Direct Link To This Post Topic: problems with multiple resources
    Posted: 20 November 2006 at 4:48am
hello, we have a problem.
 
we are working with gupta.
we want to make a calender but we have problems with the multiple resources.
 
the code for one resource is working:
 
Call CalendarControl.PropGetDataProvider( CalenderDataProvider )
Call CalendarControl.PropGetMultipleResources( ICalendarResources )
Call ICalendarResources.PropGetItem( 0, ICalendarResource )
Call ICalendarResource.PropGetScheduleIDs( CalendarScheduleIDs )
Call CalendarScheduleIDs.Add( 1 )
Call ICalendarResource.PropSetName( 'A')
Call ICalendarResources.Add( ICalendarResource )
Call CalendarControl.SetMultipleResources( ICalendarResources )
Call CalendarControl.RedrawControl(  )
Call CalendarControl.Populate(  )
 
 
but, when we want to add a second or more, we only see the last resource, for example:
 
Call CalendarControl.PropGetDataProvider( CalenderDataProvider )
Call CalendarControl.PropGetMultipleResources( ICalendarResources )
 
Call ICalendarResources.PropGetItem( 0, ICalendarResource )
Call ICalendarResource.PropGetScheduleIDs( CalendarScheduleIDs )
Call CalendarScheduleIDs.Add( 1 )
Call ICalendarResource.PropSetName( 'A')
Call ICalendarResources.Add( ICalendarResource )
Call ICalendarResources.PropGetItem( 1, ICalendarResource )
Call ICalendarResource.PropGetScheduleIDs( CalendarScheduleIDs )
Call CalendarScheduleIDs.Add( 2)
Call ICalendarResource.PropSetName( 'B')
Call ICalendarResources.Add( ICalendarResource )
Call CalendarControl.SetMultipleResources( ICalendarResources )
Call CalendarControl.RedrawControl(  )
Call CalendarControl.Populate(  )
 
we only see 'B'.
 
can you help us.
thanks

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2006 at 1:37pm
Hi,

Those objects are passed by reference.
You have to create a separate object for each resource...



Call CalendarControl.PropGetDataProvider( CalenderDataProvider )
Call CalendarControl.PropGetMultipleResources( ICalendarResources )
Call ICalendarResources.PropGetItem( 0, ICalendarResource )
Call ICalendarResource.PropGetScheduleIDs( CalendarScheduleIDs )
Call CalendarScheduleIDs.Add( 1 )
Call ICalendarResource.PropSetName( 'A')
Call ICalendarResources.Add( ICalendarResource )
' creaate new resource object here
' also you can yse CreateObject like:
' set ICalendarResource = CreateObject("Codejock.CalendarResource.10.3.1")
set ICalendarResource = new CalendarResource
Call ICalendarResources.PropGetItem( 1, ICalendarResource )
Call ICalendarResource.PropGetScheduleIDs( CalendarScheduleIDs )
Call CalendarScheduleIDs.Add( 2)
Call ICalendarResource.PropSetName( 'B')
Call ICalendarResources.Add( ICalendarResource )
Call CalendarControl.SetMultipleResources( ICalendarResources )
Call CalendarControl.RedrawControl( )
Call CalendarControl.Populate( )


--
WBR,
Serge
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.172 seconds.