Jump to content

Joe Sansalone

Members
  • Content Count

    107
  • Joined

  • Last visited

Posts posted by Joe Sansalone


  1. Hi,

     

    If I set a subscription active in a transaction and then 

    execute "Select * from Table1", how do I check if a field has been updated, 

    or row has been deleted or inserted (other than using IS Updated, or IS Inserted in the SQL).

     

    Is it a new property of TDataSet or TField??

     

    Joe


  2. Hi, I'm looking to use InApp purchase in an iOS and Android app created with Delphi.

     

    According to ChatGPT, the code below will work and also work with for a subscription based purchase.

     

    IS THIS CORRECT?  

     

    uses
      FMX.InAppPurchase;

    var
      InAppPurchase: TInAppPurchase;
      ProductIdentifier: string;

    begin
      InAppPurchase := TInAppPurchase.Create;
      try
        // Set up the product identifier for the consumable IAP
        ProductIdentifier := 'com.yourcompany.yourproduct.consumable';  // <-- if subscription, 'com.yourcompany.yourproduct.subscription';

        // Request product information from the App Store
        InAppPurchase.RequestProductInfo(ProductIdentifier);

        // Wait for the product information to be returned
        while not InAppPurchase.ProductInfoReceived do
        begin
          Application.ProcessMessages;
          Sleep(100);
        end;

        // Check if the product is valid and available for purchase
        if InAppPurchase.ProductValid then
        begin
          // Show the purchase dialog to the user
          InAppPurchase.PurchaseProduct(ProductIdentifier);

          // Wait for the purchase to complete
          while not InAppPurchase.PurchaseComplete do
          begin
            Application.ProcessMessages;
            Sleep(100);
          end;

          // Check if the purchase was successful
          if InAppPurchase.PurchaseSuccess then
          begin
            // Grant the user access to the purchased content
            // or Add the item to the user inventory or  do whatever you want after the purchase
          end
          else
            ShowMessage('Purchase failed');
        end
        else
          ShowMessage('Product not available');
      finally
        InAppPurchase.Free;
      end;
    end;

     

     

    Joe

     


     


  3. Hi,

     

    I remember something in the most recent versions of Delphi, that we can enable iOS mobile 

    app to also include the top statusbar on iPhone ... make it same color like form.

     

    Do we need to set a global var in project source file?  

    If so, what is it?  I totally forgot.

     

    Thanks,

    Joe

     


  4. Hi,

     

    Using Delphi 11.2.

     

    Installed Radiant Shapes from GetIt.  

    Clicking on a class type (ex: TRadiantShape) in code does NOT bring me to the source.

     

    So I put the source location in the Browsing Path.  Still doesn't work.

    I could put the location in the Library Path but then it will compile the units every time.

     

    Isn't the Browsing Path used for jumping into source via editor when the library path has the *.dcu file location?

    This way compiles faster because using DCUs and still can look at source because in Browsing Path.

     

    Is this a 11.2 bug?

     

    Joe

     

     


  5. Hi,

     

    When compiling/deploying to iPhone, Delphi freezes at

    the step when deploying *.dSYM file.

     

    How do I fix this?

     

    Delphi 11.1  (Version 28.0.44500.8973) 

    Xcode: 13.4.1

    macOS: 12.2.1

    PAServer: 13.1.11.0

    sdk: iOS 15.5

    device: iOS 15.5

    Delphi_Freeze.png


  6. Hi,

     

    I'm writing a stored procedure to get a list of records AND

    replace some of those records with other records IF they have

    an "override" - which is indicated by other columns.

     

    When I use the stored procedure it correctly REMOVES the record

    that has an override BUT does not replace it with its override record.

     

    This indicates that I'm not writing the correct code to get new

    record and then Suspend to return that record.

     

    Below is my stored procedure ....

     

    Does anybody see the problem?

     

     

    Joe

     

     

     

    ALTER PROCEDURE OVERRIDE_LIST 
    RETURNS
    (
      ID NUMERIC(18, 0),
      DBID INTEGER,
      TABLENAME VARCHAR(15),
      DIMNAME VARCHAR(20),
      DIMVALUE VARCHAR(30),
      RECNO INTEGER,
      DATA BLOB SUB_TYPE 0 SEGMENT SIZE 1024,
      TEXT BLOB SUB_TYPE TEXT SEGMENT SIZE 80,
      REFID NUMERIC(18, 0),
      ISROOT BOOLEAN
    )
    AS
    declare variable I NUMERIC(18, 0);
      declare variable R NUMERIC(18, 0);
    begin
      For select ID, DBID, TABLENAME, DIMNAME, DIMVALUE, RECNO, DATA, TEXT, REFID, ISROOT
      From DN
      into :ID, :DBID, :TABLENAME, :DIMNAME, :DIMVALUE, :RECNO, :DATA, :TEXT, :REFID, :ISROOT
      Do
      begin
        i = :ID;
        R = 0;
        execute procedure Override :i Returning_Values :R;

        if (:R is not null) then
        begin
          for select ID, DBID, TABLENAME, DIMNAME, DIMVALUE, RECNO, DATA, TEXT, REFID, ISROOT
          From DN where ID = :R
          into :ID, :DBID, :TABLENAME, :DIMNAME, :DIMVALUE, :RECNO, :DATA, :TEXT, :REFID, :ISROOT
          do
            Suspend;
        end
        else
          Suspend;    
      end
    end^


  7. Things were working before.

    I think there was an update for Xcode to install command line tools

    and also I updated to the latest 11.1 patch which required a re-install of PAServer.

     

    The connection to PAServer is fine.

     

    Don't know what this error is:

     

    [PAClient Error] Error: E6664 xcode-select: error: tool 'actool' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

     

     


  8. Hi,

     

    I need to add a license to Delphi. But the computer does not have access

    to the licensing server via the internet because it has restricted internet access (corporate environment).

     

    Can I register the license on some website, then get some file and copy it to that machine?

     

    Thanks,

    Joe


  9. Ok. Thanks.

     

    I noticed that some packages are installed without any components.

    And they are not used by other packages.

    Example:  AWS SDK (from GetIt).

     

    In a case like AWS SDK, the package doesn't need to be installed, right?

    If compiling without runtime packages, we are accessing DCUs or PAS files.

    In the case of compiling with runtime packages, we simply need access to the bpl/dcp files.

     

    Why are those packages installed?

     

×