Jump to content

Search the Community

Showing results for tags 'call back other class'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • uniGUI Public
    • Announcements
    • General
    • Feature Requests
    • Installation
    • Deployment
    • Other Platforms
  • Licensing
    • Licensing
    • Ordering uniGUI
  • Bug Reports
    • Active Reports
    • Closed Reports
    • Old Bug Reports
  • uniGUI Development
    • General Development
    • uniGUI Releases & Roadmaps
    • Utilities
  • Mobile Platform
    • uniGUI Mobile
    • Mobile Browsers
  • Users Area
    • Sample Projects
    • Components and Code Samples
    • Third Party Components
  • Non-English
    • Non-English
  • Miscellaneous
    • Hosting
    • Server Security
    • Jobs

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. [PT-BR] Boa Tarde, Estou com o seguinte problema: preciso passar uma procedure/function para ser executada como callBack de um form devido caso em que o EnableSynchronousOperations não atende ao esperado. Essa implementação ficaria como? Abaixo segue a ideia de como estou tentando fazer, porém sem sucesso. Obs.: o código abaixo é apenas um esboço para facilitar o entendimento do problema. [ENG] Good afternoon, I am having the following problem: I need to pass a procedure / function to run as a form return in case the EnableSynchronousOperations does not meet expected. This implementation would look like? Below is an idea of how I am trying to do, but to no avail. Note: The code below is just a sketch to make it easier to understand the problem. /// Eu Criei uma classe com algo parecido com o seguinte TCallBack = procedure(Sender: TComponent; Res: Integer) of object; TFrmDialogs = class(TUniForm) function MessageBox(const Text: string; pCallBack: TCallBack=Nil): Integer; end; function MessageBox(const Text: string; pCallBack: TCallBack=Nil): Integer; var vMsg: TFrmDialogs; begin vMsg.Text := vMsg; if Assigned(pCallBack) then begin Result := vMsg.ShowModal(pCallBack); end else Result := vMsg.ShowModal(); end; /// Aqui eu executo onde eu preciso (no caso em outra classe) procedure TDataModulo.DoReconectarCallBack(Sender: TComponent; Res: Integer); begin if Res <> 6 then // Não clicou Yes else begin // Clicou Yes end; end; procedure TDataModulo.Acao; begin MessageBox('Minha Mensagem!', DoReconectarCallBack); end; Desde já obrigado à quem puder ajudar [EDITED] Esqueci de colocar o problema I forgot to put the problem [dcc32 Error] uAnDialogs.pas(112): E2010 Incompatible types: 'Integer' and 'procedure, untyped pointer or untyped parameter'
×
×
  • Create New...