-
Posts
356 -
Joined
-
Last visited
-
Days Won
18
Content Type
Profiles
Forums
Events
Posts posted by Oliver Morsch
-
-
The text of the cell must contain the html for the panel (div) and images (img).
-
-
Thanks. I updated the original post with above file.
You have updated post #1, I think it was the version of (my) post #4.
Now I have updated #4 with example (.zip) and screenshot.
-
procedure TFormProduct.UniFormClose(Sender: TObject; var Action: TCloseAction); begin if dmMain.Product.State in [dsEdit,dsInsert] then begin Action := caNone; MessageDlg('Would you like to save the changes (Y/N/C) ?', mtConfirmation, mbYesNoCancel, QuestionSaveYesNo); end; end; procedure TFormProduct.QuestionSaveYesNo(Res: Integer); begin case Res of mrYes : dmMain.Product.Post; mrNo : dmMain.Product.CancelUpdates; else EXIT; end; Close; end;
Try this code, but it is not tested...
-
I don't understand where/how to set the ''Set Action :=caNone'' option, can you explain?
procedure TFormProduct.UniFormClose(Sender: TObject; var Action: TCloseAction);
Do you see the (var) "action"?
-
A other behavior is that the form is already close and only the question is on the screen, normally
both have to be on screen...maybe it's a behavior of EXT JS ?
Set Action := caNone before (when) you call MessageDlg. In "TFormProduct.QuestionSaveYesNo" you must call Close again (or do nothing in the last case if you ask "YES/NO/CANCEL")
-
I create a new "UNIGUI" project as Windows Service Apllication.
I run : "myUNIGUIApp.exe /install"
but "myUNIGUIApp" did not added to the Services List !
Have you changed the service name to "myUniGuiApp" / is there a service named "UniServiceModule" ?
-
I now build my 'simple' mail form (based on you're suggestion) so the user can send a e-mail.
For sending mail is prefer using stable components. I've tested the following components, which
are all working in Win32 but have some problems when using them in uniGui:
- Mailbee Smtp ActiveX (http://www.afterlogic.com/mailbee/objects
but have a problem (Componentent not connected tot a services) when i want the send the message the second time.
I used it in Win32 apps and it's a older version maybe a upgrade must be done and i will mail them about the error
- AddEmail ActiveX(http://www.traysoft.com/addemail_overview.htm
The problem here is a got a AccessViolation when a set the serialnumber for the component...even when i do it in
uniGui VCL mode...in a normal Win32 applications it's working. I've send them a mail for support.
Have you tried to set "autocoinicialize" to true? (Autocoinitialize)
-
In this case they only need 1 query (record) -> 1 mail(body)
because we only need some fields out of the CONTACT database
like : LastName, FirstName, MiddeName
In this case it should be simple to give the user a TUniHmlMemo (or "tiny MCE" component) for editing the mail. The user must only insert things like [LastName] or you give him buttons to insert this. And then you must replace all [Fieldnames] with the value of the current record before sending.
Where do you have problems?
-
I have also used 'search/replace' but it's to difficult for users.
Do you (your users) need 1:n-relations in the message body? Or is 1 query (record) -> 1 mail(body) enough?
-
How do you send bulk mail and do you use
some kind of mail merge...integrate some
personal values from a database ?
Not at present, but it is planned for the future.
I think i will simply have a text like "dear [NAME], ..." and then replace [NAME] and more by a sql query...
I don't know at this time if we will need master/detail-relations (e.g. invoice items) in the email or sending such things as PDF-Attachment. But i have developped such a behavior (master/detail with text replacing) a few years ago for a RTF-Report. It works, but is too difficult for most users, so we must deliver the "reports" (sql-relations, ...).
-
-
http://218.87.122.217:8089 userid:6502 password:2
I see only the login screen; on login in firefox nothing happens and in chrome the browser will be closed...
-
I use indy (idSmtp, idPop3, idMessage) for sending and receiving mails. For viewing i use uniHtmlFrame and uniHtmlMemo as (HTML-)editor. All mails are stored in a firebird database.
-
Well...the problem is that's not so simple to create a report builder with UniGui because of the
visual aspect. Viewing is not a problem but give the use a report desinger is a other issue.
I have found a report designer running in web browser:
or
using ajax (otimized for touch/tablets)
Well ...there are two option i think and that's Fast Report Server or the option building a .exe fileand give it to the user. My Win32 apps is also based on a client which has to be installed and the
database are on the web server.
Intranet or internet? In intranet it is OK but i think it is not a good idea to make a database directly accessible over the internet...
Regards
Oliver
-
but i think there must be a other solution
as i described, but i can't test if it's possible to 'start' a .exe
file from within a isapi.dll version of the application
You can start a .exe in ISAPI-Module using ShellExecute or CreateProcess, but that is not that what you want, because the program will run on Server (on client you will see nothing). So it makes only sense to use this for starting "command line programs" (without windows/forms). I use CreateProcess to start such processes on server.
Or you can send the .exe to the client and the user must intsall/execute it on the client. But then you have the problem to access the databasse server...
=> You need a report builder created with UniGui or other web framework.
-
I have made some tests just editing the title of the event. Instead using the event title "New Event" i use:
<span title="event details...">New Event</span>
Displays "event details..." as hint
<span onmouseover="alert('Hello');">New Event</span>
Calls function alert(). Instead alert() you could use your own javascript function myfunc('EventId').
-
I have made two changes:
1. The uploading and uploaded files are displayed in the blue area itself.
2. Now everything is in one Frame, so it can be easy included on own forms in other projects.
To use it in other projects you can:
- copy UfraMultiUpload.pas and UfraMultiUpload.dfm to your project
- add UfraMultiUpload.pas to your project
- choose "Standard -> Frames" in component palette and insert "fraMultiUpload" on your own form
- doneedit: attachements uploaded again
- 1
-
1st: In the function "handleFiles(files)" the var "files" contains all files. I use only "var file = files[0];" for getting the first one. You must loop over all files ("for .... files").
2nd: In the function "handleReaderLoad(evt)" the var "evt.target.result" contains a string like this:
<img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0 vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Roter Punkt" />
You can upload this string (as parameter) to server using function "ajaxRequest()" and then handle it on server using the "onAjaxRequest"-event of the form (or a component) on server.
In "onAjaxRequest" on server you must extract the base64-code and decode it to binary file and save it. For decoding base64 there should be functions in Delphi (maybe in IndyComponents).
3rd: The name of the file is in the var "file.name". Send it to the server in the ajaxRequest() as parameter.
-
Is there a way to avoid the dialog box with TUniFileUpload.
Exemple can i write this "http://locahost:8077?filetoupload=c:\myimage.jpg and my server start the upload automatically ?
For security reasons, browsers do only allow the user to select files manually for upload.
In the same way, can i upload multi files with TUniFileUpload with wildward or not in once ?
For new browsers you can use HTML5 in a TUniHtmlFrame. But users must select or drag&drop files.
-
If you want to be independant from browser and office installation you can upload your office files to Microsoft Skydrive and there you can get a code to embed the document on a website (UniHtmlFrame).
-
Yes, I'm the same "UliBru".
The question seemed familiar.
Just on a search for a simple solution for a iPhone or Android remote control for my Delphi program (except VNC).
UniGui is not made (primarily) for remote control. But it should work anyway.
-
Do you have a code snippet for a browser polling the server?
Easiest way is to use a TUniTimer and in "onTimer" change the components on the (web)form, if there was changes (in the vcl-thread). But this will produce traffic and processor usage if the timer interval is too short.
I do not really understand. Because IMO 'if WebMode ... else ...' means switching between two forms.
I like still to have both PC and Browser running in parallel. So my main form is a VCL form as usual dispayed at the PC screen. In addition I like to create another form (uniGUI form) that is shown up on the browser. Actually now I have the uniGUI main form displayed in parallel at PC and at the browser.
Or do I have to run two applications at the PC, one is the intended program, the other one is just a server in background with the broswer GUI acting as remote control? And the two programs have to communicate then by IPC.
The browser session is another thread. It works like two (or more, if more browsers use it at the same time) applications in one. If you use the same form in both, you have two different instances of this form. So you can also use two different forms.
Are you the same "UliBru" like here ?
-
1. The two trackbars are not sync'd. How to achieve this, independent if the trackbar on the main VCL screen or on the browser screen is moved?
All sessions (VCL-window and browser-window(s)) are separate threads. So, if you want so, you have to synchronize them:
(or use IPC).
2nd problem: you can't (easy) send information from server to browser; so browser must ask the server: use a timer, long polling, websocket, or ...
2. My VCL application has a lot of components. It is not necessary and desired to show them all in the browser. So in my understanding I would like to have a standard VCL form running on the PC and another second simple uniGUI form with few selected components. The PC user shall not see the uniGUI form (just invisible?) and the browser user just shall use the reduced form like a remote control. Of course sync'ing is required. Is this possible and how to achieve it?
You could make 2 different Forms (or Frames) and create/show them alternatively:
if WebMode then "Create + Show web-Form" else "Create + Show Desktop-Form";
Application raize an error when a component (from other uniform) is referenced in anonymous procedure on showmodal.
in Feature Requests
Posted
if "FreeOnClose" of UniForm1 is "true", there is no instance of UniForm1 anymore (in the anonymous procedure).