Creating a C++ Builder VCL Application.
When adding a TAdvStringGrid Component to a Form that contains a TRESTClient, TRESTRequest and a TRESTResponse Component gives a compile error:
[bcc32c error] AdvGDIP.hpp(1240): expected ')'
AdvGDIP.hpp(1240): to match this '('
What I did:
- Create new VCL Application - C++ Builder
- Add a TButton Component (Button1)
- Add a TRESTClient Component (RESTClient1)
- Change the property 'BaseUrl' to 'http://jsonplaceholder.typicode.com/posts/1/comments'
- Add a TRESTRequest Component (RESTRequest1)
- Add a TRESTResponse Component (RESTResponse1)
- Double click on the Button1 Object to create a Button1Click() event
- Add this source code:
RESTRequest1->Execute();
- If you want, you can add a TRichEdit Component to the Form and
Add this source code (to display the result of the request):
RichEdit1->Text = RESTResponse1->Content;
Don't forget to set the property 'ScrollBars' to 'ssBoth'
- Add this source code:
- Add a TAdvStringGrid Component to the Form (for later use to display the RESTResponse)
Without the TAdvStringGrid component the application compiles and runs. With the TAdvStringGrid component the error occurs.
It seems, that the same error occurs in earlier versions of both C++ Builder and VCL UI Pack, too.
Using:
- RAD Studio 12.1 (C++ Builder only, NO Delphi)
- TMS VCL UI Pack 13.1.0.0
- Windows 10 Pro, 64-bit, Version 22H2
What can I do?
Greetings from Germany
Andreas Richau