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

How to create installation package and update database connection easily?

$
0
0

Two questions: 1.) Is he FireDAC database connection information stored somewhere or I have to open FDExplorer to see it? The reason is if I can easily update the connection information via notepad.  When copying the executable to the user's machine, how to update the database connection. 2.)  How to create installation package for the user to run on his/her machine? Thank you.  


Problem with Delphi TDBCheckBox

$
0
0

I use a frame component on which there is a TScrollBox. Data controls are placed on this at runtime. I have recently had a problem with TDBCheckBox where it may conditionally be assigned a color. In Debug mode color is applied correctly. In Release mode, no color is applied.

In design mode, a TDBCheckBox does not respond to the color property. Any ideas!

This applies with Tokyo 10.2 (before and after Release 1).

From John White

change the text color within my listviewitem (DynamicAppearance)

$
0
0

i'm trying to change the text color within my listviewitem (DynamicAppearance) for a text object. I have multiple text objects in the listviewitem . I'm using the below code    Procedure TFGestaoInsp.ListarObras; var    LItem  : TListViewItem;   begin        LVObras.BeginUpdate;      DM.qryAux.SQL.Clear;    DM.qryAux.SQL.Add('Select * From Zonas Order By DescZona limit 50');    DM.qryAux.Open;      LVObras.Items.Clear; //Items;        while not DM.qryAux.eof do    begin           try           LItem               := LVObras.Items.Add;             LItem.Data['Text6'] := '1';           {           TListItemImage(LItem.Objects.FindDrawable('Image6')).ImageIndex := 0;           TListItemImage(LItem.Objects.FindDrawable('Image7')).ImageIndex := 1;           TListItemImage(LItem.Objects.FindDrawable('Image8')).ImageIndex := 2;           TListItemImage(LItem.Objects.FindDrawable('Image9')).ImageIndex := 3;           TListItemImage(LItem.Objects.FindDrawable('Image10')).ImageIndex := 4;           TListItemImage(LItem.Objects.FindDrawable('Image11')).ImageIndex := 5;           TListItemImage(LItem.Objects.FindDrawable('Image12')).ImageIndex := 6;           TListItemImage(LItem.Objects.FindDrawable('Image13')).ImageIndex := 7;           TListItemImage(LItem.Objects.FindDrawable('Image14')).ImageIndex := 8;           }               LItem.Data['Text1'] := DM.qryAux.FieldByName('DescZona').AsString;           LItem.Data['Text2'] := 'C1 NC2 NA3';           LItem.Data['Text3'] := '17.08.29';           LItem.Data['Text4'] := '';             TListItemText(LItem.Objects.FindDrawable('Text2')).TextColor := TAlphaColorRec.Red; //TAlphaColorRec.Green;               LItem.Tag := DM.qryAux.FieldByName('IdZona').AsInteger;         finally         end;           DM.qryAux.Next;    end;      LVObras.EndUpdate;    DM.qryAux.Close;      TabPrInsp.ActiveTab := TabListaInsp;     end;

File transfer from Android back to PC

$
0
0

Having edited my test sqlite database on Android devices, I'd like to copy them back to the PC (to check them).

But Windows explorer (via the USB connection) hides the contents of the Application folders on the Android devices.

I cannot find any security setting that lets me see files the I made with MY application, and Firemonkey documentation only talks about deployment OUT rather than allowing anything to be copied back.

Is there any easy way to copy files within our own application's folders back again?

 

John

ID: 30781, FireMonkey Android Compatibility Patch for RAD Studio 10.2

$
0
0

 

Do I need to install this patch on the Delphi Tokio 10.2.1 ?

frxclass not found

$
0
0

I am not able to compile fastreports VCL because the fastreport Units are not found. May be a path is missing. What should I do?

I have installed RAD Tokyo. The fastreport components are visible and I can see the preview when I click the fastreport compinent. But no compilation is possible.

i'm trying to change the text color within my TListBoxItem

$
0
0

i'm trying to change the text color within my TListBoxItem and not working,,,

 

procedure TFGestaoInsp.Test;

var

 

  wItem       : TListBoxItem;

 

begin

    MyTListBox.BeginUpdate;

 

     MyTListBox.Items.Clear;

     wItem      := TListBoxItem.Create(MyTListBox);

     wItem.Text := 'Text with new color';

     wItem.FontColor := TAlphaColorRec.Green;

     wItem.ItemData.Detail := '....';

      wItem.StyleLookup := 'listboxitembottomdetail';

 

     MyTListBox.EndUpdate;

end;

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?


Upgrade?

$
0
0

I have C++Builder 2009 for Windows, but have recently changed over to an iMac. Is there an upgrade to this software for Mac.?

Error Message E2039

$
0
0

I have created a program with several forms.  Everything went okay until I tried to compile the code for the final form.  Now, at the end of the code lines, I get the error message, "Declaration expected but end of file found".  I have done everything possible including deleting that piece of code.  When I do that the message then appears at the end of the preceding section of code.  When I delete the form completely along with the associated code, the message then appears at the end of the code for the preceding form.  I am at my wit's end as to how to correct this.  An instructor for an online course that I took suggested that it might be a bug in the software.  Can anyone offer any suggestions.  I am just learning to code and don't have much experience yet.  Thanks in advance for any help available.

FMX Form2.Show

$
0
0

Hello i'm trying to create android mobile application with two form... and to show the second form ... i use the phrase Form2.Show ; but the form2 dosn't shows... but if i touch the screen the form2 shows.... so ... maybe the UI must be Updated.... so i write this code...  TThread.Synchronize(nil,            procedure            begin              Form2.Show;            end);   but ..... no thing is happend..

How to receive parameters from an external application through an Intent? Firemonkey

$
0
0

Hello, I would like to know how I can get parameters from an external application in android through the "Intent.getExtras (JStringtoString ('resultCode'))" or "Permit the result of an Intent with the" SharedActivity.startActivityForResult (intent, 0); " I'm using Delphi 10.2 with object pascal.

 

Thanks for the help.

JSON problem using runtime package rtl250.bpl (Tokyo 10.2 update 1)

$
0
0

Here's a sample console application demonstrating my problem:

program Project5;

{$APPTYPE CONSOLE}

{$R *.res}

uses
    System.SysUtils
  , System.JSON;
var
  JSONArray : TJSONArray;
  JSONObject : TJSONObject;
begin
  try
    JSONArray := TJSONArray.Create;
    try
      JSONObject := TJSONObject.Create;
      JSONArray.Add(JSONObject);
    finally
      JSONArray.Free;
    end;
  except
    on E: Exception do
      Writeln(E.ClassName, ': ', E.Message);
  end;
end.

I set a breakpoint at the line:

      JSONArray.Add(JSONObject);

then run the application. When I step into (F7) the JSONArray.Add method, I correctly get taken to the beginning of this method in the System.JSON unit:

 

function TJSONArray.Add(const Element: TJSONObject): TJSONArray;
begin
  if Element <> nil then
    AddElement(Element)
  else
    AddElement(TJSONNull.Create);
  Result := Self;
end;

 

However, ff I compile and run this application using the RTL runtime package (rtl250.bpl) stepping into the same breakpoint, I incorrectly get taken to the end of this method:

function TJSONArray.Add(const Element: Boolean): TJSONArray;
begin
  if Element then
    AddElement(TJSONTrue.Create)
  else
    AddElement(TJSONFalse.Create);
  Result := Self;
end;

Can someone explain why this is happening and suggest a workaround?

Thanks,

Steve

Dual Monitor/Dual IDE issues

$
0
0

I have 2 instances of the IDE open because I'm working on a client and a server.  Also have dual monitors.  This is Delphi 10.  Let's say I have the client project on monitor 1, and the server project on monitor 2.  Default and debug layouts are saved as monitor 1. 

Because of this, my server project which is open in monitor 2, moves to monitor 1 in debug mode.  If I save the debug layout as monitor 2, then my client project on monitor 1 will move to monitor 2 in debug.  I just want the IDE to stay in whatever monitor it starts in no matter what debug/default/whatever mode/layout I'm in. 

I don't recall having this problem in XE8 or XE7.

Is there a setting I'm missing?

Commands out of sync in Tokyo

$
0
0

UPDATE Berlin to Tokyo Several MySQL-calls returns error message: Commands out of sync. This happens in the programming environment and in the resulting program.  SQL commands like stored procedures CALL MyStoredPrecedure(par1,par2,par3) returning a single recordset. Par example code example:       query.close;     query.sql.text:= sqlQuery;     query.open;  // Error message Commands out of sync On internet this problem is addressed. The named solutions are impossible for Delphi programs using grids. The message should have something to do with running two queries simultaneus; Don't fetching the result of a query; etc. Some people suggest it has something to do with hiding of another warning/error by this one. The command can execute on the command line without any problem. In Tokyo they crash immidiately.  Question: How to get rid of this unwanted message. 


play sound in android

$
0
0

hello .... why this code is not working in Tokyo 10.2 .... but working in seattle 10.0

procedure TForm1.Sound;

{$ifdef android}

var

AudioObj: JObject;

Audio: JAudioManager;

{$endif}

begin

{$ifdef android}

  AudioObj:= TAndroidHelper.Activity.getSystemService(

      TJActivity.JavaClass.AUDIO_SERVICE);

  Audio := TJAudioManager.Wrap((AudioObj as ILocalObject).GetObjectID);

  Audio.loadSoundEffects;

  Audio.playSoundEffect(0);

  //0 - http://developer.android.com/intl/ru/reference/android/view/SoundEffectConstants.html

  {$endif}

end;

 

Tokyo dynamic listview

$
0
0

i have a dynamic listview with two image .... how i can deal with them by code ?

problem with Zeos Libary

$
0
0

for updating an older delphi 5 project I need the Zeos Libary. I got an parallel installation of Delphi 5, XE6 and (now) XE10.2 . it works fine. But installing ZeosLib components do not work. Zeos appears in "Package" List, but it is empty. The components do not appear in the "Tool-Palette". Everybody tells me this works fine, but not on my Delphi installation. For Test I installed XE6 complete new on an "blank" PC, then installed the ZeosLib in the same manner as before, this works instantly. So I think there is somethin wrong. This is the same on BOTH installations, on XE6 and XE10        

Enterprise Data Dictionary and Data Domains

$
0
0

Hi,Firstly, I am very new to the data architect world, coming from an Oracle developer background, so please bear with me.I have a question I would like to ask about ER/Studio, but it is probably more about a general approach than anything.I am creating an Enterprise Data Dictionary for a reverse-engineered database.I have started creating Data Domains, and then binding them to the columns in the physical model.The reverse-engineered database is a bit of a mess tbh, and there are columns that mean the same thing with different column names.For instance there is a Book Title which is held as TITLE_FULL, TITLE, TITLE_WORK etc in different tables.I would like to create a Domain "TITLE" which I then bind to all of the Title columns across the tables.When I start binding the Domain to the columns, the column names in the physical model change to what the Domain name is (sometimes, sometimes not curiously) - there is obviously a setting in ER/Studio "synchronize Domain and Attribute/Column Names".But I dont necessarily want to change the column names in the database, just to ensure they follow the Domain attributes.So first question...is my approach completely wrong?, should I be creating the dictionary/domains against the logical model first in this case, and then if/as we change the physical model bind them there too?Also I was wondering if there was a way to report out of ER/Studio which columns do not conform to a specific domain?  ...or would you just achieve this by querying oracle's built in data dictionary.I would also like to ask if there any good training resources or reading material around (preferably not in the US), or specific training courses in ER/Studio, I cannot seem to find much when I google.Any answers or feedback would be much appreciated.Again apologies for my lack of knowledge on the subject!

Try Exception doesn't work properly in Android

$
0
0

Hi, my name is Marcos Maresch and I started few days ago to develop mobile apps with Tokyo.

 

I'm using tradicional Try... Exception... to handle errors in my apps, but Android simply ignore it.

 

  Try

    wsServico := GetIService;

  except

    on E: Exception do

    begin

      showmessage(E.Message);

      exit;

    end;

  end;

 

 

Am I doing something wrong or there's another way to handle errors in Firemonkey?

 

 

Thanks, regards, Maresch

 

Viewing all 1888 articles
Browse latest View live


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