Recent

Author Topic: Component usage problem in NoGUI projects!  (Read 507 times)

loaded

  • Hero Member
  • *****
  • Posts: 825
Component usage problem in NoGUI projects!
« on: April 11, 2023, 07:31:22 am »
Hi All,
I have an application that does not have a user graphical interface. I want to use jHttpClient component in this application. I add the relevant component to the project. I'm writing the codes for the use of the component and the Project compiles without any problems.

But;
At runtime, Component-related code is like a comment line.  is behaving. It doesn't have any effects, however, interestingly, no errors occur.

A smoothly working code and result image from an application with a user graphical interface is attached.
Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.Button1Click(Sender: TObject);
  2. var
  3.    content: string;
  4. begin
  5.    content:= jHttpClient1.Get('https://forum.lazarus.freepascal.org/index.php/board,43.0.html');
  6.    ShowMessage(content);
  7. end;

Is this a problem ? Or is there another setting that needs to be made after the Component is added?
I would be very pleased if you share your thoughts and experience on the subject. Respects.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

jmpessoa

  • Hero Member
  • *****
  • Posts: 2301
Re: Component usage problem in NoGUI projects!
« Reply #1 on: April 11, 2023, 08:26:47 am »
Hi, Loaded!

The "Android Bridges"  components are only compatibles with "GUI" model....


"NoGUI" model was designed for "pure  pascal (FCL)" and/or "not LCL"  Lazarus components......


So, you can try pure pascal/FCL HttpCliente  (or Indy....)
« Last Edit: April 11, 2023, 08:29:57 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

loaded

  • Hero Member
  • *****
  • Posts: 825
Re: Component usage problem in NoGUI projects!
« Reply #2 on: April 11, 2023, 08:36:01 am »
Thanks a lot for the reply my master jmpessoa.

The "Android Bridges"  components are only compatibles with "GUI" model....
Good to know that. I got rid of wasted rowing.

So, you can try pure pascal/FCL HttpCliente  (or Indy....)
Yes, I will try that. Regards.


Check out  loaded on Strava
https://www.strava.com/athletes/109391137

 

TinyPortal © 2005-2018