Jump to content

RobYost

uniGUI Subscriber
  • Posts

    207
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by RobYost

  1. The code below only gives me an error if I have more than one session that uses the same frame fraTenantDetails.

     

    Do I have something declared that is used in multiple sessions?  If so, where would I look?

     

     

     

            if (fraTenantDetails = nil) then
              fraTenantDetails := TfraTenantDetails.Create(self);

            fraTenantDetails.Align := alClient;
            fraTenantDetails.Parent := tsTenant; <===This line fails

     

    tsTenant is a TUniTabSheet

    fraTenantDetails is a TUniFrame

     

     

    Project  raised exception class EAssertionFailed with message 'TUniSimplePanel.SetParent(): Parent.OwnerForm must be same as Self.OwnerForm (H:\Framework\uniGUI\Source\Core\uniGUIClasses.pas, line 4837)'.

     

     

  2. Thanks.  I made a new control that uses the system configuration of currency if anyone is interested.

     

    I'm new to controls, so if you see a problem with this let me know.

     

     

    unit UniCurrencyEdit;

    interface

    uses
      SysUtils, Classes, uniGUIBaseClasses,
      uniGUIClasses, uniEdit;

    type

      TUniCurrencyEdit = class(TUniFormattedNumberEdit)
      private
      protected
        { Protected declarations }
      public
        constructor Create(AOwner: TComponent); override;
      published

      end;

    procedure Register;

    implementation

    constructor TUniCurrencyEdit.Create(AOwner: TComponent);
    begin
      inherited;
      case (formatsettings.CurrencyFormat) of
        0:
          begin
            FormattedInput.CurrencySignPos := cpsLeft;
            FormattedInput.CurrencySignSpace := crsNone;
          end;
        1:
          begin
            FormattedInput.CurrencySignPos := cpsRight;
            FormattedInput.CurrencySignSpace := crsNone;
          end;
        2:
          begin
            FormattedInput.CurrencySignPos := cpsLeft;
            FormattedInput.CurrencySignSpace := crsAvailable;
          end;
        3:
          begin
            FormattedInput.CurrencySignPos := cpsRight;
            FormattedInput.CurrencySignSpace := crsAvailable;
          end;

      end;
      FormattedInput.ShowCurrencySign := True;
      FormattedInput.CurrencySign := FormatSettings.CurrencyString;
      ThousandSeparator := FormatSettings.ThousandSeparator;
      DecimalSeparator := FormatSettings.DecimalSeparator;
      Alignment := taRightJustify;
    end;

    procedure Register;
    begin
      RegisterComponents('UniAddOns', [TUniCurrencyEdit]);
    end;

    end.

  3. ---------------------------
    Debugger Exception Notification
    ---------------------------
    Project -.exe raised exception class EAssertionFailed with message 'TUniSimplePanel.SetParent(): Parent.OwnerForm must be same as Self.OwnerForm (H:\Framework\uniGUI\Source\Core\uniGUIClasses.pas, line 4837)'.
    ---------------------------
    Break   Continue   Help   
    ---------------------------
     

    I reduced it down to this.

     

    procedure TfraTIncome.btnNewChargeClick(Sender: TObject);
    var
      aFrame: TUniFrame;
      aTempModalForm: TUniForm;
    begin
      aTempModalForm := TUniForm.Create(UniApplication);
      aFrame := TUniFrameClass(TUniFrame1).Create(self);
      aFrame.Parent := aTempModalForm ;
    end;

  4. I created a demo project with only a TUniImageList and at TUniBitBtn

     

    In UniImageList1 I added a bmp

     

    I set the images to UniImageList1

    and the index to 0

     

    nothing shows up on the button.

     

    If I use the Glymph property and select the same bmp file it works.

  5. How do you know which node has been selected on a right click?

    This is the code I was using in VCL

     

    procedure TfrmMain.treeBuildingMouseDown(Sender: TObject; Button: TMouseButton;  Shift: TShiftState; X, Y: Integer);
    var
      aNode: TUniTreeNode;
      P:     TPoint;
    begin

      if (Button = mbRight) then
      begin
        aNode := treeBuilding.GetNodeAt(X, Y);
        if (aNode <> nil) then
        begin
          treeBuilding.Selected := aNode;
          P.X := X;
          P.Y := Y;
          P := treeBuilding.ClientToScreen(P);
          popNewEntity.Popup(P.X, P.Y);
        end;
      end;
    end;

  6. I don't know how to select a node in TUnimNestedList.

     

    When you touch a node it shows the nodes under it.

     

    Sometimes you might want to get to those nodes, but sometimes you may want to select it.

     

     

    a

       b

       c

          d

          e

          f

     

     

    when you click on c it displays d, e, f

    I may want to select c

    or I may want to select e

  7. I have found a more simple way:

     

    CTRL-F9 (compile project)

    Run->Load Process  (select run at the bottom)

     

    This starts the exe and connects the debugger to it.

    The added bonus if it is connected to the debugger is that when I close the program it stops the exe, so when I recompile it doesn't say it is in use.

     

    Down to just 2 steps.  If anyone knows how to set a shortcut key to the "load process..." that would help.

  8. I created a new project and selected 'Stand Alone Server'

     

    When I click run, it compiles and starts an executable.

    I then have to click Run ...Attach to process

    Then it opens the CPU file

    And I have to click run (continue)  again.

     

    This works fine.  I just wanted to know if this is how everyone debugs

    or maybe there is a better way to do this.

     

    Thanks

  9. Yes, I think that is what I chose when I created the program.  Is there a way to turn it to standalone for testing, then switch it to Service or ISAPI when it is ready to deploy?

  10. I am new to UniGui, just started using the trial.  

     

    I can debug the program, but I must click run, then run->attach to process.

     

    Is there a way to run and get it to attach to a process automatically?

×
×
  • Create New...