Jump to content

tappatappa

uniGUI Subscriber
  • Posts

    333
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by tappatappa

  1. @eelias 4 yes, uniGUI development is slow, we all are aware of that 7 uniGUI is WEB ONLY. I am not happy with that, but I understand the reasons why Farshad abandoned the VCL mode. 9 I am currently using LiveBindings with uniGUI.. no problem with that. 10 the more you decouple from frameworks, the more you are "platform independent", (chances are )the more you are buggy/featureless. Maybe uniGUI could ship in the future its web framework, when FMSoft is 10x larger than today. See WebFMX for comparison, they seem to be a BIG company (and their prices are huge, accordingly) as a side note, I don't think that deriving uniGUI components from VCL or Firemokey can make much difference, since the features you see in web mode are entirely made from scratch using server side computation or javascript.
  2. I understand that. No problem. As I said: I can live without this feature for now. @Delphi Developer Wow. This is quite an hardcore approach!
  3. Not yet. No offense but this is a lazy answer. The choice of the cell colors can be made after the execution of a (maybe complex) function. In software programming you use the output of a function as input for other functions, all the time. Secondly, maybe the programmer is aware of the logic behind the coloration of the cells, but what about encapsulation (OO programming)? How about a randomly colored grid? I can go on forever... (when I say "after the call of OnDrawColumnCell" I mean after ALL the cells are colored, not immediately after the single call) With that said, I do not consider this to be a major issue, I can work around that for now.
  4. Is it possible to get a specific cell of a grid? I need to check the color of the background of the cell AFTER the call of OnDrawColumnCell.
  5. I've got to do some unit testing for my project. Is it possible to use DUnit that come shipped with RAD Studio? Has anyone found a way to start a ServerModule, MainModule AND a UniApplication object at the DUnit project startup? In order to do some proper unit testing I need to be as much independent from the web GUI as possible, no user-browser interaction involved (all I need to do is a long batch execution). So Selenium is out of question. Here is what my test entry point looks like //--------------------------------------------------------------------------- // DUnit Project File. // Entry point of C++ project using DUnit framework. //--------------------------------------------------------------------------- #include <System.hpp> #pragma hdrstop #include <tchar.h> #include <vcl.h> #include <UniGUIVars.hpp> #include <GUITestRunner.hpp> USEFORM("MyForm................ //--------------------------------------------------------------------------- #pragma link "UniGUIVars.obj" #pragma WebAppGui int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) { try { Application->Initialize(); Uniguivars::CreateServerModule(__classid(TUniServerModule)); Guitestrunner::RunRegisteredTests(); } catch (Exception &exception) { Application->ShowException(&exception); } catch (...) { try { throw Exception(""); } catch (Exception &exception) { Application->ShowException(&exception); } } return 0; } Now the main problem is: how do I initialize a UniApplication instance in the main thread?
  6. Currently I am using xe4 and I didn't experience any differences in comparison with xe2.
  7. See http://stackoverflow.com/questions/12107056/how-to-remove-picker-from-column-header-of-ext-js-grid It would be nice to have a "Hideable" Option (like the "Sortable" option that is already there) for the Grid Columns. The only workaround that I have found for this is setting enableColumnHide=false in grid afterrender clientevent. But if any of the grid columns is "Sortable" then this flag is (unsurprisingly) switched back to true. Any better workaround?
  8. Still no ClientEvents for TUniMenuItems?
  9. I desperately need this feature: i need to load from file a bunch of icons and add them to a menu. Does anybody know a way to do it without TUniImageList.Add? What does TUniImageList.InsertComponent do? EDIT: OK I think I've found a way to work around this missing feature. It involves streaming a TImageList and "convert" it into a TUniImageList at run time...
  10. uniGUI 0.95.1046 -- These methods aren't implemented yet. Any plans to add them soon? Any workaround?
  11. Combine another TUniTimer with a global OnMouseMove Event. Doing so, you can tune your own timeout. See this post. I am using it in one of my projects, and it works.
  12. You are right, Farshad. A OnBeforeLoad (OnClientRefresh) event would be useful. Not a critical feature in my opinion, though.
  13. I guess I have to write new components in Delphi..
  14. Hi tnt23, once I tried something like that, but I found it a little dangerous: it may have a strange behaviour when exceptions are thrown. On the other hand, it surely is the simplest way to achieve what mierlp is asking for.
  15. Development Environment: Microsoft Windows XP Professional 32bit RAD Studio XE2 (c++ builder) UniGUI 0.93 Description In web mode, the refresh button at the bottom of a TUniDBGrid does not call the Refresh method of the underlying dataset. Steps to reproduce 1) You need a UniDBGrid a datasource and a dataset which is connected to an actual database (I tested it with Oracle DB and ODAC) 2) Define the query, and the refresh query (if needed) 3) Run, the grid shows the results 4) On a separate session, change one of the records shown in the grid. Commit. 5) Click on the refresh button, nothing changes.
  16. I've found a way to implement a global listener of mousemove that resets a TUniTimer. In this example I have a component called "TUniTimer1" in the MainForm. doc=Ext.getDoc(); doc.on('mousemove', function(e) { timer1=MainForm["UniTimer1"]; try{timer1.stopAll()}catch(e){}; task1=timer1.tasks[0]; timer1.cEvent=function(sender) { }; timer1.start(task1); task1.taskRunTime=task1.taskStartTime; });
  17. Ok I'll give it a try, thank you.
  18. Thank you both for the prompt answers, Oliver and HarryG. So, let's say I define two Events function window.OnAfterrender(sender) { myTimeout = window.setTimeout(function(){myFunc();}, 20000); } function window.Onmousemove(sender, x, y, { sender.clearTimeout(myTimeout); } Two problems: 1) How do I define myFunc? Do I have to add a call to AddJS(...) somewhere in my Delphi/C++ code? 2) myTimeOut is out of scope!
  19. Suppose you have to manually implement some sort of "Timeout" Event on a Form.. You have a UniTimer with interval=20000 that must be resetted with each OnMouseMove event. if the mouse does not move, the Application Terminates. What i want is something like this: function window.Onmousemove(sender, x, y, { sender.UniTimer1.reset; } (yeah, I am a ExtJS newbie) I hope this is a simple question, because what I REALLY want is a global Timer, with a global OnMouseMove handler... (and no, the ServerModule.AjaxTimeOut propery is not enough for me)
  20. I don't know if this is a bug, so i am posting in the General Forum. I created a sub component of TUniEdit using the New Component Wizard. Since I work in c++, i followed the wizard for c++. Here is the CPP //--------------------------------------------------------------------------- #include <vcl.h> #pragma hdrstop #include "UniEditTTC.h" #pragma link "uniEdit" #pragma link "uniGUIBaseClasses" #pragma link "uniGUIClasses" #pragma package(smart_init) //--------------------------------------------------------------------------- // ValidCtrCheck is used to assure that the components created do not have // any pure virtual functions. // static inline void ValidCtrCheck(TUniEditTTC *) { new TUniEditTTC(NULL); } //--------------------------------------------------------------------------- __fastcall TUniEditTTC::TUniEditTTC(TComponent* Owner) : TUniEdit(Owner) { } //--------------------------------------------------------------------------- namespace Unieditttc { void __fastcall PACKAGE Register() { TComponentClass classes[1] = {__classid(TUniEditTTC)}; RegisterComponents(L"uniGUI Additional", classes, 0); } } //--------------------------------------------------------------------------- And the header //--------------------------------------------------------------------------- #ifndef UniEditTTCH #define UniEditTTCH //--------------------------------------------------------------------------- #include <SysUtils.hpp> #include <Classes.hpp> #include "uniEdit.hpp" #include "uniGUIBaseClasses.hpp" #include "uniGUIClasses.hpp" #include <Vcl.Controls.hpp> //--------------------------------------------------------------------------- class PACKAGE TUniEditTTC : public TUniEdit { private: protected: public: __fastcall TUniEditTTC(TComponent* Owner); __published: }; //--------------------------------------------------------------------------- #endif No additional feature are added, this is only for testing purposes. I installed the component, and all went fine. When I add the UniEditTTC to a Form in Design Mode I got --------------------------- Error --------------------------- Access violation at address 5008C59A in module 'rtl160.bpl'. Read of address 00000000. --------------------------- OK Details >> --------------------------- [5008C59A]{rtl160.bpl } System.TypInfo.GetPropList (Line 1803, "System.TypInfo.pas" + 8) + $0 [00E0DFDE]{bds.exe } bds.bds (Line 204, "" + 8) + $94E9EF [20FD7E00]{designide160.bpl} ComponentDesigner.TCompInfo.Create (Line 6535, "ComponentDesigner.pas" + 4) + $11 [20FD4120]{designide160.bpl} ComponentDesigner.TComponentRoot.ValidateRename (Line 5242, "ComponentDesigner.pas" + 26) + $22 [500B4D25]{rtl160.bpl } System.Classes.TComponent.ValidateRename (Line 12851, "System.Classes.pas" + 6) + $15 [51D404ED]{vcldesigner160.bpl} VCLSurface.TVclDesignSurface.ValidateRename (Line 3859, "VCLSurface.pas" + 2) + $D [50449A08]{vcl160.bpl } Vcl.Forms.TCustomForm.ValidateRename (Line 4114, "Vcl.Forms.pas" + 3) + $10 [500B4936]{rtl160.bpl } System.Classes.TComponent.InsertComponent (Line 12657, "System.Classes.pas" + 4) + $C [500B46FF]{rtl160.bpl } System.Classes.TComponent.Create (Line 12551, "System.Classes.pas" + 2) + $8 [5032FCB3]{vcl160.bpl } Vcl.Controls.TControl.Create (Line 5302, "Vcl.Controls.pas" + 1) + $4 [50334458]{vcl160.bpl } Vcl.Controls.TWinControl.Create (Line 8247, "Vcl.Controls.pas" + 1) + $4 [182ADD2B]{uniGUI16.bpl} Uniguibaseclasses.TUniBaseControl + $9B [182B1CE1]{uniGUI16.bpl} Uniguiclasses.TUniControl + $51 [182B9FB6]{uniGUI16.bpl} Uniguiclasses.TUniFormControl + $16 [182981F8]{uniGUI16.bpl} Uniedit.TUniBaseEdit + $1C [1B012D9F]{TTCComponents.bpl} UniEditTTC.cpp.TUniCustomEdit.$bctr$qqrp25System.Classes.TComponent (Line 125, "C:\Projects\lib\FMSoft\Framework\uniGUI\Dcu\Delphi2012\uniEdit.hpp" + 0) + $33 [1B012CD7]{TTCComponents.bpl} UniEditTTC.cpp.TUniEdit.$bctr$qqrp25System.Classes.TComponent + $33 [5003C547]{rtl160.bpl } System.TObject.NewInstance (Line 13000, "System.pas" + 1) + $10 [1B012C7F]{TTCComponents.bpl} UniEditTTC.cpp.$bctr$qqrp25System.Classes.TComponent (Line 23, "UniEditTTC.cpp" + 1) + $E [5004311C]{rtl160.bpl } System.@IntfClear (Line 29967, "System.pas" + 10) + $0 [21B8E53F]{delphicoreide160.bpl} CompPalMgr.TComponentPalettePageItemDelegate.CreateComponent (Line 2744, "CompPalMgr.pas" + 2) + $7 [20FCC868]{designide160.bpl} ComponentDesigner.TComponentRoot.DoCreateComponent (Line 2363, "ComponentDesigner.pas" + 12) + $17 [20FD5E3E]{designide160.bpl} ComponentDesigner.TComponentRoot.CreateComponentPos (Line 5929, "ComponentDesigner.pas" + 26) + $22 [51D432EE]{vcldesigner160.bpl} VCLSurface.TVCLDesignerOleDropTarget.DropComponentStream (Line 5034, "VCLSurface.pas" + 17) + $25 [51D42A49]{vcldesigner160.bpl} VCLSurface.TVCLDesignerOleDropTarget.Drop (Line 4857, "VCLSurface.pas" + 7) + $17 [20812C85]{coreide160.bpl} ToolFrm.TToolForm.BeginOleDrag (Line 2136, "ToolFrm.pas" + 46) + $17 [2081295A]{coreide160.bpl} ToolFrm.TToolForm.BeginOleDrag (Line 2068, "ToolFrm.pas" + 3) + $4 [20812E48]{coreide160.bpl} ToolFrm.TToolForm.PaletteBeginDrag (Line 2167, "ToolFrm.pas" + 2) + $1B [211676F6]{vclide160.bpl} IDECategoryButtons.TIDECategoryButtons.DoBeginDrag (Line 103, "IDECategoryButtons.pas" + 3) + $A [504B2112]{vcl160.bpl } Vcl.CategoryButtons.TCategoryButtons.MouseMove (Line 2096, "Vcl.CategoryButtons.pas" + 24) + $9 [5003C9B2]{rtl160.bpl } System.@CallDynaInst (Line 13519, "System.pas" + 4) + $0 [503332AA]{vcl160.bpl } Vcl.Controls.TControl.WMMouseMove (Line 7436, "Vcl.Controls.pas" + 8) + $22 [5003CA63]{rtl160.bpl } System.TObject.Dispatch (Line 13727, "System.pas" + 11) + $0 [50332995]{vcl160.bpl } Vcl.Controls.TControl.WndProc (Line 7204, "Vcl.Controls.pas" + 91) + $6 [50336B3B]{vcl160.bpl } Vcl.Controls.TWinControl.IsControlMouseMsg (Line 9745, "Vcl.Controls.pas" + 1) + $9 [5032D7BE]{vcl160.bpl } Vcl.Controls.FindControl (Line 3540, "Vcl.Controls.pas" + 6) + $9 [503372F3]{vcl160.bpl } Vcl.Controls.TWinControl.WndProc (Line 9976, "Vcl.Controls.pas" + 152) + $6 [504B3B7F]{vcl160.bpl } Vcl.CategoryButtons.TCategoryButtons.WndProc (Line 3047, "Vcl.CategoryButtons.pas" + 24) + $4 [50336948]{vcl160.bpl } Vcl.Controls.TWinControl.MainWndProc (Line 9689, "Vcl.Controls.pas" + 3) + $6 [500B6890]{rtl160.bpl } System.Classes.StdWndProc (Line 13878, "System.Classes.pas" + 8) + $0 [20810948]{coreide160.bpl} ToolFrm.TToolForm.PaletteHook (Line 1102, "ToolFrm.pas" + 14) + $A [500B6890]{rtl160.bpl } System.Classes.StdWndProc (Line 13878, "System.Classes.pas" + 8) + $0 [50453213]{vcl160.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10164, "Vcl.Forms.pas" + 23) + $1 [50453256]{vcl160.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10194, "Vcl.Forms.pas" + 1) + $4 [50453595]{vcl160.bpl } Vcl.Forms.TApplication.Run (Line 10332, "Vcl.Forms.pas" + 26) + $3 While if I add the component programmatically it works! For what i can see, the problem is in the RTTI. Any ideas?
  21. I guess you could, but the result would probably be buggy as hell. As of today, UNIGui web components are quite different from standard VCL, visually and (sometimes) functionally.
  22. Please add a ScreenMask Property to TUniMenuItem components. As an alternative, it would be even better if you modify TUniScreenMask like this: TUniScreenMask Properties: ----Attached Control (working with any control) ----Attached Control Event (any event selectable) ----Target Control Thanks
  23. try adding the missing ; at the end of line 496 in ext.hpp
  24. You need to set a port in ServerModule (default is 8077 if i recall correctly) and the port must be included in your local firewall exceptions (if you use Windows firewall it can be configured through Control Panel->Windows Firewall->...Add Port) Then you are good to go, just type the machine address including the port, for instance www.a-site-that-i-just-made-up.com:8077 192.168.100.100:8077 I hope this helps.
×
×
  • Create New...