Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

Bringing a form from another project does not apear in Designer 6 years 4 months ago #11322

  • Fernando
  • Fernando's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 66
  • Thank you received: 0
Hi,

I am new to CT, so please forgive me if this is a silly question.
I am about to switch for Delphi to CT, doing some test projects. In one of them, I wanted to include a form written in a CO sample project: I copied the .pas and .frm files to the project directory, added the .pas file in the project inspector, adjusted then uses statement, and set up a button which creates the form and shows it. Compiling the project works ok, but the added form does not show up in the designer when opening the .pas unit. Is that correct? How to proceed?
Best

Please Log in or Create an account to join the conversation.

Bringing a form from another project does not apear in Designer 6 years 4 months ago #11323

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4518
  • Thank you received: 1102
Sir
we need more info
please attach here (zip first) the form file
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Bringing a form from another project does not apear in Designer 6 years 4 months ago #11327

  • Fernando
  • Fernando's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 66
  • Thank you received: 0
Hi Sternas,

Sorry for the scarce information, I believed it was something wrong from my part. Here is it in detail:

Typhon64 v6.3 on windows 10 x64, last update.

1. I opened the sample project fpsgrid (from pl_FPSpreadsheet) and saved it to a new directory ct-test2. Renamed Form1 to Main Form. Saved and exit.
2. From the sample proyect tools in lz_taChart copied toolsdemomw.pas and toolsdemomw.frm to ct-test2.
3. Restarted typhon, opened the project, and in the project inspector added toolsdemomw.pas. Double clicking on it opens the source file in the editor, but not the form in designer (please see screencapture in the attached .zip).
4. Adding in MainForm a button ("ShowPlot") with statements to create and show Form1 (in toolsdemomw unit) works properly: running the project it opens the toos demo form.

I am attaching a .zip file containing the project files along with the screen capture. Note that the IDE is in Spanish, hope it is not a problem for you. Please let me know if I you need some additional info.

Additionally, in the course of doing the above, I noticed some oddities which seem IDE bugs:
A. When doing "Save project As ..." the units are not automatically saved, one has to save the save the unit(s) manually; in doing that, one is asked about forgetting the original directory and deleting the original file (this looks as dangerous).
B. Attempting to rename the form in fpsgridmw results in an "error file not found *.ctrs", pointing to an initialization section containing the {$I *.ctrs} directive. However, if one compiles the sample as is no error results, and there is no *.ctrs file. Removing that section cured the problem and apparently did not have another effect.
C. After moving the project, the project inspector seemed to remember the old placement of the unit files, and I had to do a move. Perhaps that should have been done in A, but it is not clear for me.
D. When a project is closed, the Project assistant pops up. One of the options is View example projects, however if one clicks it, albeit another windows pops up, eventually showing the list, the assistant window remains on top, precluding any operation on the other window. Closing the assistant closes the IDE, so that option is not working.

Thank you for your attention

File Attachment:

File Name: ct-test2.zip
File Size:256 KB
Attachments:

Please Log in or Create an account to join the conversation.

Bringing a form from another project does not apear in Designer 6 years 4 months ago #11328

  • Fernando
  • Fernando's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 66
  • Thank you received: 0
Update:
In the .ctpr file, in the section <Unit2> corresponding to the added unit, the lines containing "ComponentName" and "ResourceBaseClass" are missing, adding them and restarting the IDE seems to cure the missing designer problem.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1