Jump to content

Is Unigui Frame Thread Safe ? (important !!!)


Abaksoft
 Share

Recommended Posts

Hi Farshad,

 

Is it true, otherwise can i add  a form instance like this :

function UniFrame1: TUniFrame1;    >>>   GetFormInstance

 

As :

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics,
  Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
  uniGUIClasses, uniGUIFrame;

type
  TUniFrame1 = class(TUniFrame)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

function UniFrame1: TUniFrame1;

implementation

{$R *.dfm}

uses
  MainModule, uniGUIApplication;

function UniFrame1: TUniFrame1;
begin
  Result := TUniFrame1(UniMainModule.GetFormInstance(TUniFrame1));
end;


end.

thx...

Link to comment
Share on other sites

Hi Farshad,

Here is a classical exemple (like AllFeatures Unigui DEMO): 

One TreeView on the MainForm,  where onClick event gives Frames (parent = mainForm).

 

My question is :

 

By the simple fact that all these Frames have mainForm as Parent,

the code inside these Frames will be Thread Safe (without global variable ofcourse) ?

 

Thank you again...

Frames.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...