<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Code not working on PowerBuilder</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Code not working on PowerBuilder]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 18:22:19 +0000</pubDate>
  <lastBuildDate>Tue, 13 Jul 2021 06:11:58 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=24174</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Code not working on PowerBuilder : Hello,Reading through the forum...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24174&amp;PID=78140&amp;title=code-not-working-on-powerbuilder#78140</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=9490">ADBJ</a><br /><strong>Subject:</strong> 24174<br /><strong>Posted:</strong> 13 July 2021 at 6:11am<br /><br /><div>Hello,</div><div>Reading through the forum I stumbled upon a VB code that allows me to create multiple schedules in a calendar.</div><div><br></div><div>I have rewritten this code in both PowerBuilder and C# but the issue is:</div><div><br></div><div>In C# it works flawlessly while in PowerBuilder (2019 R3) it creates the schedules and all, but it doesn't let me Add any events, as if the calendar is disabled (which it isn't)</div><div><br></div><div>I will post down my code, I really can't wrap my head around this issue I hope you guys can help me.</div><div>Thank you in advance<br></div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>// Impostazioni Visive<br>Calendar.Object.VisualTheme = 5<br>Calendar.Width&nbsp; = this.Width&nbsp; * 0.9<br>Calendar.Height = this.Height * 0.9<br><br>// Mostro settimana<br>Calendar.Object.DayView.ShowDays(Today(), RelativeDate(Today(), 14))<br>Calendar.Object.Options.DayViewTimeScaleShowMinutes(true)<br><br>// Dimensioni colonne<br>Calendar.Object.DayView.MinColumnWidth = 25<br><br>// Imposto giorni e ore della settimana<br>String min, max<br><br>min = '08:00'<br>max = '18:00'<br><br>calendar.object.options.WorkWeekMask = 62 // Lun-Ven<br><br>calendar.object.options.WorkDayStartTime = min<br>calendar.object.options.WorkDayEndTime = max<br><br>calendar.object.DayView.TimeScaleMinTime = min<br>calendar.object.DayView.TimeScaleMaxTime = max<br>calendar.object.DayView.TimeScale(15)<br><br>// ******************<br>// CATEGORIE MULTIPLE<br>// ******************<br>OLEObject DataProvider<br>OLEObject Schedules<br>OLEObject Schedule<br>OLEObject Resources<br>OLEObject Resource<br><br>Calendar.Object.ReadOnlyMode = false<br>Calendar.Object.MultipleSchedulesMode = true<br><br>// apro il data provider<br>DataProvider = Calendar.Object.DataProvider<br>IF NOT DataProvider.Open() THEN &amp;<br>&nbsp;&nbsp; &nbsp;DataProvider.Create()<br><br>Resources = CREATE OLEObject<br>Resource = CREATE OLEObject<br><br>Schedules = DataProvider.Schedules<br>Resources.ConnectToNewObject("Codejock.CalendarResources.18.6.0")<br><br>// Inserisco risorse<br>Integer i<br>Long scheduleId<br>FOR i = 1 TO 3<br>&nbsp;&nbsp; &nbsp;Schedules.AddNewSchedule("G" + String(i))<br>&nbsp;&nbsp; &nbsp;Resource.ConnectToNewObject("Codejock.CalendarResource.18.6.0")<br>&nbsp;&nbsp; &nbsp;Resource.SetDataProvider(DataProvider, false) // falso mi assicura che quando faccio destroy non mi chiude il DP<br>&nbsp;&nbsp; &nbsp;Resource.Name = "G" + String(i)<br>&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; &nbsp;// da schedule a risorse<br>&nbsp;&nbsp; &nbsp;scheduleId = Schedules.Item(i - 1).Id<br>&nbsp;&nbsp; &nbsp;Resource.ScheduleIDs.Add(scheduleId)<br>&nbsp;&nbsp; &nbsp;Resources.Add(Resource)<br>NEXT<br><br>Calendar.Object.SetMultipleResources(Resources)<br>Calendar.Object.Populate()<br>Calendar.Object.RedrawControl()<br><br>DESTROY DataProvider<br>DESTROY Schedules<br>DESTROY Schedule<br>DESTROY Resources<br>DESTROY Resource</div><div></pre></td></tr></table><br></div>]]>
   </description>
   <pubDate>Tue, 13 Jul 2021 06:11:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24174&amp;PID=78140&amp;title=code-not-working-on-powerbuilder#78140</guid>
  </item> 
 </channel>
</rss>