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

Master-detail loses cached update when move to new master record - by: Teri

$
0
0
Hello -

I have a Delphi 10.2 Windows forms app using FireDAC queries. I've a multi-tier Master-Detail relationship set up using 4 FDQuery components. The Master has 2 Detail tables, and one of the detail tables is a master to a detail table of its own.

The M/D relationships all are a combo of Parameter-based & Range-based, per this docwiki article:
Master-Detail Relationship (M/D)http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Master-Detail_Relationship_(M/D)

In addition, all 4 tables are using a single FDSchemaAdapter for centralized caching.

According to the previously cited article, "The cached updates preserved on the master change" when using Range-based M/D relationships. However, the cached updates are not be retained when either of masters record pointer moves to another record.

Am I missing something?

TIA
Teri

Preparing Delphi deployment for the Android API level 26 August 2018 deadline - by: Inmatrix

$
0
0
Using Delphi 10.2.3, I have recently deployed my first Closed Alpha release using the Google Play console and was greeted with this message:

> Warnings
>
> Your app currently targets API level 14 and must target at least API
> level 26 to ensure it is built on the latest APIs optimized for
> security and performance.
>
> From August 2018, new apps must target at least Android 8.0 (API level
> 26). From November 2018, app updates must target Android 8.0 (API
> level 26).

There are several questions here with regards to Delphi deployment:
  • Delphi 10.2.3 ships with Android SDK 24.3.3, why does it warns the target API is set to level 14 and how can this be changed? (is the only option to edit AndroidManifest.template.xml?)
  • I used the Android SDK Manager tool to download the latest versions of the "Android SDK Tools", "Android SDK Platform Tools" and "SDK Platform" for Android 8.1 (API 27). However, when following the instructions ( docwiki.embarcadero.com/RADStudio/Tokyo/...dding_an_Android_SDK ), it instead installed SDK 25.2.5, even though I specified the "SDK API-Level" to "android-27" at the bottom of the wizard. How can I get SDK 27 to install?
  • I downloaded the latest Android r17 NDK ( developer.android.com/ndk/downloads/ ), but Delphi's Add SDK wizard wont accept the NDK path at all (it shows the yellow triangle), is it even possible/recommended to use the latest NDK?

Berlin to integrate Help from TMS, TeeChart VCL - by: Ricky

$
0
0
I am using Berlin have installed VCL such as TMS, TeeChart...etc.
How do I integrated those help files so that I can access them?
Thanks

WSDL Namespace change - by: Derek

$
0
0
I was given a replacement WSDL in a completely different format, which the Delphi WSDL importer couldn't import. See original question here: community.embarcadero.com/forum/welcome-...-wsdl-and-wadl-files

Given no one answered I decide to simply take the old pas files generated by the WSDL importer and manually make all the changes. This worked fine, except that now I discover the namespaces have also changed. Some of the NameSpaces are in the in pas file, but some, expecially those in the envelope header aren't. I don't seem to be able to change the namespaces anywhere in the code I have access to in Delphi. It appears like the WSDL importer created other files somewhere with these values.

I have attempted to change the values in the RemoteIOBeforeExecute procedure, but at the moment that just seems to corrupt the whole file and nothing is getting sent.

Does anyone know where the namespaces are set and how to change them?

[ilink32 Error] Fatal: Unable to open file 'FIREDAC.CONSOLEUI.WAIT.OBJ' - by: Fred

$
0
0
Hi,

I'm trying to build an EMS package in C++Builder 10.2.3 with the tutorial in the following URL:

- docwiki.embarcadero.com/RADStudio/Tokyo/...FireDAC_EMS_Resource

After using the wizard an empty BPL-project is created. The second step is putting an FDConnection on the design form. Next I save the project and unit files. In the unit header the following includes are created automatically:

#include <System.Classes.hpp>
#include <System.SysUtils.hpp>
#include <EMS.Services.hpp>
#include <EMS.ResourceAPI.hpp>
#include <EMS.ResourceTypes.hpp>
#include <Data.DB.hpp>
#include <FireDAC.Comp.Client.hpp>
#include <FireDAC.ConsoleUI.Wait.hpp>
#include <FireDAC.Phys.hpp>
#include <FireDAC.Phys.Intf.hpp>
#include <FireDAC.Stan.Async.hpp>
#include <FireDAC.Stan.Def.hpp>
#include <FireDAC.Stan.Error.hpp>
#include <FireDAC.Stan.Intf.hpp>
#include <FireDAC.Stan.Option.hpp>
#include <FireDAC.Stan.Pool.hpp>
#include <FireDAC.UI.Intf.hpp>

Then I compile and link my BPL-project and I received the following error:

- [ilink32 Error] Fatal: Unable to open file 'FIREDAC.CONSOLEUI.WAIT.OBJ'

All my directory locations for INCLUDE and LIB files are correct. What is going wrong?

Tools -> Options -> 32-bit Windows -> Classic Compiler -> Library path:

$(BDSLIB)\win32\release
$(BDSLIB)\win32\release\psdk

If I do the same with an MultiDevice application the includes are also created automatically and then the compile and link process have no errors. What is the difference between an application and package compile/link.

Thanks to everybody who can help me.

Best Regards,
Fred

FireMonkey parenting - by: Christian

$
0
0
Let's say you have a TButton (aligned Left/Top) at the far right side of a TPanel on a FireMonkey TForm. The button's Parent is the panel.

If the panel is made narrower, the button starts "sticking out" of the panel it is parented to. In VCL the button would be cut of as the panel decreased its width to be narrower than the right edge of the button, but on FMX it seems like the drawing of the button is not cut off at the edge of its parent control.

Is this intentional? If so, how do I make it behave as in VCL? If not, where do it report it as an error?

I have attached a small demo program that illustrates the problem. Compile and run it, then continuously press the "Narrower" button to see the panel (parenting the three buttons, aligned differently) and how the buttons behave. I have made the form background red to better see when the button sticks outside the panel and appears (visually) to be parented to the form and not the panel.

Check for Memory Leak - by: Christian

$
0
0
Hi,
I use FastMM memory leak reports. I would like to get a notification after running my application in the IDE in case a memory leak report text file was created.
Is there a simple way to do that?

cu ck

fireDAC can connect berkeley DB? - by: Tasi

$
0
0
fireDAC can connect berkeley DB?

forums.embarcadero.com is down AGAIN! - by: Remy

Forums unusable - by: Mats

$
0
0
Borlands forums used to be a great place for getting help and information on specific topics.

Now, the forum technology is back to a stone age level and more or less completely useless.

Whats going on???

-tk

Firedac and jvdbimage - by: Michael

$
0
0
Wanting to move from DBGo to FireDac so can connect to access and MySQL DB

Previously using DBGo and access database and JVDBImage to add image to a blob field.

Firedac works with MySQL and JVDBImage to add image to blob field but not with an access DB.

Tried recomended approach using TBlobstream et al but not working.

My workaround has been to use DBGo to put the images into Access DB as needed but this is not a satisfactory solution.

"ssl3_get_record wrong version number" Error - by: Vladimir

$
0
0
Hi there!
I'm trying to make client-server application on Indy with SSL encryptig.
And I faced with a problem.

When the client tries to connect to the server, an error "ssl3_get_record wrong version number" occurs.
If I set IdSSLIOHandlerSocketOpenSSL.PassThrough:= true on Client side network exchange works, but it doesnt encrypt.
Because of this, it seems to me that Server didn't enable encryption mode and I didn't found any information about this.

Please, tell me what can I miss.

Example projects you will find in attach.

AdMob not working with Tokyo 10.2.3 - by: Amiga

$
0
0
Hello,

the first time I use the BannerAd in Tokyo 10.2.3 in one of my latest Android App.
I've created an AdMob profile and use the correct UnitID.

If I start the app the onDidFail event tells me in german "Anzeige konnte nicht geladen werden: 1" (advert can not be loaded: 1)
If I take a look at the Android Device Monitor then it tells me:
"The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date"

The problem is, I use the actual libraries. I've reverted system files to default and all libraries are listed correctly:
et al, google-play-services-ads-7.0.0.dex.jar

Rad Studio generates also the correct manifest entry:
<meta-data android:name="com.google.android.gms.version" android:value="7095000" />

What could be the problem?

Drawing smooth curved lines - by: Ed

$
0
0
VCL

In attached demo project (also available here: www.tbinc.com/misc/Curved%20Lines.zip ) I am trying to draw a header image that includes a curved line, but the curved lines are not visually smooth (look closely). I am using PolyDraw() and FillPath().

Any suggestions for how to improve this?

Thank you,
Ed Dressel

Drawing smooth curved lines - by: Ed

$
0
0
(I thought I posted this--and wanted to update it without the 3rd party controls, but I cannot find the original post).

In the attached VCL demo (and here is a link: www.tbinc.com/misc/Curved%20Lines.zip ; put the Data.INI file in the EXE directory before starting the EXE), I draw curved lines, but they are not as smooth as I would like--a bit jagged.

Any suggestions on how to make them smooth?

Ed Dressel

"ssl3_get_record wrong version number" Error - by: Vladimir

$
0
0
Hi there!
I'm trying to make client-server application on Indy with SSL encryptig.
And I faced with a problem.

When the client tries to connect to the server, an error "ssl3_get_record wrong version number" occurs.

If I set IdSSLIOHandlerSocketOpenSSL.PassThrough:= true on Client side network exchange works, but it doesnt encrypt.
Because of this, it seems to me that Server didn't enable encryption mode and I didn't found any information about this.

Please, tell me what can I miss.

Example projects you will find in attach.

Azure Cosmos DB signature - by: Leo

$
0
0
My project needs to connect the Azure Cosmos DB by REST API.
The Azure Cosmo DB connection requires to pass a HMACSHA256 signature to
the HTTP header. I tried to use THashSHA2.GetHMAC(Data, Key) function to get
this signature. But when I compare the result with the signature I take from C# code
(the example code in Azure webpage), they are not the same. In the C# code I saw
it converts the key to Base64String before calculating the signature.
Should I do the same step in Delphi? How to do it? Do anyone have the experience
doing the Azure Cosmo DB signature calculation?

Updates:
I used two procedures to produce hash signature.

First one:
GenerateSignature(const AData, AKey: string): string;
var
AHMAC: TIdBytes;
bytes: TBytes;
begin
IdSSLOpenSSL.LoadOpenSSLLibrary;
if not TIdHashSHA256.IsAvailable then
raise Exception.Create('SHA-256 hashing is not available!');
with TIdHMACSHA256.Create do
try
Key := IndyTextEncoding_UTF8.GetBytes(AKey);
AHMAC := HashValue(IndyTextEncoding_UTF8.GetBytes(AData));
finally
Free;
end;
result := TNetEncoding.Base64.Encode(AHMAC);
end;

Second one:
result:= THashSHA2.GetHMAC(ACode, AKey);

None of them produce the same signature as C#

private static string GenerateMasterKeyAuthorizationSignature(string data, string key)
{
var hmacSha256 = new System.Security.Cryptography.HMACSHA256 { Key = Convert.FromBase64String(key) };
string payLoad = string.Format(System.Globalization.CultureInfo.InvariantCulture, data);
byte[] hashPayLoad = hmacSha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(payLoad));
string signature = Convert.ToBase64String(hashPayLoad);
return signature;
}

Any idea to reproduce the same signature as C# in Delphi?

Symbol "__stkchk" not found (in DLL) - by: Wolfgang

$
0
0
I got the notice that __stkchk could not be found from a user-generated DLL. However, when I link with the dynamic RTL this message disappears. Is there a way to let the compiler generate "__stkchk" automatically, even for DLLs which are linked to the static RTL?

[dccosx Fatal Error] F2084 Internal Error: AV10CB15EE-R84000004-0 - by: Keld

$
0
0
[dccosx Fatal Error] F2084 Internal Error: AV10CB15EE-R84000004-0

I am getting this error on the link phase (I think) of my project when compiling for OSX. If I compile the same source for Windows FMX it compiles fine (there are of course a few OSX specific parts, but mostly the conditionals center around VCL<->FMX differences).

If I **BUILD** the project, it can usually compile (and link), but if I then try to run it under the debugger (deploying it to my MacBook), it starts the link phase and aborts with this error. The actual error may be different, but the AV part (which I believe contains an internal line number) is the same. The one listed in <Subj> is the one I get the most times, but I have gotten this one as well:

[dccosx Fatal Error] F2084 Internal Error: AV10CB15EE-R34000004-0

Can anybody (from the error) give a hint as to where I should start looking. I have narrowed it down to the inclusion of our main unit, but this is 10000+ lines, so if I could narrow it down a little (f.ex. by someone saying "it's to do with resources" or "it's to do with generics of this or that type"), then it would be a big help.

I know that I probably have to do the "seek-and-destroy" method of disabling all the active code, and then re-implementing it one method at a time to see which one triggers the error, but if I could limit the code I need to do this with, it would make the process much smoother.

Rad Studio 10.2.3 and Ios 11.3 not working - by: Konstantin

$
0
0
Hello since i upgraded to XCode 9.3 and ios 11.3 . I am getting Linking errors which can't understand .
Please Please Please Please HELP ......
It was working fine with 11.2

Here are the errors
Error: "_OBJC_CLASS_$_NSObject", referenced from: _OBJC_CLASS_$_Reachability in libReachability.a(Reachability.o); objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o); _OBJC_CLASS_$_ZBarCameraSimulator in libzbar.a(ZBarCameraSimulator.o); _OBJC_CLASS_$_ZBarCaptureReader in libzbar.a(ZBarCaptureReader.o); _OBJC_CLASS_$_ZBarImageScanner in libzbar.a(ZBarImageScanner.o); _OBJC_CLASS_$_ZBarImage in libzbar.a(ZBarImage.o); _OBJC_CLASS_$_ZBarSymbol in libzbar.a(ZBarSymbol.o); ...
Error: "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o);
Error: "_OBJC_CLASS_$_AVCaptureDevice", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o);
Error: "_OBJC_CLASS_$_NSAssertionHandler", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o);
Error: "_OBJC_METACLASS_$_NSObject", referenced from: _OBJC_METACLASS_$_Reachability in libReachability.a(Reachability.o); _OBJC_METACLASS_$_ZBarReaderViewImpl in libzbar.a(ZBarReaderViewImpl_Capture.o); _OBJC_METACLASS_$_ZBarCameraSimulator in libzbar.a(ZBarCameraSimulator.o); _OBJC_METACLASS_$_ZBarCVImage in libzbar.a(ZBarCVImage.o); _OBJC_METACLASS_$_ZBarReaderView in libzbar.a(ZBarReaderView.o); _OBJC_METACLASS_$_ZBarReaderViewController in libzbar.a(ZBarReaderViewController.o); _OBJC_METACLASS_$_ZBarCaptureReader in libzbar.a(ZBarCaptureReader.o); ...
Error: "_OBJC_CLASS_$_AVCaptureSession", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o);
Error: "_OBJC_CLASS_$_NSBundle", referenced from: objc-class-ref in libReachability.a(Reachability.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_NSNotificationCenter", referenced from: objc-class-ref in libReachability.a(Reachability.o); objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o);
Error: "_OBJC_CLASS_$_NSString", referenced from: objc-class-ref in libReachability.a(Reachability.o); objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarSymbol.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UIViewController", referenced from: _OBJC_CLASS_$_ZBarReaderViewController in libzbar.a(ZBarReaderViewController.o); _OBJC_CLASS_$_ZBarHelpController in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o);
Error: "_OBJC_CLASS_$_UIApplication", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UIDevice", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewImpl_Capture.o); objc-class-ref in libzbar.a(ZBarCameraSimulator.o); objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_UIBarButtonItem", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UILongPressGestureRecognizer", referenced from: objc-class-ref in libzbar.a(ZBarCameraSimulator.o);
Error: "_OBJC_CLASS_$_UIImagePickerController", referenced from: objc-class-ref in libzbar.a(ZBarCameraSimulator.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); _OBJC_CLASS_$_ZBarReaderController in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_UIPopoverController", referenced from: objc-class-ref in libzbar.a(ZBarCameraSimulator.o);
Error: "_OBJC_CLASS_$_NSDictionary", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_NSOperationQueue", referenced from: objc-class-ref in libzbar.a(ZBarCVImage.o);
Error: "_OBJC_CLASS_$_NSInvocationOperation", referenced from: objc-class-ref in libzbar.a(ZBarCVImage.o);
Error: "_OBJC_CLASS_$_UIImage", referenced from: objc-class-ref in libzbar.a(ZBarCVImage.o); objc-class-ref in libzbar.a(ZBarImage.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UIAlertView", referenced from: objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UIView", referenced from: _OBJC_CLASS_$_ZBarReaderView in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_METACLASS_$_UIView", referenced from: _OBJC_METACLASS_$_ZBarReaderView in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_CALayer", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_UIColor", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_NSValue", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_UILabel", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_UIFont", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_UIPinchGestureRecognizer", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_CATransaction", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_CAMediaTimingFunction", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_CABasicAnimation", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_UIButton", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_NSNumber", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarCaptureReader.o);
Error: "_OBJC_CLASS_$_CAAnimationGroup", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o);
Error: "_OBJC_CLASS_$_NSArray", referenced from: objc-class-ref in libzbar.a(ZBarReaderView.o); objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_UIToolbar", referenced from: objc-class-ref in libzbar.a(ZBarReaderViewController.o); objc-class-ref in libzbar.a(ZBarReaderController.o); objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_NSURL", referenced from: objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_METACLASS_$_UIViewController", referenced from: _OBJC_METACLASS_$_ZBarReaderViewController in libzbar.a(ZBarReaderViewController.o); _OBJC_METACLASS_$_ZBarHelpController in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_NSURLRequest", referenced from: objc-class-ref in libzbar.a(ZBarHelpController.o);
Error: "_OBJC_CLASS_$_AVCaptureVideoDataOutput", referenced from: objc-class-ref in libzbar.a(ZBarCaptureReader.o);
Error: "_OBJC_CLASS_$_NSAutoreleasePool", referenced from: objc-class-ref in libzbar.a(ZBarCaptureReader.o);
Error: "_OBJC_METACLASS_$_UIImagePickerController", referenced from: _OBJC_METACLASS_$_ZBarReaderController in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_NSException", referenced from: objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_NSMutableArray", referenced from: objc-class-ref in libzbar.a(ZBarReaderController.o);
Error: "_OBJC_CLASS_$_UIWebView", referenced from: objc-class-ref in libzbar.a(ZBarHelpController.o);
ld: symbol(s) not found for architecture arm64
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)
Viewing all 3677 articles
Browse latest View live


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