Jump to content

Mobile form + UniFrame = ExtEvents not work


nimarufa

Recommended Posts

When i place Frame on mobile form clientEvents are not working. For Example Ext.panel.Panel afterlayout event.

for example 

function afterlayout(sender, layout, eOpts)
{
	alert('AF event!');
}

Frame is creating like this 

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  CFrame := TMymFrame.Create(self);
  CFrame.Visible := true;
  CFrame.Parent := self;
end;

On desktop form events are working.

Link to comment
Share on other sites

Can you check this approach ?:

procedure TMymFrame.UniFrameCreate(Sender: TObject);
begin
  if not UniSession.IsMobile then
    ClientEvents.ExtEvents.Add(
      'afterlayout=function afterlayout(sender, layout, eOpts)'+
      '{'+
      '	alert(''Frame event (desktop)!'');'+
      '}'
    )
  else
    ClientEvents.ExtEvents.Add(
      'painted=function painted(sender, element, eOpts)'+
      '{'+
      '	alert(''Frame event (mobile)!'');'+
      '}'
    );
end;

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...