Recent

Author Topic: [SOLVED] Verbosity...  (Read 4024 times)

Handoko

  • Hero Member
  • *****
  • Posts: 2683
  • My goal: build my own game engine using Lazarus
Re: [SOLVED] Verbosity...
« Reply #30 on: July 03, 2018, 07:00:17 pm »
I remember you asked about combining console mode with ShowMessage. Not sure on Windows, but this code below seems to work on my Linux computer:

Code: Pascal  [Select]
  1. program project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   Interfaces, Dialogs;
  7.  
  8. begin
  9.   if ParamStr(1) = 'hello' then
  10.     ShowMessage('Hello, there!')
  11.   else
  12.     WriteLn('Unknown parameter.');
  13. end.

Note:
You have to add LCL as the project's required package.

The code is inspired from Thaddy, read here if you want to know more:
http://forum.lazarus.freepascal.org/index.php/topic,37425.msg251457.html#msg251457
« Last Edit: July 03, 2018, 07:06:03 pm by Handoko »

GypsyPrince

  • New member
  • *
  • Posts: 35
Re: [SOLVED] Verbosity...
« Reply #31 on: July 03, 2018, 09:13:22 pm »
Handoko ~

Thank you for your effort.

After reading a bit further in the documentation I found that graphic dialogs can be shown from console apps for Mac, Unix, and Linux, but not for Windows. However, the reverse can occur. One can open a console window from within a GUI app in Windows.

Also, and I actually like this better, while reading through my book 'Lazarus: The Complete Guide', I found that Lazarus can work with text-based GUI libraries such as "ncurses" for Unix and Linux, and for Windows - a library called Free Vision - derived from Turbo Vision that was the GUI library for Borland's Turbo C++ and Turbo Pascal. I'm doing my happy dance after finding out that bit of info.

Ah... Turbo C++. Fond memories. I miss DOS. LOL
May the mass * acceleration be with you!

GypsyPrince

  • New member
  • *
  • Posts: 35
Re: [SOLVED] Verbosity...
« Reply #32 on: July 03, 2018, 09:22:58 pm »
Well, now. I performed a search and found that marcov has dabbled a bit with Free Vision.

marcov - were you ever able to get Free Vision to work with Lazarus in any meaningful way? Did anyone come up with a viable editor for it?

I am very nostalgic for old DOS programs and want to dabble a bit with FV in console apps.
May the mass * acceleration be with you!

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6614
Re: [SOLVED] Verbosity...
« Reply #33 on: July 03, 2018, 10:00:22 pm »
Well, now. I performed a search and found that marcov has dabbled a bit with Free Vision.

Yes. Textmode IDE maintenance mostly.

Quote
marcov - were you ever able to get Free Vision to work with Lazarus in any meaningful way? Did anyone come up with a viable editor for it?

IF you mean a lazarus based designer, no, didn't even try, too little time.

Quote
I am very nostalgic for old DOS programs and want to dabble a bit with FV in console apps.

FV  old TP object model and ways of dealing with strings are a bit of a pain.

GypsyPrince

  • New member
  • *
  • Posts: 35
Re: [SOLVED] Verbosity...
« Reply #34 on: July 03, 2018, 10:43:42 pm »
Ah. Oh well. Twas a good pipe dream while it lasted. LOL
« Last Edit: July 05, 2018, 03:44:12 pm by GypsyPrince »
May the mass * acceleration be with you!