Jump to content

thecrgrt

Members
  • Posts

    201
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by thecrgrt

  1. How much number of ExtJS files were used by UniGUI?

    There are so many files were included in ExtJS directory,

    is it possible to reduce a number of files for only neccessary files?

     

    I notice Raudas has only an ExtJS base class (ext-all.js), resources (CSS and Images) and locale files.

    Of course, ext-sync-x.y.z-min.js, ext-unigui-x.y.z-min.js and unicanvas-x.y.z-min.js are neccessary but for others,

    there are used for what? For example, since UniGUI has not supported for codemirror, why's it there?

     

    Some people's asked to me, what are files has been changed? why i need to redeploy all files? :(

    IMO, only for neccessary files are easier to deploy. :lol:

     

    PS. Too many files copying are take a long time, even if each file is so small.

  2. Then my questions are: how can I do that??? Which is the best way to do that???

     

    Thank you for your time.

    You can workaround by creating custom html code and dynamically add it into UniServerModule.ServerMessages.TerminateTemplate.

     

    Example:

     if ((WebMode) and (UserID = '')) then
     begin
       UniServerModule.ServerMessages.TerminateTemplate.Text :=
         '<html> ' +
         '<body bgcolor="#E6E6FA"> ' +
         '<p style="text-align:center;color:#0000A0">Authentication was needed for this application,</p> ' +
         '<p style="text-align:center;color:#0000A0">please sign-on using main application.</p> <br>' +
         '</body> ' +
         '</html>';
       UniApplication.Terminate();
       Exit;
     end;
    

    PS. The Close() method of Form is no longer needed when UniApplication.Terminate() was called.

  3. You can use "<br/>" that is the CR for the web. I use the following format:

     

    
    procedure ShowMessageWithAdInfo( const aMsg, aAdInfo: String );
     begin
      ShowMessage(aError + '<br/><div align="center"> with the additional info:</div><br/>' + aAdInfo);
     end;
    
    

     

    It works good for the web mode. So if you need it for both mode you have to check the mode and use CrLf or <br/>

     

    PS: The <div> is used to center the middle message.

    Thank you. :)

  4. Hi Farshad,

    That's a good article especially for GDI usage, it's a good thing if it was published as a UniGUI documentation,

    and as I've said Fast-CGI is more important for this scenario.

     

    To Mike,

    By the way, for real world application developers should take care of a memory used by them-self as first stage.

    To reduce a memory used per session and to increase overall of ability a real usage of physical memory, and for load balancing we can distributed an application out of process of web server, even if we can make native 64-bit for Delphi, but it was limited for a single web server. It is a good idea to redistribute an application to another process or another machine.

  5. I've found the same error, it was related to FBClient.dll version, it's only effected to 64-bit system(there is no problem for 32-bit system) and ISAPI moddules (IIS/Apache and others).

    You can workaround by get rid of database connection code form ISAPI module and dedicated its into other tier(I mean multi-tiered app.), it could executed in the same machine, of course.

    If you used Delph version atleast 2009, I was strongly recommended to use DataSnap. :)

  6. I found the solution, I was created the following script file and added it into CustomFile property of ServerModule

    if (typeof window.event != 'undefined') // IE
    document.onkeydown = function() // IE
    {
     var t=event.srcElement.type;
     var kc=event.keyCode;
     return ((kc != 8) || (t == 'text') ||
       (t == 'textarea') || (t == 'button') || (t == 'submit') ||
       (t == 'password') || (t == ''));
    }
    else
    document.onkeypress = function(e) // FireFox/Others
    {
     var t=e.target.type;
     var kc=e.keyCode;
     if ((kc != 8) || (t == 'text') ||
       (t == 'textarea') || (t == 'button') || (t == 'submit') ||
       (t == 'password') || (t == ''))
       return true;
     else {
       return false;
     }
    }

     

    For web-based application, this feature is important, IMO.

    I hope this feature was added to UniGUI framework. (and also session management when F5 was pressed :))

  7. Can you explain a bit more about it?

    The example was implemented the session contexts were kept together with the same users id. that have been logged-in, and restore its session with the last changed session when logged-in with those users id.

    In short, it was snap-shot session for logged-in users and were restored for them at next logged-in.

  8. Hello!

     

    I am Brazilian too! Tks for the tip, but I would like a more elegant solution, for example, that the server understands the user session is already open and cancels the request ... something in this sense, or another appropriate solution.

     

    Best Regards.

    http://code.google.com/p/extpascal/wiki/FAQ

    I've found the some resource for ExtPascal for the feature that your requested, but I don't know how do UniGUI is implemented it? maybe you should try it in this way, or maybe Fashad can tell us, how can we do? :)

  9. Hi Farshad,

     

    I hope this not break your valued time.

     

    If you do not remember it. I've asked you about the display of Buddhist year. So I've modified some of part of JS code by using Ext.Override into locale file, and everything fine for displaying, but returned value was not correctly.

     

    I've noticed that, ExtJS has used a shared code to get value for displaying and returning value of datetime. Of course I can make it separately, but the wrapper does not know about this function.

     

    So i've some question:

    1. TUniDateTimePicker was inherited from the classes of ExtCalendar?

    2. If so, is DateTime value of TUniDateTimePicker is internally managed? or can it modified from this point?

  10. We already have a good mechanism: anonymous methods. I have writed a "Confirmation" dialog that, when OK, calls a reference to a method. It is way better than a callbak.

     

     MyConfirmationDialog('Are you a good programer?', procedure(AResult: Integer)
     begin
       // handles AResult
     end);
    

     

    works like a charm.

     

    When I have more a more complex scenario, than I use a Interface. Is a better approach that making a DataModule changing variables of main form.

    Good Idea :)

×
×
  • Create New...