Quantcast
Channel: Recent Topics - Forum - Embarcadero Community - Embarcadero Community
Viewing all 3677 articles
Browse latest View live

Rotating Timage - by: Andrew

$
0
0
I have loaded a jpeg file into a Timage component. I now want to rotate the image by 90, 180, etc. Only the image - I don't need to save the file.

Can someone point me to some code that does this?

Is a basic Mac Mini useable to for Mac OSX development - by: Mark

$
0
0
I am wanting the cheapest physical option to enable me to compile mac osx and ios apps using C++ Builder 10.2.3
I have an iMac Pro at home, but want to use a cheap alternative when out and about and was wondering if the Mac Mini (cheapest current model) is able to do the job? I can't afford anything else.

detect bluetooth on android firemonkey - by: Frank

Localisation in default button captions does not work right - by: Jouni

$
0
0
I'm working with Delphi 10.2 Community Edition (WIN10 64bit).
My question:
For example MessageDlg('My text', mtConfirmation, [mbYes, mbNo], 0, mbYes) etc.
Localisation of those default Button (mbYes, mbNo) Caption texts will be automatic done by the system? I mean user in USA, in europe or in Japan will see those Button caption texts in their own language (without any spesific code of mine). Or will they? My problem is: I'm in Finland and programming for finnish users. In earlier Delphi versions those default Button captions were in finnish automatically in compiled piece of software, but not in software compiled in Delphi 10.2 Community Edition. I've tried to change the defalut language in Project -Options - Version info -Languge, but it does'nt work. What's different in Delphi 10.2 Community Edition compared to the earlier versions, what should I do to get those default button caption texts in my language?
Thanks.

Problems with Mobile Development - by: Markus

$
0
0
Hi,

I try to create an Mobile App for my Samsung Galaxy S7, but I can't bring it to work.
In the Phone I found the "developer settings" and also activate the "Debug Mode",
like it is described in the Delphi-Documentation.
As the next step I install the driver and the phone appears in the IDE.
Then I create a small Test-App using FMX (Just a Label and a close button).
But when I want to compile it said something I don't understand.
It's the first time I want to build ann Mobile-App, so maybe there is something
simple missing. I tried to do this by using the german documentation about
creating an Mobile-App for Android, but I failed.
Is there a stupid-save youtube-video (in german) where it is shown, or does
anybody have this error (see log-files) and know what to do?
My Delphi 10 IDE is in german, so the errorlogs (parts of them) are in german too.
I have the original log attached as "Delphi_Error_Log.txt" and the one I format for
myself, so I can read this more easily, as "Delphi_Error_Log_Ex.txt".
I hope anybody knows help.
Thanks for reading so far and a nice day.

Greetings from germany
Markus Klimetzki

Error exit 3 when compiling Android Service Demo with Delphi 10.2 (Tokyo) - by: Pascal

$
0
0
Hi ,

I am very new on Delphi and this forum.

I am trying to test a demo for Android service which is located in :
C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\AndroidNotificationServiceDemo

When I compile the service, I have the message :

Build started 12/09/2018 10:47:40.
__________________________________________________
Project "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\AndroidNotificationServiceDemo\NotificationService\NotificationService.dproj" (Build target(s)):
Target BuildVersionResource:
c:\program files (x86)\embarcadero\studio\19.0\bin\cgrc.exe -c65001 "NotificationService.vrc" -foNotificationService.res
CodeGear Resource Compiler/Binder
Version 1.2.2 Copyright (c) 2008-2012 Embarcadero Technologies Inc.

Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0

Copyright (C) Microsoft Corporation. All rights reserved.


Suppression du fichier "NotificationService.vrc".
Target BuildAndroidServiceJarFile:
"\bin\javac" -d "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\AndroidNotificationServiceDemo\NotificationService\JavaClasses\NotificationService" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar";"c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\NotificationService.java .\Android\Debug\NotificationServiceProxyInterface.java
Le chemin d'accès spécifié est introuvable.
c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(811,5): error MSB3073: La commande ""\bin\javac" -d "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\AndroidNotificationServiceDemo\NotificationService\JavaClasses\NotificationService" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar";"c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\NotificationService.java .\Android\Debug\NotificationServiceProxyInterface.java" s'est arrêtée avec le code 3.
Done building target "BuildAndroidServiceJarFile" in project "NotificationService.dproj" -- FAILED.
Done building project "NotificationService.dproj" -- FAILED.
Build FAILED.

c:\program files (x86)\embarcadero\studio\19.0\bin\CodeGear.Common.Targets(811,5): error MSB3073: La commande ""\bin\javac" -d "C:\Users\Public\Documents\Embarcadero\Studio\19.0\Samples\Object Pascal\Multi-Device Samples\Device Sensors and Services\AndroidNotificationServiceDemo\NotificationService\JavaClasses\NotificationService" -Xlint:deprecation -classpath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar";"c:\program files (x86)\embarcadero\studio\19.0\lib\Android\Debug\fmx.jar" -bootclasspath "C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.31059.3231\platforms\android-28\android.jar" -encoding UTF-8 -target 1.6 -g -source 1.6 .\Android\Debug\NotificationService.java .\Android\Debug\NotificationServiceProxyInterface.java" s'est arrêtée avec le code 3.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.18


When I run the command from windows command line replacing the relative path for NotificationServiceProxyInterface.java and NotificationService.java by the full path, the command works perfectly (No errors).

I looked on the forum and found a similar topic opened on Nov, 28, 2016 by Luca Pretti : Error compiling Android Services Demo with Delphi 10.1 Berlin ( forums.embarcadero.com/message.jspa?messageID=868914 ).

It was closed telling that the problem were coming from the build tool used by the IDE.

I tried (using Tools\Options\SDK Manager) to point on build tool 22 and 28 (The last available) and the problem is the same in both case.

Is there a way to tell IDE to use absolute path instead of relative path when compiling ?

Or does anyone know how to solve this problem ?

Thanks in advance for your help;

Instantiate Android SipManager in c++ builder - by: Pedro

$
0
0
I'm triying to instantiate the SipManager (developer.android.com) in Embarcadero with c++ builder but I'm not able to find the right way.
For this I'm using Delphi Interface instances


In Java it is like this:

public static SipManager manager;
manager = SipManager.newInstance(context);
//Context is the application context for creating the manager object.


For the correct compilation of the code that will appear next, it is necessary to include the following:

#include <System.Classes.hpp>
#if defined (_PLAT_ANDROID)
#include <Androidapi.Helpers.HPP>
#include <Androidapi.JNI.Net.HPP>
#include <Androidapi.JNI.os.HPP>
#include <Androidapi.JNI.Support.HPP>
#include <Androidapi.JNI.Media.HPP>
#endif

In addition, the "Use Sip" and "Internet" permissions must also be added to the manifest.

I tried to do it in many ways, based on the fact that I already knew how to install the WifiManager:

#if defined (_PLAT_ANDROID)

_di_JObject obj;
_di_JSipManager sipm;
obj = SharedActivityContext()->getSystemService(TJContext::JavaClass->WIFI_SERVICE);
wm = TJWifiManager::Wrap(((_di_ILocalObject)obj)->GetObjectID());
wm->setWifiEnabled(true);

#endif


For my application I have done the following:

1.This compiles but when running the application it says that the method init() is not found.

#if defined (_PLAT_ANDROID)

_di_JObject obj;
_di_JSipManager sipm;
obj = TJSipManager::JavaClass->init();
sipm = TJSipManager::Wrap(((_di_ILocalObject)obj)->GetObjectID());

#endif


2.This compiles too, but when running the application, this one has an exception kind of "Abort".

#if defined (_PLAT_ANDROID)

_diJWifiManager wm;
sipm = TJSipManager::Create();

#endif


3.This compiles too, but when running the application, this one has an exception kind of "Access Violation".

#if defined (_PLAT_ANDROID)

_di_JSipManager sipm;
sipm = TJSipManager::JavaClass;

#endif


4.This compiles too, but it has an exception kind of "Abort" when I try to open the profile.

#if defined (_PLAT_ANDROID)

_di_JSipManager sipm;
_di_JContext context;
_di_JSipProfileBuilder sippb;
_di_JSipProfile sipp;
context = SharedActivityContext()->getApplicationContext();
TJSipManager *sipn = new TJSipManager();
sipm = sipn->Wrap(((_di_ILocalObject)context)->GetObjectID());
_di_JString uri;
uri = StringToJString("sip:165@40.134.279.145:5060");
sippb = TJSipProfile_Builder::JavaClass->init(uri);
sipp = sippb->build();
sipm->open(sipp);

#endif


If I do only the part of the SipProfile, there is no problem and the profile is built.

#if defined (_PLAT_ANDROID)

_di_JSipProfileBuilder sippb;
_di_JSipProfile sipp;
_di_JString uri;
uri = StringToJString("sip:165@40.134.279.145:5060");
sippb = TJSipProfile_Builder::JavaClass->init(uri);
sipp = sippb->build();

#endif


And in Java it is like this:

public static SipProfile me;
SipProfile.Builder builder = new SipProfile.Builder("uri");
me = builder.build();


I would like to know how to instantiate the SipManager for c++ builder.
In java it has been seen that it uses the method "newInstance(context)" for it,
but when I try to instantiate it in c++ builder it doesn't appear any similar method that belongs to this class.

1.Can I instantiate in c++ builder?

2.What's the right way to do it?

3.If not possible, is there another library to make a Sip application in Embarcadero with c++ builder?

Reading DBFfiles with long names - by: André

$
0
0
On a form I made a TFDConnection with as DriverID=MSAcc and also the FDPhysMSAccessDriverLink with ODBCDriver=Microsoft dBase Driver (*.dbf).
To connect to a dbf file I gave ODBCAdvanced parameters: ODBCAdvanced=Driver={Microsoft dBase Driver (*.dbf)};CollatingSequence=ASCII;Dbq=D:\Projecten\P00043\menyanthes\2018ANBR\basis_mtr1993_men;Deleted=1;DriverId=277;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=600;SafeTransactions=0;Statistics=0;Threads=3;UserCommitSync=Yes

I tested the connection with the FireDAC Connection Editor and the result was succes full. After that I tried to read the dbf-file "basis_mtr1993.dbf" on the sheet "SQL script" with the command: “select * from basis_mtr1993”.
Than I received an error: ERROR: SQL state: 42S02. Native error: -1305. Error message: Which mean that the [Microsoft][ODBC dBase-stuurprogramma] De Microsoft Jet-database-engine cannot find the object "basis_mtr1993".
If I change the filename into "mtr1993.dbf" and run the command "select * from mtr1993" than I see the records. Obvisously the ODBC-driver can only read 8.3 files. Because many of my files have long names I need another way. Has someone a solution for reading dbf-files with FireDAC-components that have long filenames?
Thanks in advance.
André Niemeijer

Delphi 10.2.2 to 10.2.3 Update fails when "Downloading DirectX" - by: Alter Ego Services

$
0
0
Trying to update my Delphi 10.2.2 to 10.2.3 and everytime I get the error "Operation Error" when "Downloading DirectX" (see attached screenshots). Of course, before failing the Delphi installer thrashed my 10.2.2 setup (thank you embarcadero). Anyone else get this problem ? Is there any place where we can get support ?

XE2 Comport data use TComport - by: Alan

$
0
0
I'm getting some very strange behaviour from a serial port. We're using TComport to connect. The settings are ok - in that no error occurs when the connection is made and the settings match that required for the device (a combined scale/scanner).

We're using a timer to enable reading. The code is as follows:

procedure TCBPOSaleForm.Timer2Timer(Sender: TObject);
var
sStr : String;
begin
if Comport2.Active then
begin
sStr := Comport2.ReadAnsiString;
if Length(sStr) <> 0 then
begin
MatCodeEdit.Text := '';
MatCodeEdit.Text := sStr;
end;
end;
end;

sStr keeps getting "#0#0#0#0#0.....". We thought there may have been a conflict over the use of the serial port and have switched to one that we're sure is not in use by any hardware connected to the PC or by any device manager/application. However I would have thought that would have meant the comport simply wouldn't connect.

Previously the bar code scanner did send the correct data. By "previously" I mean before we had connected BOTH scale and scanner. Now the scale sends the correct data. But the scanner doesn't.

However, when testing using Appload the scanner is read correctly. So I'm beginning to think we're doing something wrong. But I can't see it. Especially as the same code did work.

Any ideas would be appreciated.

Thanks

Alan

Is a basic Mac Mini useable to for Mac OSX development - by: Mark

$
0
0
I am wanting the cheapest physical option to enable me to compile mac osx and ios apps using C++ Builder 10.2.3
I have an iMac Pro at home, but want to use a cheap alternative when out and about and was wondering if the Mac Mini (cheapest current model) is able to do the job? I can't afford anything else.

detect bluetooth on android firemonkey - by: Frank

Localisation in default button captions does not work right - by: Jouni

$
0
0
I'm working with Delphi 10.2 Community Edition (WIN10 64bit).
My question:
For example MessageDlg('My text', mtConfirmation, [mbYes, mbNo], 0, mbYes) etc.
Localisation of those default Button (mbYes, mbNo) Caption texts will be automatic done by the system? I mean user in USA, in europe or in Japan will see those Button caption texts in their own language (without any spesific code of mine). Or will they? My problem is: I'm in Finland and programming for finnish users. In earlier Delphi versions those default Button captions were in finnish automatically in compiled piece of software, but not in software compiled in Delphi 10.2 Community Edition. I've tried to change the defalut language in Project -Options - Version info -Languge, but it does'nt work. What's different in Delphi 10.2 Community Edition compared to the earlier versions, what should I do to get those default button caption texts in my language?
Thanks.

Solved installation Repository Corrupt - by: robert

$
0
0
Below is my post that I was posting regarding how I screwed up the installation. Long story short: The file repository in \ public was corrupt. I uninstalled and then manually deleted the repository and then installed platforms one at a time,



..........................................................................................................................................................................



I am being unsuccessful at installing the free trial of Delphi/Rad studio.... I am going down hill. My first attempt. I neglected to select android, which is the primary purpose of this trial. Rad studio was working but obviously not giving me what I needed.

Then I made a crucial mistake. I went back and ran the installer again, thinking that it would pick up the components that I failed to install.. it got to the jdk and android sdk and wouldn't get past that...Ahhh it must be that I have installed android studio and jdk previously.... removed them and tried again.. uninstalled Rad studio....spiralling down the tube....further and further.. YEAH I know I should have read the directions but not having to read directions has always been one of dephi's key advantages.

I tried to clean everything up and start from scratch... It installs the basic files but no platform support, even if I go in from the ide and tell it to just install delphi 32 for windows. I can see a page flip by before it says "operation error"..

Is there any log file that will give me a clue as to how to fix this.. Or any pertinent advice that is not "wipe system"

If I wasn't a longtime Delphi fan I would give up.

thanks

robert



I dug in and found the file,,, it doesn't help here is what is happening immediately before dying:



[2017-07-15 16:53:23] [DEBUG] Selected IDs to install: "Delphi_Windows_32-bit_Enterprise_Trial-19.0.26309.314".

[2017-07-15 16:53:23] [DEBUG] Requesting data (Try 1 of 3). URL: " getit.embarcadero.com/catalog/additionalitems "...

[2017-07-15 16:53:23] [DEBUG] Requesting data (Try 1 of 3). URL: " getit.embarcadero.com/catalog/dependencyinfo "...

[2017-07-15 16:53:23] [DEBUG] Requesting data (Try 1 of 3). URL: " getit.embarcadero.com/catalog/infobyids "...

[2017-07-15 16:53:31] [INFO ] Downloading "Core Common Files Enterprise Trial"...

[2017-07-15 16:53:31] [DEBUG] Requesting data (Try 1 of 3). URL: " getit.embarcadero.com/catalog/installbyids "...

[2017-07-15 16:53:38] [INFO ] Moving folder "$(BDSCatalogRepositoryAllUsers)\Core_Common_Files_Enterprise_Trial-19.0.26309.314\TARGETDIR\" to "$(BDS)"...

[2017-07-15 16:53:38] [ERROR] A problem occurred during the process.

[2017-07-15 16:53:38] [INFO ] Installation End

[2017-07-15 16:53:42] [INFO ] Platform manager dialog closed by the user.



..............BDS was defined above

BDS=c:\program files (x86)\embarcadero\studio\19.0

[win 10] "non shared data segment" error on RAD Studio 10.2.2 - by: Abdelali

$
0
0
Hello,
I want to enable codeguard in my c++ project on win10. I migrate to RAD Studio 10.2.2. But I still have the error "NonShared data segment required"
How can I solve this issue ?
Thanks and regards

Missing error function erf() - by: Greg

$
0
0
I've written a C++ program using 10.2.3 and the 32-bit CLANG compiler. It has a call to the (mathematical) error function erf, which is in the C++ standard library in the cmath header. The code compiles but the linker gives the error

Unresolved external '_erf' referenced from ...

Any ideas?

Greg Reese

Productivity killing "[ilink32 Error] Fatal: Out of memory" error message - by: Brent Williams

$
0
0
I'm using RAD Studio 10.2.2.
I'm getting this out of memory link error almost every time I link my program which is C++ 32-bit windows app.
I'm using TwineCompile but everything complies just fine.
I've got 10Gb allocated to my VM.

I searched the Embarcadero forums and found:
docwiki.embarcadero.com/RADStudio/Tokyo/...s#Command-Line_Flags
and
community.embarcadero.com/article/articl...em-and-workarounds-2

After setting Verbosity to Diagnostic the Output message window doesn't show anything about heaps and them overflowing.

I hope someone out there has had this issue and knows of a real solution cause i'm stuck :(

Thanks in advance if you can help me!

Firedac and transaction - by: Adrian

$
0
0
Hello, I have a problem with Firedac. I use Firedac with firebird and ClientDataSet, the problem is that when I commit the changes made in a master/detail table from the other computers I don´t see these changes, I have to clos the application and then when I enter again, than I can see the changes. To save the data I do this:

Master.Trnasaction.StartTransaction;
if Master.ApplayUpdates(0) > 0 then
Abort;
Master.Transaction.Commit;

The transaction atached to the qMaster has this options set:
Isolation := xiReadCommited;
AutoCommit := False;
AutoStart := False;
AutoStop := False;

What am I doing wrong?

Thanks and please be patient with my English

Delphi Firedac SQLite Commit problem - by: Romuald

$
0
0
Hello,

When I made a commit, I naively believed that the physical file of the database would be updated (changing the modification date), but obviously it does not work like that.
The physical file of the database is modified when the database is closed !!!

i wrote a little test application with
* FDConnection1: TFDConnection; (all default setting) (cachedupdate is false)
* FDQuery1: TFDQuery; (all default setting)

My SQLite database has just one table
CREATE TABLE `t_stritems` ( `IdItels` INTEGER, `St01` VARCHAR (200), `St02` VARCHAR (200), `St03` VARCHAR (200), PRIMARY KEY(`IdItels`) )

My code is very simple

Connect the database :


Insert rows into the database




Test Process :
Connect the database : (the t_stritems file of my database contains 32000 records; the size of the database file is 2338 ko)
After the delete sql, I have in the directory of my database file a journal file (xxxx.db-journal). the database file size is 2338 ko
after the first commit, I have always in the directory of my database file the journal file (xxxx.db-journal). the database file size is 2338 ko (no physical update)
The program then adds 32000 records
The modification date of the file (.db) of the database will be modified only when I leave my application. !!!
the journal file (.db-log) will be deleted at the end of my application

Questions :
How to make the commit save data to the database ?
Is this normal ?
That the physical file of the database is modified only at the closing of the application (and at the same time of the connection) ?


Thank you in advance for your answer
Best regards
Romuald

Install RAD Studio other Disk Drive - by: Josr

$
0
0
Good day alls comunity.

I have install Delphi, i need change disk drive destinantion, for my case, D:
the install default c:\ the disk not have space
Viewing all 3677 articles
Browse latest View live


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