dbf_usr Posted December 12, 2020 Share Posted December 12, 2020 20 hours ago, Sherzod said: Вы спрашиваете для десктопной версии? Да. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 12, 2020 Share Posted December 12, 2020 26 minutes ago, dbf_usr said: Да. В десктопном все гораздо проще, я попробую проанализировать. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 13, 2020 Share Posted December 13, 2020 14 hours ago, dbf_usr said: Да. Здравствуйте, Попробуйте этот код: procedure TUniForm1.UniFormCreate(Sender: TObject); begin //создание события активации формы для отслеживания UniSession.AddJS( 'if (uniVars._obs) {uniVars._obs.destroyObservable()};'+ 'uniVars._obs = Ext.mixin.Observable.observe(Ext.Container, {'+ ' destroy: function() {'+ ' if (arguments[0].uname == "window") {'+ ' ajaxRequest('+ Self.WebForm.JSName +', "getActiveForm", ["activeForm="+Ext.WindowManager.getActive().owner.uname]);'+ ' }'+ ' }, show: function() {'+ ' if (arguments[0].uname == "window") {'+ ' ajaxRequest('+ Self.WebForm.JSName +', "getActiveForm", ["activeForm="+arguments[0].owner.uname]);'+ ' }'+ ' }'+ '});' ); end; Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted December 13, 2020 Share Posted December 13, 2020 5 hours ago, Sherzod said: UniSession.AddJS( 'if (uniVars._obs) {uniVars._obs.destroyObservable()};'+ 'uniVars._obs = Ext.mixin.Observable.observe(Ext.Container, {'+ ' destroy: function() {'+ ' if (arguments[0].uname == "window") {'+ ' ajaxRequest('+ Self.WebForm.JSName +', "getActiveForm", ["activeForm="+Ext.WindowManager.getActive().owner.uname]);'+ ' }'+ ' }, show: function() {'+ ' if (arguments[0].uname == "window") {'+ ' ajaxRequest('+ Self.WebForm.JSName +', "getActiveForm", ["activeForm="+arguments[0].owner.uname]);'+ ' }'+ ' }'+ '});' ); Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted December 13, 2020 Share Posted December 13, 2020 8 minutes ago, dbf_usr said: При закрытии формы ошибка вылетает. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 13, 2020 Share Posted December 13, 2020 1 hour ago, dbf_usr said: При закрытии формы ошибка вылетает. Прежний код удалили? Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted December 14, 2020 Share Posted December 14, 2020 20 hours ago, Sherzod said: Прежний код удалили? ДА. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 14, 2020 Share Posted December 14, 2020 3 hours ago, dbf_usr said: ДА. Кажется у меня работает без ошибок. Тестовый случай!? Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted December 17, 2020 Share Posted December 17, 2020 On 12/14/2020 at 2:42 PM, Sherzod said: Кажется у меня работает без ошибок. Тестовый случай!? Тестовый работает, в проекте - нет. Код перенесен точно. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 18, 2020 Share Posted December 18, 2020 4 hours ago, dbf_usr said: Тестовый работает, в проекте - нет. Код перенесен точно. Остается проанализировать Ваш проект... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.