Jump to content

estrify

uniGUI Subscriber
  • Posts

    454
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by estrify

  1. May be the situation is not usual, but it is simply what you have to do if you must ensure that you can't leave an edit to go to another one unless its value is correct (if you have only one in a form, it's Ok, but if you have two, you could have the infinite loop because server events are launched and quoued before you could complete the validation, because of a simple line delay). Please, don't worry. As I find this framework great and the activity of this forum really fantastic, I thought I could find easily a solution for this issue. Hence, since this problem is not usual at all, it seems to be two solutions: 1. Create two different forms, one for each edit that has onexit validation. Unacceptable in this case. 2. Implement an inherited form (to contain the property and the flag) and for each control that has validations onexit, write the same code to detect if the event must be ignored, looking forward to the possibility of extending UniGUI components coming soon, to avoid repeating so much code (Intraweb framework suffers exactly the same issue, but in that case the problem could be solved simply extending some components). Thank you and regards,
  2. My suggestion in the last post only seeks to match as possible the sequence of events in vcl and web modes (with vcl mode, there is no problem), knowing that the latter has its latency issues, and only in those cases you need it. Note that what I propose does not require you to avoid the generation of events, only prevents some to execute it's user's association on server side whenever you turn on a flag. Some edits only have their validations when exit them (not on change event because they may have values that have to be revised: the value displayed was correct time ago, but not now), and they are as important fields so you should not exit them without introducing one correct value, so it refocus itself again. If you are editing one of these critical edits and click on another normal field, there is no problem because the latter will not validate on a onexit event. But if you click in another critical field that has its server validation on the onexit event, you will have a beatiful loop, but only in web mode.
  3. Hi, I try the ShowMessage solution. I'm afraid it doesn't work. With ShowMessage: now have two extra server events, the event sequence is 1 UniEdit1Enter 2 UniEdit1Exit (this event server now executes a ShowMessage and sets the focus on UniEdit1 again, but this effect is not shown until event 5) 3 UniEdit2Enter 4 UniEdit2Exit 5 UniEdit1Enter (caused by event 2. Here, the ShowMessage displays the message) 6 UniEdit1Exit (caused after closing the ShowMessage) 7 UniEdit1Enter ¿Any idea?... ¿It's possible to implement something simple like the following in the base class of UniGUI controls?: Each form should have an actual focused property and a flag: * if the flag is OFF, actual focused property changes with each control focus change, otherwise it remains unchanged * if the flag is ON, only server events related with the active focused control should be processed if those events are ENTER, EXIT, KEYBOARD or MOUSE events (¿other events for other controls could be processed, like CHANGE events?) * if the flag is ON, it must be turned off automatically, if we are focusing in the actual focused control. This should work for both web and VCL modes. This way, the original sequence will work as following (if no control fires the flag, everything will work as it is doing now, so no one has to change his code): 1 UniEdit1Enter (the flag is OFF, so base control sets the active focused property of the form to UniEdit1) 2 UniEdit1Exit (programmer sets manually the flag ON so the actual focused property from now on could not change) 3 UniEdit2Enter (the flag is ON and UniEdit2 is not the focused control. It is a KEYBOARD, MOUSE, ENTER or EXIT event, so this event will be ignored) 4 UniEdit2Exit (the same as prior) 5 UniEdit1Enter (the flag is ON and actual focused control is the one, so base class resets the flag) In this manner, in web mode the effective events are only 1, 2 and 5, similar to the 3 events sequence of VCL mode. This way, it is semi-transparent, so the programmer only has to set ON the flag in EXIT events only if needed, since its reset is automatic, regardless if he is programming in web or VCL mode. ¿It's possible to include this logic? Thank you in advance.
  4. Hi, Thank you very much for the quick response. Actually there is no messages to show to the users, something strange, but it is. However, thank you for this workaround. Regards,
  5. Hi, Is there a way to "eliminate" all server events thrown after one of them in web mode, to achieve something like VCL mode events sequence?. For example, in web mode, this is sample enter-exit server event sequence with two UniEdits: 1 UniEdit1Enter 2 UniEdit1Exit (this event server sets the focus on UniEdit1 again, but this effect is not shown until event 5) 3 UniEdit2Enter 4 UniEdit2Exit 5 UniEdit1Enter (caused by event 2) On server event 2, a server validation is done and a SetFocus is executed, so events 3 and 4 must be ignored. How we can achieve this? In VCL mode, the sequence of events is exactly what we need: 1 UniEdit1Enter 2 UniEdit1Exit 3 UniEdit1Enter Thanks in advance,
  6. This is a simple tip that allows to display a text within an UniEdit control when it is empty (it would be great if UniEdit could have a property EmpryText to do this): Just open UniEdit's ClientEvents and edit ExtEvents property Add the following line in the "OnBeforerender" event: sender.emptyText='text to display when the field is empty';
  7. estrify

    Viewport

    Yes, en Ext.Viewport as container of child panels...
  8. estrify

    Viewport

    Hi, Is there a way to include a viewport in the main form?. Our intention is to do something similar to the Portal Example of ExtJS. Thx
  9. Hi, I was testing Raudus and Intraweb frameworks but I have found some kind of "problems" that made me prefer UniGUI, but I still have some leaks on which I need some help (listed below). Is there a way to get it with UniGUI?... Thank you vey much in advance and thank you for this framework, it looks very pretty. 1. Is there something like Raudus' Object Grid Panel?, with columns editor, hidden columns and so on (TMS Intraweb has it too). One component like this might be very useful. The actual UniGUI string grid is too basic. 2. UniGUI doesn't have integer and float edits?. May be inserting some kind of javascript in a client event like onBeforerender?. How could be a number formatted as money (with decimal and thousand separators and $ or € symbol) using client side code with extjs? 3. could you clarify events sequence?. what should have to do if we want to: fire a client event and hiding it to the server (this is the default way, isn't it?) fire a cliente event that fires also a server event Thank you and best regards,
×
×
  • Create New...