Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all 1888 articles
Browse latest View live

How to make custom 3D Plot?

$
0
0

Hello everyone,

Suppose, you have an array of 3D Vectors which leads to the particular class defined by user. This 3D Vector class consist of three double variables x, y and z. The questions  is: what is the best way to represent the array data graphically?  It means, to create custom graphics in 3D using ready set of data (3 points of type double consisting of a specific class.)

Thank you in advance,
         Johnny..


Problem with form height in IDE

$
0
0

Form 800x600 being resized to 800x580 when the form is opened in the IDE. What to do?

FMX Android apps do not draw some forms after Tokyo update

$
0
0

I have a number of FMX based programs that do not draw there forms correctly when built for the Android platform under Tokyo. The programs work fine on Berlin update 1 and 2. The same programs complied for Win64 or Win32 under Tokyo seam to work fine.

I have only had time to test the android apps on a Samsung S5 (6.01), S6 (6.01) and a Samsung TabS (6.01).

Each of the programs has 8 to 10 forms. When a form is shown it does not always display but the controls on the form are active.

The programs use a local SQLite database using FireDac and live bindings to display data. All of the forms which use live bindings from the FireDac database to one or more ListViews in a MultiView  will not draw at all. While you can not see the form all of the forms controls are active.

I have one application form that uses live bindings but has no MultiView.  The form has a hidden panel (visible=false). When the panel is made visible the form does not update to show the panel but the controls on the panel are active.

In the IDE I can not show the contents of a MultiView when the "Master" form layout is selected. If I select the "Windows" or "Android" layouts the show command displays the MultiView.

 

Code Insight breaks after Task.Run and in long units (> ~ 1200 lines)

$
0
0

Hi, ...

I've experienced that long units (approx. over 1200 lines), Code Insight breaks down in this manner: Reference to items from other units no longer works when typing the dot (or pressing ctrl+space). Even after waiting seconds, no external names are suggested when typing.

A similar reference to same external unit in a small unit (ex. 150 lines) immediately results in the correct behaviour in the IDE.

After using the threading functions, the IDE starts to insert the text "end;" EVERY time enter is pressed in the source code in the unit. That is, after code like the example below, sometimes the editor starts this strange behaviour - like it's lost count of corresponding begin-end pairs. Code:

    TTask.Run(procedure

                    begin

                       ; // Code here

                     end);

 

Are there anything I can do to "help" the IDE or "clean" the unit's definition, so as to make the Code Insight / IDE work as expected?

I'm using Delphi 10.2 on Windows 10 Creators, the project is 32-bit for VCL.

 

Best regards,

Carsten

Rad Studio IDE bricked on splash screen in Windows Insider Build 16184, 16188

$
0
0

Windows Insider build starting from 16184 are not compatible with Delphi IDE, staying locked on splash screen forever.

 

Yes, Windows Insider Build are Beta version(s), however Delphi is the one and only software I am aware of that bricked under those builds.

I suspect a Delphi issue, probably the protection and online activation module that is again at fault trying to protect itself.

As it is reasonable to think Microsoft is not the culprit here, and as being in Windows Insider program is sometine not an option for software vendors, Embarcadero/idera should at least investigate the issue and report - ideally provide a quick fix. 

 

If one's answer is "don't use Windows Beta", then just don't waste the time to write it.

ADO and RAD Studio

$
0
0

Hi all,

I'm brand new to RAD Studio (Delphi for win32, free), since I'm coming from "old" Borland Turbo Delphi - I'm a hobby developer, not sure a pro one - and just few days ago I've installe RAD Studio 12.2 for the first time.

I've tried to import a project I wrote years ago With Turbo Delphi, a recipes manager based on ADO databases, but I get (obviously) a component error because RAD Studio can't load TADOTable, TADODb, and so on.

So my question is: is there a way to load ADO components in Rad Studio, and - if yes - where can I find the component suite? And, if not, must I rewrite the whole code using TDB components in place of TADO components.

 

Thanks and cheers,

Melantho

Memory Access Error Delphi Studio 10, 32 bit

$
0
0

In moving code from Studio 5 to Studio 10 I am repeatedly getting many stupid memory access errors.when I try to read or write data to a data structure. Yes, the program does list the form to be created so the structure should be there. I am calling the element with a full path name of unit, structure and element and the compiler is happy. One element was an Int32 which kept dying until I changed it to an Integer (on a 32 bit compiler - duh). Now I am dying on a defined set that works fine under Studio 5. Is there an update to fix these compiler errors? Have I exceeded a memory size? Can't believe that. The stack is set for 16 meg. All unit are included in the program list and all forms are set to auto create.

 

How to enable Windows Authentication for HTTP Requests from Delphi

$
0
0

Hi,

We are making web http requests from our Delphi client. This works fine for Anonymous authentication. But we now want to go with windows authentication for our new requirement. For some reason, this do not work for us and the client windows credentials is not coming to the server as we would expect.

Anyone have any idea what could be going wrong when http request is made from the Delph client with Windows Authentation set as enabled in IIS please? We would expect the client windows credentials to reach the server side for us to do the authentication. 

This works fine when we tried the same URL and same http requests in Fiddler and Postman. So there is something which Delphi is missing?

How Delphi client application provides/handles windows credentials?

 

Thanks

Tomy

tomy.chacko@allscripts.com

 

 

 

 

  


Demo Samples no working on 10.2 -- Map, Gyroscope

$
0
0

The Gyroscope demo runs and I can check that the timer code is running but nothing is displayed.

On the Map_Object demo I now get ---------------------------

Error

---------------------------

Unable to install C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\Map Type Selector\Android\Debug\Map_ObjectPascal\bin\Map_ObjectPascal.apk.

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED].

---------------------------

OK   

---------------------------

 

Will try on another PC later today.  Do these samples work for anyone else using 10.2 ?

Clark

 

 

Compiling HiRedis, the official C Client of the Windows port of Redis with C++ Builder

$
0
0

Hi all,

I'm in the process of building Hiredis, the official C client library for Redis (Windows port of course) using C++ Builder.

Windows port of Redis is a fork maintained by Microsoft Open Tech community and is of course tight to MS compiler and libraries. In fact, there is no luck in trying to compile the source just "out of the box" as Visual Studio does, even if the source is straight standard C (well, at last the original Redis code).

The source can be found here: Windows port of Redis 

I know there is a Delphi client available, but it really sounds sad (and frustrating) to me having to import the Delphi code because the "native C source" cannot be used. No way. That's why I decided to give it a try. 

To compare sources an libraries involved, I'm using C++ Builder 10.1.2 (Berlin Update 2) on one side and Visual Studio Community 2017 on the other side. The basic steps using C++ Builder are:

(Edit: I edited the post and removed all code formatting features because I had problems with it. Also, for the same reason all #include in the post has standard parenthesis instead of "minor and major" chars. Sorry for that.)

  1. Download of source version redis-win-3.2.100
  2. Create a new Static Library project called Hiredis and add some files contained in the "redis-win-3.2.100\deps\hiredis" subfolder: from the deps\hiredis folder:
    • async.c 
    • hiredis.c
    • net.c
    • sds.c

      (from src\Win32_Interop folder):
    • Win32_ANSI.c
    • Win32_Common.cpp
    • Win32_Error.c
    • Win32_EventLog.cpp
    • Win32_FDAPI.cpp
    • Win32_fdapi_crt.cpp
    • Win32_RedisLog.c 
    • Win32_rfdmap.cpp 
    • Win32_Time.c
    • Win32_VariadicFunctor.cpp
  3. Setup the project to use Clang based compiler (not really needed as this should be standard C code, but see later)
  4. Add project conditional defines:
    • _STDC__=1 (required to cut off (re)definition of “off_t” inside stdio.h)  
    • __SSIZE_T_DEFINED=1 (required to cut off (re)definition of type ssize_t inside _stddef.h)  
    • _OFF_T_DEFINED (required to cut off (re)definition of type off_t inside sys\types.h; needs C Standard Header modification, see below.)
  5. Build

The project fails to compile as I said, here is a step by step description of the issues and fixes I used. After each fix I usually compile the single unit or directly build the whole project. Each fix provided must not break the original source which still compiles using MSVC, this will be eventually a requirement when talking about pushing the code to the MSOpen Tech community.

  • [bcc32c Error] Win32_Error.h(37): unknown type name 'size_t'
    Fix: added a conditional block and the relative include to the header that contains that type. 

    #ifdef __BORLANDC__
    #include (stdlib.h)
    #endif

    This error is due to the fact that inside Win32_Error.h there is another include and this header in MS C Runtime Library version contains another include to a Visual C header. (Kudos to Embarcadero C Runtime Library version)

  • [bcc32c Error] stdio.h(56): typedef redefinition with different types ('long' vs 'long long')
    This error is due to the re-definition of the type off_t inside the file win32_types.h provided in the hiredis source.

    Now, according to the info in "win32_types.h" they need to re-define both off_t and _off_t types to match Posix version of Redis.
    But, in order to use this definition without conflicts you need to include this header before any other inclusion of the original header "sys\types.h", which contains the original types definitions under a conditional define (_OFF_T_DEFINED). 

    Win32_types.h will also define _OFF_T_DEFINED to avoid subsequent types re-definitions. (anyway MSVC has an additional conditional define _OFF_T_DEFINED at project level.)

    Now, on MS Visual Studio C Runtime Library, "stdio.h" does not contain "off_t" type definition, that's why it everything works. Moreover, Embarcadero C Runtime Library has no conditional defs to skip off_t and _off_t definitions inside "sys\types.h" as MS does.

    First Fix: I'd rather not modify C Runtime Library headers at all, but at the moment I have no other options here than modifying Embarcadero C Runtime Library header file "sys\types.h" and wrap the off_t type definition with the above mentioned _OFF_T_DEFINED, just as in MS Visual Studion C Runtime headers:

    #ifndef _OFF_T_DEFINED
    #define _OFF_T_DEFINED
    typedef long off_t;
    #endif

  • [bcc32c Error] Win32_variadicFunctor.cpp(61) expected '(' after 'for'
    Fix: replace MS style “for each” with standard C++11 “for ( range_declaration : range_expression )” 

  • [bcc32c Error] Win32_fdapi_crt.cpp(35): use of undeclared identifier '_pipe'
    Fix 1: add #include
    Fix 2: replace functions _setmode(), _isatty() with setmode() and isatty()

  • Win32_time.c/.h errors
    Fix 1: move struct timezone definition from .c to .h
    Fix 2: include time.h in Win32_time.h

  • [CLANG Error] sds.h(53): expected identifier
    The file contains an helper macro to pack structs. The macro uses __pragma() compiler extension to allow the usage of pragma "in-a-macro". According to the compiler documentation, also thanks to this answer on StackOverflow from Remy Lebeau, old BCC32 does not support this statements. But Clang based compilers do. This is the first fix that is tight to Clang compiler, even if we could build a different solution by using #pragma as stated in stakoverflow post by Remy to have BCC32 working.
    Anyway, I was not able to make __pragma() work that way, so I created another macro using _Pragma() instead and that worked fine.

    #if defined(__BORLANDC__) && defined(__clang__)
    #define PACK( __Declaration__ ) _Pragma( "pack(push, 1)" ) _Declaration__ _Pragma( "pack(pop)" )
    #else
    #define PACK( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
    #endif
     
  • [CLANG Error] hiredis.c(1041): conflicting types for 'redisConnectWithTimeout'
    hiredis.h(184): previous declaration is here
    (unresolved)
    As sometime happens the compiler message is not really helpful. In fact the problem is not 'redisConnectWithTimeout' function prototype but rather one of the parameter types used in it, timeval which is defined in "winsock2.h".
    For some strange reason, on MSVC this type definition is known in hiredis.h at function declaration, even if winsock2.h is not included by any of the include entries, nor in any sub-includes. Unfortunately, any inclusion of winsock2.h leads to an incredible amount of other errors which make me think about searching for another solution.

  • [bcc32c Error] types.h(65): expected unqualified-id (unresolved)
  • [bcc32c Error] types.h(69): no member named 'off_t' in namespace 'std' (unresolved)
    At last the second error comes from the conditional define to wrap off_t. 

Here is where I lay by now, welcome contributions from anyone can help.

Thanks.

Alex B.



Legal using two Delphi Starter instances

$
0
0

Hello to all!

I am trying to learn to programming and since this I am there with one question.

Recently I have downloaded a new Delphi Tokyo 10.2 Starter edition (which is free). This is a cool IDE (early I have been using Lazarus a little a bit). I have install Delphi Starter on my main home machine, but sometimes I do a lot of stuff outside my home (not related with programming), so my home computer is not available for me. But when I am outside of home, all free time which I have could be spent to improve my programming skills. Having my personal laptop I am wondering, if I can legally install Delphi Starter Tokyo 10.2 on my laptop and work with it when I am not at home. But in the same time I want to be able also to have Delphi Starter Tokyo 10.2 to be installed on my home machine, so when I get at home I could use my home machine to programming.

Programming is just my hobby and I don't want to break the law with illegal installing Delphi on my personal laptop.

The clear question is: can I legally install Delphi Starter Tokyo 10.2 on two my personal machines?

FAQ for Delphi Starte Tokyo 10.2 says next:

"If a single user starts two instances of a Starter edition product, does that count as two toward the maximum of five?

Yes, if they are on separate machines or separate virtual machines."

(https://www.embarcadero.com/products/delphi/starter-faq)

But I would like to have more info about this question.

 

Thanks in advance for your help!

P.S.

Sorry for my poor English(

Application Deployment

$
0
0

Hi, I need supply export library of my dll to other teem working on VC.

Witch tool can convert the library from OMF to COFF format?

Thank You.

ISAPI DLL TWebRequest Broken

$
0
0

Does anybody know when ISAPI DLL TWebRequest->Content is going to be fixed?  It's been broken since Seattle 10.1 update 2.  It's null inside function.  Thanks Marshall  

FMX C++ Builder App on MacOS crash on start with 10.2

$
0
0

Have a project that worked fine with 10.1 Berlin for the three target environments: Win32, Win64, and MacOS/OSX.

Load the project up in 10.2 Win32 and Win64 work fine, but MacOS/OSX version crashes during startup (before executing any of the .cpp files in the project). Thus have been unable to debug it.

As a further test: I created a blank project which works fine in all 3 (just to make sure everything is correct) started adding the same components to the FMX Form on the test project--everything worked...

2nd test: Create a blank FMX application and then add all the files from the original project to it. This results with the same crash as with the original application.

Looking at the stack trace the crash appears to be related to styles (there is no stylebook associated with the form, and even if one is added the application still crashes in MacOS/OSX).

 My 10.2 is up to date (including the latest patch recently released).

uploading and download images Rad Server

$
0
0

Hi,

Im trying to develop a solution with Rad Server, but i need to upload and download images and some files, i been playing with the server, but i can't send or get images.

 

any hints?

 

Thank you

MH


Delphi keeps trying to launch application but it keeps closing

$
0
0

Referring to thread: http://community.embarcadero.com/answers/ios-app-won-t-launch

I got confused by the exact solution of that thread. I'm having the exact same issue, trying launch an iOS app from Delphi Berlin 10.1 Update 1 to an iPhone 5 with iOS 10 (using XCode 8). Delphi keeps "Launching" the app, the app actually opens in the iPhone but then immediately closes, then Delphi tries to launch it again, and it keeps going in a loop.

I have deleted any "entitlements" and "pInfo" file in:

a) PAServer scratch dir in Mac

b) The AppData/Roaming/Embarcadero/BDS/18.0 folder

c) My project folder

None of this work. Can someone help me out? Thanks a lot!

 

 

Loading DataModule on IDE Delphi XE7

$
0
0

I have a project that upgraded from Delphi7 to DelphiXE7, this project has over 15 years of development, the point is that when I open a datamodule with third-party components ( memory tables ) around 600, it takes me four minutes to open , but in Delphi7 it is opened without delay.

Furthermore, when the DFM has links to other forms it takes more time , it seems that creates other forms first.

And if the DFM has links to X form and that form has link to DFM I'm trying to open the IDE hangs .

And hope you can help me with this problem. best regards.

Armand

How to generate SOAP-Response with Class including object-array or list of objects?

$
0
0

Hello,

I want to program a SOAP-Server and Client using TRemotable. I tried the tutorial of Craig Chapman.

It runs well and I implemented a new methode for respond an object.

I want to read records from a ADO database and store them in the service's result-object.

Database access runs well.

Anyone knows a good example?

Thank You

Marcus

How to add a Client Certificate authentication to my SOAP server?

$
0
0

Hello!

I made a SOAP server application.

 

On a start I do somethings:

  FServer := TIdHTTPWebBrokerBridge.Create(Self);
  LIOHandleSSL := TIdServerIOHandlerSSLOpenSSL.Create(FServer);
  LIOHandleSSL.SSLOptions.CertFile := 'c:\share\testcert\server.crt';
  LIOHandleSSL.SSLOptions.Mode := sslmServer;
  LIOHandleSSL.SSLOptions.KeyFile := 'c:\share\testcert\server.key';

  LIOHandleSSL.OnVerifyPeer := IdSSLIOHandlerSocketOpenSSL1VerifyPeerCertificate;

  LIOHandleSSL.SSLOptions.VerifyDepth := 1;
  LIOHandleSSL.SSLOptions.VerifyMode := [sslvrfPeer, sslvrfClientOnce];

  LIOHandleSSL.OnGetPassword := OnGetSSLPassword;
  FServer.IOHandler := LIOHandleSSL;

I created a self-signed certificate to establish an SSL connection.

As I can see, my this pair of Public and private keys is used for establishing SSL connection, and it works from a browser.

But how can I add c second-side public certificate to authenticate needed client?

Any examples?

 

Thank you very much!

 

Facing issue related to combox in the firemonkey application in delphi 10.1 berlin

$
0
0

We are facing issue with the combo box in the fire monkey application. As we add the values in the combo box with special character then in the drop down it is not showing the special character instead it is showing the underscore character.Please help us in this. For example : add  "delphi$123"  in the combo box. In the drop down it is showing "delphi_123" 

Viewing all 1888 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>