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

TDataModule FireMonkey

$
0
0

Olá Fernando,

Gostaria de aber se seria possível me esclarecer uma duvida sobre o uso do TDataModule em aplicações FireMonkey, estou criando uma aplicação que utiliza uma variável localizada no TDataModule e  é preenchida no create do mesmo, porém após a criação desse DataModule ao tentar ler o valor desta variável recebo uma violação de acesso, o que não ocorre na VCL. Aparentemente existe um delay na criação do DataModule no Firemonkey como posso contornar isso.  

Desde já agradeço.


How increase icon badge number when receive an push notification

$
0
0

Hello,

How increase icon badge number when receive an push notification and app closed?

I'm using Delphi Berlin and my own push server (no kinvey, etc).

Thanks!

info.plist (iOS) UIAppFonts - xml tags generated by Project > Options key/pair value

$
0
0

There is a really great tutorial here regarding how to bring in custom fonts into Android and iOS apps. 

I tried to streamline the iOS process by adding a key/value pair of UIAppFonts/myfont.ttf to Project > Options > Version Info > [myTarget].  It's really annoying to have to replace/copy/paste/rename the info.plist file every time you do a full build, because there are 6 info.plist files that need to be managed (ios32,io64,ioSimulater x 2 for debug & release) - if you want your custom fonts to consistently show during development. 

If one is to try and add a key/value pair like above, the key and string xml tags are created, but not the array tags (as seen in the linked tutorial).  The UIAppFonts xml does not work without the array tags, even if there is only 1 entry in the array. 

Is there a way to get the IDE to generate the correct tags for UIAppFonts?  It wastes time to manage this 6 files and keep other developers aware of it.

Using Delphi 10.

unable to load os X sdk

$
0
0

Recently I have installed an new Virtual disk and am in the process of setting up Delphi Berlin Update 2.  I have installed the latest version of the PA Server, Xcode and the Command Line tools for Xcode.  When installing the SDK's, I am unable to locate the OS X SDK.  Is there an issue with this or am I missing something?

 

Delphi Berlin and Microsoft Team Service

$
0
0

Hello,

 

Any were able to use the git command from the Delphi IDE with the Microsoft Team Service? I get error that he repository doesn't exist.

 

Martin

How to send files via the ServerSocket and ClientSocket in Delphi XE8?

$
0
0

Hi, I like to create, and this love programming, programming - this is my hobby.
You did a good Delphi program, I like it very much. At the moment I'm using Delphi XE8.

When I was working in Delphi 7, I had a program that can transfer the halyards on the client-server type.
And it worked, but when I moved to Delphi XE8, the code stopped working. Used ServerSocket component and ClientSocket.

I looked at the FAQ file transfer example:
http://docwiki.embarcadero.com/CodeExamples/Berlin/en/TTcpServer_(Delphi)
http://docwiki.embarcadero.com/CodeExamples/Berlin/en/TTcpClientSendStream_(Delphi)

but there used the old principle of the components of the TcpClient and TcpServer, who apparently removed from Delphi XE8.

Question: How to return the components TcpClient and TcpServer in Delphi XE8 or better how to send files via the ServerSocket and ClientSocket?
I not found anywhere normal documentation on this subject. Help me please.

Konopka VCL controls and Berlin 10.1

$
0
0

Downloaded the Konopka VCL controls through the GETIT package manager, seem to install correctly,  it is now listed as an installed component.   Problem is I cannot see ANY of the controls in the palette and cannot figure out how to add them if it is that I have to add them ?? In watching the Ray Konopka video and the items in the FORM design SHORTCUT Menu, the items above the Edit, I imagine those are there because of the VCL controls library or are those also added manually somehow.  Please help as I have spent hours searching and trying things to no avail and getting frustrated !! Eddie Muñiz

Array of TLabel objects

$
0
0

Is there a (I hope simple) way to create an array of TLabel objects? My project will have up to four labels that conceptually would lend themselves to being an array. How would one do this?

River_Forest

PS I am still unclear as to whether I should be posting here or in the Forums, but when I post here I get answers and when I post in the Forums I can't find my posting again and I never get any responses, so I must be doing something wrong in trying to use the Forums. Advice?

 

 


RAD Studio Berlin 10.1 and iOS 10: "CLASS LINKAGE ERROR"

$
0
0

Hello!

I'm trying compile my code (RAD Studio Berlin 10.1) on iOS 10 Simulator.

I got message "CLASS LINKAGE ERROR".

Heeeelp! Please!

(bugs.. bugs.. bugs everywhere)

Thanks!

What is the remote path for deploying to android phone platform

$
0
0

Using Delphi Berlin 10.1.2 on Win64 computer:

Need to deploy a file to the documents folder and the files folder on the Android phone.

The "TPath.GetSharedDocumentsPath" is the variable within program but I need to deploy these files too.

 

I have tried several but none worked so far...

 

Thanks

Garnet

 

 

Making a list of TLabel objects accessible by all methods of project

$
0
0

I need to create a list of TLabel objects that can be accessed by all the methods of a project. Assuming the project is Project1, I put the line

TLabel * labeList[4];

at the top of the Unit1.cpp file, together with all the rest of my global variables that I declare there. With that line there, the project compiles and runs fine. But then, in one of my methods I put the line

labelList[0] = new TLabel (Owner);

and when I compile that I get the error message "Delphi style classes must be constructed using operator new."

So, I moved the declaration TLabel * labelList[4] into the method where labelList[0] is to be initialized. That solves the problem in that the project compiles and runs with no error message, but when in a separate method I put the line

labeList[0]->Visible = false;

I get the error message "Pointer to structure required on left side of -> or ->* " which I take it to mean that the second method doesn't "know" that labelList[0] is a structure. So, how do I make labelList public or global (I'm not sure which is the right term) while not getting the "Delphi style classes ..." error message?es

Thanks for any help, using C++.

River_Forest

Delphi does not compile anymore

$
0
0

Dear all,

Delphi has suddenly stopped compiling:

Compiling TFK.dproj (Debug, Win32)

MSBuildToolsPath is not specified for the ToolsVersion "14.0" defined at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0", or the value specified evaluates to the empty string.

[Fatal Error] MSBuildToolsPath is not specified for the ToolsVersion "14.0" defined at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0", or the value specified evaluates to the empty string.

How can I fix this? I am using Delphi XE7 Version 21.0.17707.5020 

With best regards

Pekka

Limiting number of lines and characters in each line of Delphi Memo

$
0
0

I want to limit number of lines and characters in each lines. I have implemented code below :

procedure TForm1.Memo1KeyPress(Sender: TObject; var Key: Char);
var
  line, col: Integer;
begin
  with Sender as TMemo do
  begin
    line := Perform(EM_LINEFROMCHAR, SelStart, 0);
    col := SelStart - Perform(EM_LINEINDEX, line, 0);
    if key = #8 then
    begin
      { Do not allow backspace if caret is on first column and deleting the
                        linebreak of the line in front would result in a line of more than 25
                        characters. Inconvenient for the user but specs are specs... }
      if (col = 0) and (line > 0) then
      begin
        if (Length(lines[line]) + Length(lines[line - 1])) > 25 then
          Key := #0;
      end;
    end
    else if key in [#13, #10] then
    begin
      { Handle hard linebreaks via Enter or Ctrl-Enter }
      if lines.count >= 5 then
      begin
        { Max number of lines reached or exceeded, set caret to start of next
                                line or this line, if on the last }
        key := #0;
        if line = 4 then
          SelStart := Perform(EM_LINEINDEX, line, 0)
        else
          SelStart := Perform(EM_LINEINDEX, line + 1, 0);
      end;
    end
    else if Key >= ' ' then
    begin
      { Do swallow key if current line has reached limit. }
      if Length(lines[line]) >= 25 then
        Key := #0;
    end;
  end;
  if Key = #0 then
    Beep;
end;

procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
  line, col: Integer;
begin
  if Key = VK_DELETE then
    with Sender as TMemo do
    begin
      line := Perform(EM_LINEFROMCHAR, SelStart, 0);
      col := SelStart - Perform(EM_LINEINDEX, line, 0);
      if col = Length(lines[line]) then
        if (line < 4) and ((Length(lines[line]) + Length(lines[line + 1])) > 25) then
        begin
          key := 0;
          Beep
        end;
    end;
end;

 

But this code does not preserve Wordwrap property of Memo

Is there any elegant solution to this.

 

Prevent closing of Modal form when it calls a message dialog

$
0
0

i have an MDI application where an MDI child form  calls a normal form (as modal). when this modal form shows a messagedlg, it (the modal form) hides. i don't want it to hide. how to solve this issue ?

Many thanks for any help !

Reading big Data from Excel

$
0
0

What is the syntax for reading Data from Excel in c++? ( more then 10,000 cells)   ExcelRange* range = mWorkSheet->get_Range(TVariant(Cell1.c_str()), TVariant(Cell2.c_str()));         range->Cells ?????   range->get_Item(TVariant(z), TVariant(s)) takes a lot of time und memory.   


Fingerprints

$
0
0

How to read fingerprints in an Android application?

Can not build for Apple Store, Error E0776

$
0
0

Hi,

How to solve this error ?

Even an app with single form can not be build for Apple Store:

Delphi XE10 Berlin Update 2

PAServer 9.0.2.03

Device: iPad Air 2, iOS 10

XCode 8.2.1

Error Message:

[PAClient Error] Error: E0776 Unable to execute '"/usr/bin/xcrun" -sdk iphoneos PackageApplication -v "/Users/jayantochua/PAServer/scratch-dir/Jayanto-JayMAC/Project6.app" -o "/Users/jayantochua/PAServer/scratch-dir/Jayanto-JayMAC/Project6.ipa" -sign "iPhone Distribution: Jayanto Chua (BS7UAQWWU4)" --embed "/Users/jayantochua/Library/MobileDevice/Provisioning Profiles/7dba8793-ccf7-4eaa-8b58-54acd7d135f9.mobileprovision"' (Error 1)

[PAClient Error] Error: E0776 error: /usr/bin/codesign --force --preserve-metadata=identifier,entitlements,resource-rules --sign iPhone Distribution: Jayanto Chua (BS7UAQWWU4) --resource-rules=/var/folders/m7/3z0l6v8d1cx6d_pn_ftykbbm0000gn/T/4Y5MQj0lkU/Payload/Project6.app/ResourceRules.plist --entitlements /var/folders/m7/3z0l6v8d1cx6d_pn_ftykbbm0000gn/T/4Y5MQj0lkU/entitlements_plistoyYg2V_T /var/folders/m7/3z0l6v8d1cx6d_pn_ftykbbm0000gn/T/4Y5MQj0lkU/Payload/Project6.app failed with error 1. Output: Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)!

[PAClient Error] Error: E0776 Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!

[PAClient Error] Error: E0776 /var/folders/m7/3z0l6v8d1cx6d_pn_ftykbbm0000gn/T/4Y5MQj0lkU/Payload/Project6.app: replacing existing signature

[PAClient Error] Error: E0776 /var/folders/m7/3z0l6v8d1cx6d_pn_ftykbbm0000gn/T/4Y5MQj0lkU/Payload/Project6.app: resource fork, Finder information, or similar detritus not allowed

 

This wiki not help

http://docwiki.embarcadero.com/RADStudio/Berlin/en/E0776_Unable_to_execute_'%22/usr/bin/xcrun%22_...'

No problem for development

Regards,

Jayanto

Access to Windows 10 Store API from RAD Studio

$
0
0

Hello,

is there any supported way of accessing the new Windows 10 Store API from RAD Studio 10.1 Berlin Update 2?

Specifically, I'd like to use the API for In-App Purchases and licensing through the Windows 10 Store. The API calls I need are in the Windows::Services::Store namespace (https://msdn.microsoft.com/library/windows/apps/windows.services.store.storecontext.aspx).

I have tried including the windows.services.store.h include file from the Windows 10 SDK, but C++Builder chokes on it, both using bcc32 and clang compilers.

My app is a 32-bit desktop VCL app written C++, and I convert it to appx using the Microsoft App Converter to list it in the store.

 

Error: No mapping for the Unicode character exists in the target multi-byte code page

$
0
0

Hello,

I’m learning about restful servers and tried out this example: http://chapmanworld.com/developer-skill-sprint-restful-json-services/.

It works until I’m typing in a special character like é, è, ç, ï etc.

 What happens next depends on which version of Delphi is used to compile the client.

A client compiled with Delphi 10 Seattle will show an inversed question mark where the special character should be.

A client (exactly the same source code) compiled with 10.1 Berlin will generate an error and no data will be loaded.

See attached screen prints. Unicode_mapping_problem

Question 1: Bug in Berlin, or in Seattle?

Question 2: What should be done to process the special characters correctly?

For should it matter: I’ m working on a Dutch Windows 10 version with regional settings set to Belgian.

I came across functions like AnsiToUtf8 , AnsiToUtf8ex etc. and tried them here and there, but I found nothing that works.

Please advise.

Best regards

Patrick 

Asynpro – Link Error – Adselcom.dfm

$
0
0

Hello,

I am using Asynpro for seriell communication and everything works.

My project must be executable without DLL, so I change the following project settings.

Project-C++-Linker

With dynamic RTL left = false

Packages-Runtime-Packes

Link with runtime packages = false

After that I try to complie and following errors occur.


Error: File Adselcom.dfm not found

Error: Can not execute link


My question is, what can I do to remove these errors?

Or how can I compile my project, that no DLL are needed to execute.


Thank you for your help.

Viewing all 1963 articles
Browse latest View live


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