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

Exit from try finally - by: Robert

$
0
0
procedure someProc;
var
exitFlag : boolean;
begin
exitFlag := false;
Try
if not something then
begin
exitFlag := true;
Exit;
end;
do_something;
finally
do_something_else;
end;
if exitFlag then Exit; <--- Does not reach this point and exits and continues with calling procedure. Why?
end;

WebAssembly - by: Danijel

$
0
0
QT already porting their framework to WASM.
blog.qt.io/blog/2018/05/22/qt-for-webassembly-examples/

RemObjects Oxygene already has a compiler for WASM.
blogs.remobjects.com/2018/01/12/webassem...gene-in-the-browser/

I can't figure why Embarcadero doesn't see this big opportunity for FireMonkey. Finally, is possible to have real RAD tool for the web without compiling to JavaScript but you ignore this.

I'm using Delphi since version 1.0 and Turbo Pascal since version 3 and I really love Delphi but I was disappointed.

Why does it take SO VERY LONG for posts to show up - by: dave

$
0
0
Hello All

Like the subject says: Why does it take so very long for a new post to show up in the forums. On the weekend when we are trying to get stuff done, the new post takes hours if ever. Also, there is no way to check if the post went out. Also the post does not show up in profiles.

Whats up?
Am I doing something wrong?
It shouldn't be this hard.

Thanks for a good product, but can you tune up the forum?

Linker conflict between 2 static libraries - by: Chris

$
0
0
I have a Firemonkey app for iOS and Android on the app stores which uses the JVE AdMob components to allow us to show AdMob ads in our app.


We're about to run a Facebook campaign so need to integrate the FacebookSDKs and have managed to download and integrate the SDK without too many problems. The issue now is that something in the FacebookSDK is interfering with the GoogleMobileAds SDK used by the JVE AdMob banner.


I don't have much expertise in solving linker issues with static libraries in Delphi so wonder if anyone could point me in the correct direction to try to solve this?


The error is a duplicate symbol one. Am I correct to think that the clash is between a symbol in Bolts (BFCancellationToken.o) and libGoogleMobileAds.a (GADGestureUtil.o)? Is there any way to find out what the symbol that's actually being duplicated is? I can't imagine there's a function something called "I011" in those libraries??


The linker error is:


duplicate symbol l011 in:
C:\Users\x\Documents\Embarcadero\Studio\SDKs\iPhoneOS10.0.sdk\System\Library\Frameworks/Bolts.framework/Bolts(BFCancellationToken.o)


libGoogleMobileAds.a(GADGestureUtil.o)


ld: 161 duplicate symbols for architecture arm64
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)

Thank you in advance!

Apollo database - have they gone bust? - by: Cayman Venture Limited

$
0
0
Has anyone heard from or dealt with ApolloDB recently? I use their components in some of my apps but I'm unable to upgrade and can't reach them.

Thanks, Graeme.

GLscene to run in browser - by: Sergio

$
0
0
I converted a Delphi code from my Delphi Seattle to run in the browser . I used Delphi + Intraweb + Bootstrap and works more or less well. I am still learning some tricks but it works. Soon I will publish in the web. For running some Delphi codes (their exe) works fine in my computer but when I try to put the file in the provider directory something do not work well. So I am now trying to really convert the full Delphi code to Delphi + Intraweb + Bootstrap which is possible but hard to do. I am now arriving to the GLscene part of the code. The question : Do you know if there are "GLscene for Web " components even if not free ? Thanks in advance for any information
An example of cgi-app directly as suggested above would help me. I tried to find but did not succeeded. Thanks in advance

App Complexity: VCL vs MFC - by: Robert

$
0
0
Hi,
Delphi user since Delphi 1, Web hacker for a few years.

I needed some fresh web tools as HTML5 Builder died about 5 years ago. I started looking around at various frameworks for PHP. (I don't like the language but it runs everywhere, even on ultra low cost shared servers.)

As I looked at the Zend framework and Cake I really appreciated how a "New VCL Application" click does so much behind the scenes. (I always knew it did a lot, Zend just reminded me.)

Is a desktop application inherently less complex than a MVC framework application? Any serious users of both out there who can comment?

Thanks,
Bob K.

latest Apple Mac operating system Mojave - by: dave

$
0
0
Hello all

I am using the community edition of C++ Builder 10.2. I have been able to make ios apps with it. I have not upgraded to the latest operating system Mac OS Mojave yet because I am worried about the process still working.
I see that Mojave is now 64 bit and might not be able to do 32 bit programs.

Has anyone here upgraded and seen that the whole process works?

FMX play video using FullScreen - by: matrix

$
0
0
I'm trying to play a full screen video in fmx but when

BorderStyle: = None
or
Form1.Fullscreen := True

MediaPlayerControl1 disappears by playing audio only


Please Help!!!

Apple Mac OS Mojave compatibility with C++ builder - by: dave

$
0
0
Hello All

I am using community edition of C++ Builder to build ios apps. I still have High Sierra os on my macbook pro. I am waiting before upgrading to Mojave. I read that Mojave is for 64 bit apps. Platform Assistant is 32 bit. Will there be a problem for my laptop to work with C++ Builder to make apps with Mojave?

Has anyone here upgraded without problems?

What does Embarcadero say about Mojave and Rad Studio/C++ Builder?

Android : Getting a result from a MessageDialog - by: Frank

$
0
0
Anyone know how to actually get a result from a MessageDialog? I see other apps using dialog boxes so there must be a way. I've searched the web and found nothing useful so far.

thread in delphi - by: Adam

$
0
0
Hello,

I am having difficulty to understand how Delphi thread works; I appreciate all helps I get.
Looks developing window service on Delphi requires thread, I have one posted previously and works,
I have few hundreds rows in a table, looping through each row and creating few objects for each row and free them after process complete.
If you look to the code below, you will see I call Processfile within loop every minute, some rows takes more than a minute to complete.
My question, how thread works in this situation? Is the thread handle each call separately, kind of process and go away after done?
===================================== code below ==================

unit mainsrv;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.SvcMgr, Vcl.Dialogs, Forms, ABSMain, Data.DB;

type
TRssReceiver = class(TService)
ABSTable1: TABSTable;
ABSDatabase1: TABSDatabase;
procedure ServiceAfterInstall(Sender: TService);
procedure ServiceStart(Sender: TService; var Started: Boolean);
procedure ServiceStop(Sender: TService; var Stopped: Boolean);
procedure ServiceShutdown(Sender: TService);

private
{ Private declarations }
RssReceiverThread: TThread;
public
function GetServiceController: TServiceController; override;

{ Public declarations }
end;

var
RssReceiver: TRssReceiver;
SecondThread : TSecondThread;

implementation
uses
Winapi.WinSvc, SyncObjs;
{$R *.dfm}
type
TRssReceiverThread = class(TThread)
private
TermEvent: TEvent;
procedure Getlistoffileandprocess;
protected
procedure Execute; override;
procedure TerminatedSet; override;
public
constructor Create;
destructor Destroy; override;
end;

constructor TRssReceiverThread.Create;
begin
inherited Create(False);
TermEvent := TEvent.Create(nil, True, False, '');
end;

destructor TRssReceiverThread.Destroy;
begin
TermEvent.Free;
inherited;
end;

procedure TRssReceiverThread.Execute;
var
Interval: Integer;
begin
Interval := 60000; // check every minute
while not Terminated do
begin
if TermEvent.WaitFor(Interval) = wrTimeout then
Getlistoffileandprocess;

end;
end;
procedure TRssReceiverThread.Getlistoffileandprocess;
begin

RssReceiver.ABSDatabase1.Connected:=True;
RssReceiver.ABSTable1.Open;
RssReceiver.ABSTable1.First;

while not RssReceiver.ABSTable1.Eof do //over 300 files
begin
Processfile( RssReceiver.FieldByName('filepath').asstring, RssReceiver.FieldByName('filetype').asstring);
RssReceiver.ABSTable1.Next;
end;


end;
procedure TRssReceiverThread.Processfile(filepath, filetype:string);
var
Filelist:TABSTable;
Processlist:TABSTable;
begin
//here I have many steps, something like this

try
Filelist:=TABSTable.create(nil);
Processlist:=TABSTable.create(nil);
// do the work for each path.

Finally
Filelist.free;
Processlist.free;
end;


end;

procedure TRssReceiverThread.TerminatedSet;
begin
TermEvent.SetEvent;
end;

{ Service controller procedures. }

procedure ServiceController(CtrlCode: DWord); stdcall;
begin
RssReceiver.Controller(CtrlCode);
end;

function TRssReceiver.GetServiceController: TServiceController;
begin
Result := ServiceController;
end;

procedure TRssReceiver.ServiceAfterInstall(Sender: TService);
var
hSCM, hService: SC_HANDLE;
Desc: SERVICE_DESCRIPTION;
begin
hSCM := OpenSCManager(nil, nil, SC_MANAGER_CONNECT);
if hSCM <> 0 then
try
hService := OpenService(hSCM, PChar(Self.Name), SERVICE_CHANGE_CONFIG);
if hService <> 0 then
try
Desc.lpDescription := 'The service installed.';
ChangeServiceConfig2(hService, SERVICE_CONFIG_DESCRIPTION, @Desc);
finally
CloseServiceHandle(hService);
end;
finally
CloseServiceHandle(hSCM);
end;
end;

procedure TRssReceiver.ServiceShutdown(Sender: TService);
begin
if RssReceiverThread <> nil then
begin
RssReceiverThread.Terminate;
while WaitForSingleObject(RssReceiverThread.Handle, Self.WaitHint) =
WAIT_TIMEOUT do
ReportStatus;
FreeAndNil(RssReceiverThread);
end;
end;

procedure TRssReceiver.ServiceStart(Sender: TService; var Started: Boolean);
begin
RssReceiverThread := TRssReceiverThread.Create;
Started := True;
end;

procedure TRssReceiver.ServiceStop(Sender: TService; var Stopped: Boolean);
begin
ServiceShutdown(Sender);
Stopped := True;
end;

end.

ListBox Item with Visual Customized include OnClick - Interessant use! - by: Emailx45

$
0
0
hello people,

I found one project interessant using ListBox in Firemonkey project with Items customized, where you can have individual actions for each item.

look that:

Screenshots [ Click to hide ]


Components FireMonkey [ Click to hide ]

project Firemonkey very simple



... and the rest is only code
oload.site/f/VAz2yC1R-O0/ListBox_Item_Customized.rar

HttpApp.HttpEncode is encoding backslash and other characters... - by: Rael

$
0
0
Hi,

Code:
uses
Web.HTTPApp, IdURI;

Memo1.Lines.Add( TIdURI.URLEncode(' mydomain.com/my subfolder/'));
Memo1.Lines.Add( HttpEncode(' mydomain.com/my subfolder/'));

Output:
mydomain.com/my%20subfolder/
http%3A%2F%2Fmydomain.com%2Fmy+subfolder%2F

Indy correctly, only encode the space character. What is going on with HttpEncode that it is also encoding : and / characters?

Using Delphi XE4. Is it a bug in XE4?

Thanks
Rael

Delphi 10.2 Update 2 Win32 compiler failing badly - by: Jouni

$
0
0
My colleagues are experiencing problems getting working code compiled with the Win32 compiler (Delphi 10.2 Update 2) on their Windows 10 environments. The code can give strange access violations in basic things like 'TStringList.Create'. The same code, compiled with Win64 works fine.

I couldn't find any information of a known problem. Anyone else experiencing this or knows more about it?

No SDKs could be found - by: Gerák

$
0
0
Hello,

I want to try iOS programming with Delphi 10.2.
I installed XCode, Command Line Tools, PAServer on OSX 10.13.
In Delphi, in the connenction Profile Manager, i define the OSX connection, test is successful.
After it, i go to SDK manager, select IOS simulator platform, OSX connection, and i immediately receive "No SDKs could be found for the iOS Simulator platform. Did you install the Command Line Tools on your XCode?" message. iOS Device 32/64 bit option instead iOS simulator has the same result.
What can be wrong?
Thanks for the help.
Csaba

String to bitmap - Difference between win64 and fire monkey platform - by: Luis

$
0
0
How to decode a string into a bitmap?

I 've managed to do this under the Win-64 platform, but the same code fails under the firemonkey platform. Any thoughts?

Got scared of a false message after login attemp. Someone else experienced this? - by: Kai Inge

$
0
0
Hello. Earlier this day I tried to log in to ask if FastReport is a russian product. I got problems when installing it, making me think that I got something else than ordered. :-) Especially when afterwards beeing misled to believe I was blacklisted without reason in this forums. :-)

The message is attached as a picture. So the question: Is FastReport russian? Frankly when googling the firm FastReport I think it may be easy to be caught in say a mis-spelling of the name and then come to a fake site? Is it just me beeing paranoid? :-) Well, I think that the worst that can happen to a single developer is bringing viruses along with his programs without knowing it, Better safe than sorry. :-)

Missing functions - by: Greg

$
0
0
I am having problems with the linker not finding some functions in <cmath>. Other people have reported similar things. I wrote a little console-mode program to test the compiling and linking of all <cmath> functions, as defined in Table 119 of the C++11 standard.The program is attached. I compiled using the 32-bit CLANG compiler in both debug and release mode. The main results are these:



This seems like way too many problems to have with a standard header. Am I missing something?

Greg Reese

IBTable change index - by: Robert

$
0
0
Hi:

IBTable open with dbgrid attached. Want to change index.

Selecting index from list.



Changing indexname does nothing to table. Changing indexname then trying refresh erros table not open.

Setting active after closing fails. Closing appears to lose all the properties on database tablename etc.

What is proper way to do this?

Save table propertiies.
Close table.
Restore properties
Set new index
Open table
Viewing all 3677 articles
Browse latest View live


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