Recent

Author Topic: Visual PlanIt Overlay mode  (Read 18070 times)

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: Visual PlanIt Overlay mode
« Reply #15 on: December 15, 2021, 10:17:03 am »
You mean the demo attached to reply #10? There, the database provided is empty, there are no events.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

chrv

  • New Member
  • *
  • Posts: 32
Re: Visual PlanIt Overlay mode
« Reply #16 on: December 15, 2021, 12:19:49 pm »
Excuse me.
Here is de good attachment

You can see that Event2 hide Event1 when dragged over Event1.
It is not the case when Event2 is draged over Event3.

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: Visual PlanIt Overlay mode
« Reply #17 on: December 15, 2021, 01:06:53 pm »
I don't understand. The screenshot TvPlanIt-same-events-1 shows your application at first start: Event2 and Event1 share the same time slot, both are visible, nothing's hidden --> as expected. Then I dragged Event2 over Event3 --> screenshot-2, as expected. Then I dragged Event2 back over Event1 again --> screenshot-3, as expected (well, the order is different -- is this relevant?). And finally I dragged also Event3 over the others --> screenshot-4, again as expected.

Are you sure that you installed the most recent version of TvPlanIt from CCR?
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

chrv

  • New Member
  • *
  • Posts: 32
Re: Visual PlanIt Overlay mode
« Reply #18 on: December 15, 2021, 03:06:42 pm »
Here are my results for the 4 same situations. Quite different ? What am i doing wrong ?

I downloaded PlanIt on my PC from : Tree [r8180]  / components / tvplanit /
Windows 10
Lazarus 2.0.12

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: Visual PlanIt Overlay mode
« Reply #19 on: December 15, 2021, 05:23:27 pm »
Checked TvPlanIt on Laz 2.0.12/FPC 3.2.0 (the previous tests were made with Laz/main and FPC 3.2.2) - no difference to my previous observations.

Running out of ideas...

Maybe this: Open file vpmisc.pas in the source folder of the TvPlanIt installation. Search for "SameTimeOrLater" and "SameTimeOrEarler". Do these functions exist? If they don't your installation is not up-to-date, contrary to your statement.

Or this: Did you recompile the tvplanit package after installation? if not the new code will not be be used. For simplicity, and to handle some other similar issues, do a clean rebuild of the entire IDE: "Tools" > "Configure Build Lazarus" > Check "Clean all" and "Switch after building to automatically" > Click "Build" - this will take some time, but everything related to an incomplete or outdated installation will be covered this way.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

chrv

  • New Member
  • *
  • Posts: 32
Re: Visual PlanIt Overlay mode
« Reply #20 on: December 16, 2021, 01:01:08 pm »
Solved ...
Overlay mode works as expected.

It was clearly a problem of version. Sorry for troubles and time lost ...

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: Visual PlanIt Overlay mode
« Reply #21 on: December 16, 2021, 01:53:37 pm »
No need to be sorry. It was interesting to revisit the code which I had ported several years ago.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

chrv

  • New Member
  • *
  • Posts: 32
Re: Visual PlanIt Overlay mode
« Reply #22 on: December 21, 2021, 10:26:59 pm »
Hello everyone,

After several improvements, I arrive to a new problem.

As you can see in the attachment, when I try to use a TVpResourceCombo to drive a TVpDayView, I cannot display the item on the combo (see Form1, secondary form).
I can see the items in the list by dropping down it (2.png).
No problem to youse a TVpResourceCombo on the same form as the TVpDayView (See on the right of main form).

A short demo is attached.

Has anyone a solution ?

wp

  • Hero Member
  • *****
  • Posts: 9578
Re: Visual PlanIt Overlay mode
« Reply #23 on: December 21, 2021, 11:32:47 pm »
The second form is created after the main form. When you have the resource combobox on a second form, but all the other PlanIt stuff on the main form, the combo does not get notified that the datastore is set up because it does not yet exist.

Clear the Datastore property of the combobox on the second form. Then add the following code to the OnCreate handler of  this form:
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   VpResourceCombo1.DataStore := MainForm.VpControlLink.DataStore;;
  4.   MainForm.ResourceChangeHandler(nil,MainForm.VpControlLink.Datastore.Resource);
  5. end;
When now the DataStore of the combo is set the combo reads all the required information and sets the selected item index.

Having to call a method of the main form here, kind of hurts me... I think I should spend some time to fully integrate the checkedlist box into the TVPlaint infrastructure...
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

chrv

  • New Member
  • *
  • Posts: 32
Re: Visual PlanIt Overlay mode
« Reply #24 on: December 22, 2021, 07:41:23 am »
It works fine.

Thank you very much

 

TinyPortal © 2005-2018