Jump to content

Tokay

uniGUI Subscriber
  • Posts

    839
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Tokay

  1. Hi, We recently bought your components UniSF. It's an issue with it. I try to create TUniSFBitBtn dynamically, but I can't do it. I try to do it with this code: procedure TMainForm.UniFormCreate(Sender: TObject); var UniSFBitBtn2: TUniSFBitBtn; begin UniSFBitBtn2 := TUniSFBitBtn(InsertControl(TUniSFBitBtn.Create(Self))); UniSFBitBtn2.Name := 'UniSFBitBtn2'; UniSFBitBtn2.Parent := Self; UniSFBitBtn2.Left := 64; UniSFBitBtn2.Top := 231; UniSFBitBtn2.Width := 113; UniSFBitBtn2.Height := 121; UniSFBitBtn2.Hint := ''; UniSFBitBtn2.Caption := 'Dr. Mohammad'; UniSFBitBtn2.TabOrder := 1; UniSFBitBtn2.ClientEvents.UniEvents.Add('beforeInit=function(sender, config){ sender.action = '#39'badgetext'#39); UniSFBitBtn2.ClientEvents.UniEvents.Add('; sender.plugins = [{ ptype:'#39'badgetext'#39', defaultText: 0, disa'); UniSFBitBtn2.ClientEvents.UniEvents.Add('bleOpacity:1, disableBg:'#39'red'#39', align:'#39'right'#39' }];}'); UniSFBitBtn2.IconAlign := TUniIconAlign.iaTop; UniSFBitBtn2.IconFont := fa_lock; UniSFBitBtn2.IconFontColor := fc_white; UniSFBitBtn2.IconFontSize := fs_48; UniSFBitBtn2.ButtonStyles := bs_info; end; And my test app doesn't started. I discovered, that problem is with this strings of code: UniSFBitBtn2.ClientEvents.UniEvents.Add('beforeInit=function(sender, config){ sender.action = '#39'badgetext'#39); UniSFBitBtn2.ClientEvents.UniEvents.Add('; sender.plugins = [{ ptype:'#39'badgetext'#39', defaultText: 0, disa'); When i remove they, all starts good, but button shows improperly. If I add button not on main form, app starts. But when test form opened error is shown: Ajax error O18D=new Ext.window.Window({id:"O18D_id",retfalse:{},onEsc:Ext.emptyFn,layout:"fit",title:"test window",resizable:false,maximizable:false,minimizable:false,uniFMask:{beforeclose:true},width:258,height:258,x:744,y:291});O18D.nm="O18D";_cdo_("UniForm27");UniForm27.ajxS=AjaxSuccess;UniForm27.ajxF=AjaxFailure;O18D.rootObj=true;UniForm27.appRoot="/";_cdo_(null,O18D,"window",UniForm27); O195=new Ext.form.Panel({id:"O195_id",border:false,tabItems:new Ext.util.MixedCollection(),layout:"absolute"});O195.nm="O195";_cdo_(null,O195,"form",UniForm27);O18D.add(O195); O19D= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=beforeclose&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"beforeclose"});});O19D.nm="O19D";O18D.on("beforeclose",O19D); O19E= (function(P0){_saf_(P0);return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=activate&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"activate"});});O19E.nm="O19E";O18D.on("activate",O19E); O19F= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=deactivate&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"deactivate"});});O19F.nm="O19F";O18D.on("deactivate",O19F);O18D.on("deactivate",function(f){_sdf_(f)}); O1A0=new Ext.button.Button({id:"O1A0_id",text:"Dr. Mohammad",beforeinit:function(sender, config){ sender.action = 'badgetext',tabIndex:267,scale:"large",iconAlign:"top",iconCls:"x-uni-btn-icon-top",width:115,height:121,x:8,y:129});O1A0.nm="O1A0";_cdo_("UniSFBitBtn0",O1A0,null,UniForm27);_coxe_(UniForm27,"UniSFBitBtn0","; sender","plugins ", [{ ptype:'badgetext', defaultText: 0, disa);_coxe_(UniForm27,"UniSFBitBtn0",null,"",);O195.add(O1A0); O1A4= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=resize&this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"resize"});});O1A4.nm="O1A4";O18D.on("resize",O1A4); O1A5= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=move&this="+P0.nm+"&x="+P1+"&y="+P2+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"move"});});O1A5.nm="O1A5";O18D.on("move",O1A5); O1A6= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=maximize&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"maximize"});});O1A6.nm="O1A6";O18D.on("maximize",O1A6); O1A7= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=minimize&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"minimize"});});O1A7.nm="O1A7";O18D.on("minimize",O1A7); O1A8= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=restore&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"restore"});});O1A8.nm="O1A8";O18D.on("restore",O1A8);O18D.show("");O18D.retfalse.beforeclose=1;_axy_(O18D);O18D.uniMask={ldMask:false,maskWaitData:false,maskUseMsg:true};O18D.uniMask.targetObj=null;O1A0.addToTab(2670); And form doesn't opens. The reason is same - two strings. Is it possible to fix this issue? Thank you.
  2. Thank you very much for answering! Is it some suggestions or instruments for css modification?
  3. Thank you! All works great. I changed TUniHTMLFrame to TUniURLFrame.
  4. Sorry, this code doesn't works: UniHTMLFrame1.JSInterface.JSCode('Ext.defer(function(){'#1'.iframe.contentWindow.print()}, 100);'); Message from browser console: VM265:1 Uncaught TypeError: Cannot read property 'contentWindow' of undefined at eval (eval at AjaxSuccess (ext-unicommon-min.js:8), <anonymous>:1:33)
  5. Hi! I have an issue with printing too. I'm using the Chrome brouser and try to print a TUniHTMLFrame. The code is simple: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniHTMLFrame1.HTML.Text := '<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' + '<title>HTML Document</title> </head> <body> <p> <b> This text is bold,<i>and this one is also italic</i></b></p></body></html>'; UniSession.AddJs(UniHTMLFrame1.jsname + '.iframeEl.dom.contentWindow.print();'); end; Dpr: object UniHTMLFrame1: TUniHTMLFrame Left = 8 Top = 8 Width = 785 Height = 465 Hint = '' end And I get the ajax error: Cannot read property 'dom' of undefined O17.iframeEl.dom.contentWindow.print();O17.update(" <!DOCTYPE html> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><title>HTML Document</title> </head> <body> <p> <b> This text is bold,<i>and this one is also italic</i></b></p></body></html>\n",true); Any suggestions?
  6. Hi all! I see that some guys creates different thems for UniGui. We really need a dark theme like mountineview on desctop. Is there any way to do this? Thank you.
  7. As far as I know, if you manually create them, they will be created in a single copy: Application.CreateForm(TDataModule3, DataModule3); Application.CreateForm(TWebDataModule, WebDataModule);
  8. Because Apache is very widespread, I think that issues is on your side. Give some instruments for leaks detection: https://stackoverflow.com/questions/416046/what-is-the-best-tool-to-detect-memory-leaks-in-delphi and check your code.
  9. Ok, and how is it possible? Only way I found is hide the main form in OnShow and show another, second form.
  10. I need 2 different interfaces to the same resources (database, files etc). One is administrative access, another user's, limited.
  11. Hi, and sorry for raising old topic instead of creating a new one. I alsow need a few different main forms, but on the one port and url. Depending on the user login (for ex - user and admin). Is it correct and safe to do so: procedure TMainForm.UniFormShow(Sender: TObject); begin if UniMainModule.ShowSecond then begin Hide; UniForm1.Show; end; end; ?
  12. Свойство 'Columns' грида, пробежаться по всем колонкам и отключить Sortable. Либо выделить все вместе и одновременно выключить.
  13. I got it! Thank you very much. I do it in that way: After sql query, i add OnGetText handers to needed fields: IBQuery1.Fields[i].OnGetText := IBQuery1YGetText And in the handler: Text := FormatFileSize(Sender.AsLargeInt); All works great! Thank you.
  14. I try to format text in the cells, but Attribs.AsString is read-only property. Could I change text which will be displayed in a cell in some way? Thank you. procedure TUniForm2.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if ACol > 0 then Attribs.AsString := FormatTriad(Column.Field.AsString); end;
  15. Thanks for great lib! We are going to purchase licence(s) for your library. I did some promote links. I think that good things need to be promoted. This is my request: 1. Linux support on Lazarus, not only on Delphi. 2. TUniTreeNode.MoveTo.
  16. Добрый день еще раз. Ищется какая-либо замена VCL'ного TTreeNode.MoveTo. Нашел топик, но в нём ничего нет http://forums.unigui.com/index.php?/topic/8186-some-questios-about-unitreeview/?hl=moveto нашел событие: function store.move(sender, oldParent, newParent, index, eOpts) { } Скажите - реально ли как-то сделать перенос ноды? Используем RC триальный, Delphi XE6.
  17. По поводу второй проблемы думаю за проблему с многопоточностью. Возможно, что форма создаётся в одной сессии, а доступ к форме идёт из другой. Как вообще это узнать? https://unigui.wikispaces.com/Standard+units+in+an+uniGUI+project "In other words, each session (i.e. each MainModule) will have its own DataModule. If the DataModule contains a DataSet (i.e. TADOTable or TFDTable), each session will have its own instance of this DataSet" Можно ли как-то у UniMainModule запрашивать не какую-то форму вообще, а определённую? Вообще - формы UniGUI являются thread safe? В отличие от того же VCL? Жду ответа p.s. похоже, проблема не в доступе из разных потоков. Мне удалось повторить проблему с минимальной обвязкой. Пошлю пример на указанный ящик. С первой проблемой будет, скорее всего, не так просто.
  18. Всем доброго дня. Для начала благодарности. Спасибо за интересную библиотеку. Похоже - как раз то, что нам нужно. Сейчас решается вопрос о покупке одной либо нескольких лицензий. Но есть некоторые сложности с использованием. Пытаюсь использовать библиотеку на нескольких своих проектах. В одном из них, достаточно сложном, есть несколько проблем, скорее всего на стороне библиотеки UniGui. Либо неправильное её использование, либо баги. Мы используем RC триал. Во-первых, хочу создать баг-репорт на форуме, но не могу: "You cannot start a new topic". Скажите - куда можно писать и как вообще происходит поддержка? По самой библиотеке, вот что случается: 1. в одном случае срабатывает ассерт: --------------------------- Debugger Exception Notification --------------------------- Project Project2.exe raised exception class EAssertionFailed with message 'Attempt to access nil session reference (H:\Framework\uniGUI\Source\Core\ExtPascal.pas, line 1247)'. --------------------------- Break Continue Help --------------------------- на вот таком коде: Session.FNodeFields.RootNode := FTV.Items.AddNode(nil, ParentNode, '', Session, naAddChild); Здесь: FTV:TUniTreeView; RootNode: TUniTreeNode; 2. во втором случае случается AV: --------------------------- Debugger Exception Notification --------------------------- Project Project2.exe raised exception class $C0000005 with message 'access violation at 0x00793350: read of address 0x00000064'. --------------------------- Break Continue Help --------------------------- Вот в этом месте: function Form2: TForm2; begin Result := TForm2(UniMainModule.GetFormInstance(TForm2)); end; форма Form2 существует и открыта.
×
×
  • Create New...