Jump to content

david600320@hotmail.com

uniGUI Subscriber
  • Posts

    65
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by david600320@hotmail.com

  1. @AbakSoft , Thanks for your kind explanation !! // calling .... pdfUrl := 'http://127.0.0.1:8077/files/Repo_200218085047701.pdf' RunApp( ' chrome ' , pdfURL); // function RunApp( Ma_cmdLine, Dossier : String ) ChromeBrowserPath := 'cmd.exe /C ' + Ma_cmdLine + ' ' + Dossier ; res := CreateProcessAsUser(hToken, nil, PChar(ChromeBrowserPath), nil, nil, False, CREATE_NEW_CONSOLE, nil, nil, // PChar(WorkDir), StartupInfo, ProcessInfo); As I mentioned above, I wanted to show a pdf file on the new google browser but still Failed. ( In Command line , ' chrome http://127.0.0.1:8077/files/Repo_....pdf is OK - successed !! ) As Result - just 200 ok - , Not showing !! What am i wrong ?
  2. @Oliver , Thank you for your help . By the way , I am not clear that solved was a good way or not. ( The Server is for only as Reporting-server independent of any Front-end ) Could you give me a better Idea ?
  3. in UniGUIServerModuleHTTPCommand. [Solved] pdfUrl := 'http://127.0.0.1:8077/files/Repo_200218085047701.pdf' ShellExecute(0, 'OPEN', PChar(pdfUrl), '', '', SW_SHOWNORMAL); Q. Is this only way to solve ?
  4. @Oliver thanks, btw, Is there a way for this to solve this ? How to open a new Browser in UniGUIServerModuleHTTPCommand ?
  5. Is it not Possible UniSession.BrowserWindow in UniGUIServerModuleHTTPCommand ? - Version 1.90.0.1514 , XE2 In the ServerModule , I made a pdf file from FastReport ( makePdf()) and saved on the /files folder successed . What i want to show the pdf file on the new browser . but failed . What am i wrong ? procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); var r : string ; params : TStrings ; cHost : String ; cHostUrlPortPdfRepoPathFilename : String ; begin ARequestInfo.ContentType := 'application/json;charset=utf-8;' ; //success AResponseInfo.CustomHeaders.AddValue('Access-Control-Allow-Origin', '*'); //CORS AResponseInfo.CustomHeaders.AddValue('Access-Control-Allow-Credentials', 'true'); //CORS params := ARequestInfo.Params ; // 109-2. FastReport -> pdfFile -> show pdfFile on the New BrowserWindow if UpperCase(ARequestInfo.URI) = UpperCase( '/report' ) then begin Handled := true; r := ''; r := MakePDF() ; // (success getting pdf filename as files/Repo_200217184615048.pdf ) cHostUrlPortPdfRepoPathFilename := ARequestInfo.Host + '/' + r ; cHostUrlPortPdfRepoPathFilename := StringReplace( cHostUrlPortPdfRepoPathFilename , '\' , '/' , [rfReplaceAll, rfIgnoreCase] ) ; // failed below all . Read of address 00000017 ) // (Errors both ) ( Access violation at address 007212DA in module 'fastReport_test.exe' ) UniSession.UrlRedirect( cHostUrlPortPdfRepoPathFilename ); UniSession.BrowserWindow( cHostUrlPortPdfRepoPathFilename , 0, 0, '_blank'); //AResponseInfo.ContentText := cHostUrlPortPdfRepoPathFilename ; end; end; thanks ,
  6. @wilton_rad : Thank you. Your advice is really important in implementing the same kind of idea. In fact, it takes a lot of time and effort to create the same kind of site you mentioned. If we need to create a business-related platform at a low cost and in a short period of time, then using the same kind of site as yours is the right choice. I found the simplicity and beauty of using UNIGUI, a nice framework, and realized the need for more efficient development in the process of developing with UNIGUI. Currently, I am happy with how I can make web application easily and quickly through UNIGUI. It is time for me to change the idea like Columbus' egg now.
  7. @Abaksoft Many thanks for interesting of my sample project !! and it gives me many helps . Dinner was ready. 1. 100 tables in a given Database . 2. for mapping with Titles and labe caption , I should input something ( Field Name VS colums caption or Titles of Grid - They can be different each countries ) Today , I am Successed to create in Delphi !! 1. 100 Input forms with labels , dbEdits , dbGrid : possible CRUD ( add , edit . delete , save button events as well ) along with given my development patterns . 2. 100 Filtering form : creating many IF CLAUSES as much as columns in each Table . 3. 100 Reports : Seed reports - Developer can make more reports with it . ( I am using Fast-Report ) 4. 100 Title Captions of each grids : It's also Time-Thief for developer to change in mother-language's title . Creating Seconds : 22 ~ 30 seconds . ( 100 tables in a DATABASE ) * In real world , it should be controlled whether show or not against too many columns . need no show all !! ( by giving options ) * Developer should work for logical things and minimal - remained things only . Next , My Project should be successed in Unigui !! - I need your help !! Best regards ,
  8. Thanks for your advises ! @Abaksoft First of all thank you for your kind and detailed explanation. It's good way , I have reviewed the techniques and concepts you mentioned before. By the way , I am wondering how to develop more by Robot until almost 70~80% , Some parts(20~30%) which programmer can do only are remained for critical parts to developer . - Developers should have chanse for modifying or adding for critical parts of sources . - Paradoxically, Robot should not create a source in real time. All of the source code is created using Delphi outside of Unigui And Develper can reuse sources anytime he wants . ( It is enough for you to give a time to Copy & Paste !! from what has done by Robot in minutes ) My current plan is as follows. 1. Give a DATABASE to Robot. - Robot extracts each column information from table information. 2. Robot should be able to analyze the columns and create input screens that - include unilabels, uniDBEdit, uniDBGrid, uniButtons, and Event procedures for CRUD programming . 3. Robot should analyze the colums in the table and automatically create the necessary conditional clauses in Filtering. - should also be able to create a form for Filtering. This can also shorten development time. - should make columns for filtering as much as you want ( IF ....THEN ..... ) 4. The developer should create a complete Unigui source - so that modifications and additions to very serious areas are always possible. 5. Give some patterns and information of components what you want to develop . - For each developer, it is necessary to assume that the components and framework of each person are different. The developer informs Robot of his development pattern. Robot generates the source according to the development pattern. 6. Robot should be smarter then before . what do you think of these ?
  9. Is it possible to make unigui database programming like a robot , automatically ? Tasks Here , 100 tables in a Database has given . Build a web application in Unigui framework !! step 1 . automatically creation forms for CRUD and searching , reporting as well . 100 input forms - CRUD with buttons and click events , labels , dbUniEdits as much as columns of each data Table . filtering forms or source codes ( ex. IF CLAUSE ) Grids along with tasks in a minute !! step 2 . Modify ( manually ) - these are programmer's . Finally , arrange some positions each labels , editor on input forms copy & paste for Master-detail . less coding for connection to report . critical parts - which programmer can do only !! step 3 . Hide what you have done before your Boss !! Take a rest . enjoy your life with saved time make money more as much as saved hours . Goal - Build web applications in Unigui quickly . what do you think ? - There is no silly question !! -
  10. @delphidude Hi , I remember and appreciate you gave me lots of helps to understand kind of this part . I will look again at your advice. Many thanks !!
  11. @Mohammed Nasman I totally agree. I fall in love with Unigui !! I also use unigui for development of most of my web applications. web applications. Sometimes it is inevitable for customers to use the parts described above. I would like to take a look at this sample project as an attempt to reduce the inconvenience when using HTML5 out of Unigui. Best regards,
  12. @Mohammad Namsan <Key point> - If possible , not add , modify your codes in server module for CRUD ( Select , Insert , Update , delete , upload file . They are already made in server module ) !! - just add or modify your html or javascript codes and foxscripts outside of server module like php . ( you don't need re-compiling and re-deployment your server ) 1. Why do i use Unigui for this sample project ? 1) web server + application server( Database ) possible . 2) Benefit with Unigui all in one as portable - easy development ( Both : RAD web application + Using javascript framework for Datatables , charts , management of images ,movies , files ) 3) No needs other server script like php - And No installing other server , server scripts . 2. why did I make foxscript ? 1) for lazy like me - I do not like re-compiling and re-deploying again and again after installing web server once. 2) for students - they can learn how to make responsive web app using database without any server and server script installing and setting 3) I want to handle codes outsides of server module in the case using HTML5 for getting json dataset from database server like php . 4) just make foxscript file and call it through ajax requesting . 3. why don't you use foxscript ? 1) Though you do not know server script like php , jsp , asp ... you should learn of SQL statement ( Select , insert , update , delete ) , if you know SQL-Statements , you can write foxscript easily ( foxscript => <fox@tagname> SQL-statement </fox@tagname> ) 2) Just call (request) it in javascript . it will return in json object data . var data = dbfox_ajaxRequest( 'select' , params ) ; // see about params how to use in sample about update , delete .. you can use it returned data , for Datatables , charts ,etc . using every javascript framework . 3) It dose not matter using with today's famous web frameworks even native development , if you can use it in them as calling ajax . @Mohammad Namsan - if i dont understand you correctly , let me know again . Best Regards,
  13. Hi, @mohammed - Thank you mohammad for your cheers !! ( I know how much you love and contribute to Developers of Unigui . ) @Mohammed Nasman - Thanks for interesting and correcting what i missed in this project . 1. units/dbfox_utils.pas , 1) it will need foxScript.dcu 2) add foxScript.dcu in the project folder . 2. foxScript.dcu 1) The core of foxscript. It parses the params to create an SQL statement. 2) Under construction to make it as a component . Unfortunately, the original source codes of foxscript can not be released at this time. update_20180613.zip
  14. Hi , In fact, I have long been eager to create a Responsive web app with Unigui. Of course, it's enough to create an app that handles administrative or massive data with Unigui. However, sometimes there are a lot of demands for design from clients and for responsive web. With UniGui's UniGUIServerModuleHTTPCommand, you can create a responsive and responsive app that meets your needs. However, this approach is often annoying when dealing with Unigui's greatest strength, Dataset. So, to make the best use of Unigui's advantages and to avoid the inconvenience of forming datasets, I wrote a very small module and named it dbfoxScript. As the name implies, it not only imports Datasets from the server, but also makes them faithful to the CRUD role. Therefore, if you need to add or modify datasets, you can speed up your development by minimizing the compile behavior after opening and modifying the Server Module like the previous development. Of course, developing a Web app in HTML can be a tiring thing. We are already familiar with Unigui through intuitive and easy development. <About dbfoxScript> It is a simple script made only for CRUD. select, insert, update, delete, upload (File). It can be used when using Ajax with Unigui Server instead of PHP, JSP, ASP. Currently, it is under testing, and will make minimal functionality. It was easy to create using Unigui's modules and components. nice connections with jQuery mobile, ReAct native, Ionic, and so on. Supported RDBs are SQL server, Firebird, MySQL and so on ( with UniDac ) <Configuration> 1. Webserver: Unigui 2. dbfoxScript: Unigui 3. Designed Templete: Luna (Comercial) * Design choice is up to you. 4. Sample Database: Firebird 5. Unidac Lets start !! 1. prepare to connect Database -- open settinginfo.ini and Edit yours !! [UNIDAC] ProviderName=Interbase Server=127.0.0.1 Username=SYSDBA Password=masterkey Database=<youPath>\uni_dbfox_ajax_unidac_luna_master\IBDATA\uni_demo.fdb Provider=prAuto //Provider=prDirect //Provider=prAuto ( Firebird ) 2. how to call foxscript in javascript - remember ( CRUD means that those are 'select, update,delete,insert , upload ) - refer ServerModule.pas - this is for only 'select' query // sample 1 . dbfox/Datatables_member.html function get_member(){ var search_key = $("#search_member_name").val() ; if (search_key=='') { search_key = '' ; } else { search_key = search_key ; } var params = { foxFileName : 'member.fox', //[restrict] - only write fox file name ( should not use with folder ) foxTagName : 'fox@select_member', search_name : '%'+search_key+'%' }; //******************************************************** //connect Database and Return Selected Dataset as Json - That's it //******************************************************** var data = dbfox_ajaxRequest( 'select' , params ) ; console.log( data[0]); That'all . BTW , what params mean ? - first , open fox file dbfox/scriptures/member.fox - second look for Tag of fox@select_member - Automatically , it makes SQL statement and return jsonDataset to Client. /********************* * member.fox * */ <fox@select_member> SELECT member_id , member_name , member_image_filename , userid , password , indate , zaddr1 FROM MEMBER WHERE member_name LIKE :search_name </fox@select_member> * foxScript will return jsonDataset . 3. ServerModule.pas procedure TUniServerModule.UniGUIServerModuleHTTPCommand( ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo; var Handled: Boolean); var r : string ; params : TStrings ; begin //1.select if UpperCase(ARequestInfo.URI) = UpperCase( '/SELECT' ) then begin Handled := true; r := remote_Select( params ) ; AResponseInfo.ContentText := r ; end; //----- refer source about Insert , delete , upload(File/Image) end; uni_dbfox_ajax_unidac_luna_master.zip
  15. Thanks for Unigui Team ! I decided to use HTML in uniURLFrame to solve my problem . In my case That's the easiest way more than using HTML without the power of Unigui. Thanks again Team .
  16. Thank you for always , Delphi Developer and Farshad !! That's it . I do not know how produce it for MainForm in index.html . Though you have given us many good components, we have specifically offered to solve my problem as in this test case, such as uniUrlFrame, uniHTMLFrame. My Goal is to create a Resposive Web (developed for desktop, tablet, and mobile) using Unigui and Bootstrap. ( - I have read about it on Desktop/Demo/Http post callbacks . - but I want to solve these problems very flexively . I meant that after build Server , if possible , there are no needs editing any more in server part programming . ) Test case 1. urlFrame's HTML - IOS devices have trouble displaying fast-responding wep apps (right-width cut, especially not in test cases) Test case 2. UniGUIServerModuleHTTPCommand. - IOS devices have no problems and can display well-designed HTML, but it is not easy to control the Unigui app. So to solve my problem, My test case. It is HTML that does not use uniURLFrame to avoid the invisible problem of IOS devices, but you should easily control the Unigui application through MainFormEvent. (such as form.show) - BTW , How can i call a uniForm after Index.html ? if there can not be called ajaxRequest from index,html to MainForm . Do you have a good idear? Best regards ,
  17. Hi, Q. How to catch EventName in MainForm from ajaxRequest in Index.html <refer> - In this test case , I will not use any components , urlFrame or urlHtmlFrame but only on MainForm . - I wanted catch Events from MainForm only 1. MainForm->script ( load external index.html ) window.location.href="index.html" 2. index.html <div class="container"> <h1>My First Bootstrap Page</h1> <p>This is some text.</p> </br> <a href="#" class="btn btn-info" role="button" onclick="call_ajax();"> Call Ajax </a> </div> <script> $(document).ready(function(){ say_hello() ; }); function say_hello(){ alert(' hi , Unigui Team !! you are so nice ~ '); } function call_ajax(){ console.log(' call_ajax '); top.ajaxRequest( top.MainForm.form , 'call_ajax' ,['menu_id=10000'] , false ); } </script> 3. MainForm -> Events ->OnAjaxEvent procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin //0. call_menu - should get menu_id if EventName = 'call_ajax' then begin showMessage(' call ajax from index.html ' + Params.Values['menu_id'] ) ; end; end; 4. Error ( chrome console.log ) <tested result : all same Error > 1) . top.ajaxRequest( top.MainForm.form , 'call_ajax' ,['menu_id=10000'] , false ); 2) . top.ajaxRequest( top.MainForm.window , 'call_ajax' ,['menu_id=10000'] , false ); 3) . parent.ajaxRequest( parent.MainForm.form , 'call_ajax' ,['menu_id=10000'] , false ); what am i wrong ? ( It's works well on using uniURLFrame and HTMLFrame so on ) . Always thanks for your Team , uni_dbfox_test.zip
  18. Thanks , delphi developer ! You are always Good !! BTW , Is it possible to see it to be double size like 'fa-envelope fa-2x' ? Best regards,
  19. Hi, Can we build a desktop application with Unigui ( Beta released using Extjs6.5) like Extjs6.5 Dashboad ? let's look - http://examples.sencha.com/extjs/6.5.1/examples/admin-dashboard/ 1. it's a desktop application . 2. On resizing as much as mobile screen size , it arranges itself to fit small sized even changed alignment. ( HBOX ->VBOX : Boot strap style ? ) How can i ? Regards, David.
  20. How can I use icon font in 'tools'? - Mohammad have asked this in this section . but no answers . any ideas ?
  21. Excellent Mohammad !! really good job
  22. Hi @CastleSoft !! When I do InputType on SweetAlwert2 like below codes , How can i get the filename from SweetAlert2 ? <button click> UniSweetAlert.inputType := TInputType.fileinput ; UniSweetAlert.ShowMessage ; <OnSussess Event> - How can i get the FileName from SweetAlert2 ? Thanks !!
×
×
  • Create New...