Search the Community
Showing results for tags 'desktop'.
-
FARSHAD, please add this feature. I have all the code shown below. Works nice. I wanted a /d switch to force desktop mode, just like /m forces mobile mode. I searched and searched and only found one mediocre solution. It required that you change the ServerModule.UniServerModule.Options:=serverModule.UniServerModule.Options-[soAutoPlatformSwitch]; P:=the URL without the /m so that it loads the Desktop version UniSession.UrlRedirect(P); With this logic, it mostly worked, but would hang sometimes. Also, it changes the way the server operates. IE: If ANOTHER user logs in on another session, there would be NO AUTO DETECT FOR THE PLATFORM SWITCH So, i discarded it. Also, there are a number of sites that describe how to get the iPad Safari to force desktop mode. My OLD iPad didn't have the available setting to do that AND if it DID work, it would force ALL web sites to use the desktop version. Couldn't make it site specific, like you can in chrome. The solution needs to EASY and not mess up other web sites... and not hang... and not mess up with the auto platform switching. SOOOOOooo, i added a new switch. I added the "/d" switch. Much like the /m forces the mobile mode, the /d forces the desktop mode. THis magic is done in the uniGUIServer.pas file. And inside the GetUniGUISession function. Add this in vars. ForceDeskTop:Boolean; //DLR Then add the ForceDesktop:=False in between the FServerMonitor and SessionClass initializations. FServerMonitor := False; ForceDeskTop:= False; // DLR SessionClass := TUniGUISession; Then after the check for the 'server' switch, add the check for the /d switch... ADoc := uniHTTPDocument(ARequest.Document); FServerMonitor := SameText(ADoc, 'server') and FAllowWebMonitor; if FServerMonitor then begin ARequest.Document := '/'; ADoc := ''; end; { DLR - Check for the /D switch } ForceDeskTop:= SameText(ADoc, 'd'); if ForceDeskTop then begin ARequest.Document := '/'; ADoc := ''; end; The final piece of the puzzle is to bypass the auto switch. So, place the new code after setting the ForceMobile variable. ForceMobile := (not Assigned(MainFormClass[TUniPlatformDesktop])) or ( (soAutoPlatformSwitch in FOptions) and (currPlatform = upMobile) ); { DLR Should i get rid of ForceMobile? } If ForceDeskTop Then ForceMobile:=False; So, essentially, if i find the /d then i ignore the auto switch. This allows for 3 ways to load the application... 1. somesite.com/mdemo.dll works for most cases and devices. 2. somesite.com/mdemo.dll/m allows you to force it show the MOBILE forms 3. somesite.com/mdemo.dll/d allows you to force it show the DESKTOP forms I know this is not elegant, but gives the "force desktop" capability without messing around with the server options that can affect other sessions. And you don't have to mess around with browser settings. To me this was the best solution. FARSHAD: Could you please add this /d capability so that others can also make use of this? 95% of the time the auto works great. But for iPads and tablets that are large enuf, its nice to view the DESKTOP version even though the stupid browser on the device might indicate that it's a mobile device. Make sense? Thanks DAvie
-
Hello, UniGUi personal, Desktop application I would like to activate suggests while typing in an uniedit box. Is there a way to do it? (I searched in forum but didn't find how). If yes pleas tell me where to put code (if Unievents etc.), i am a newbie. thanks Filippo
-
I want to build a Hybrid Application and use a Desktop Form to Login (request an account if necessary) then once logged in test if Desktop or Mobile and show the appropriate Desktop or Mobile form - please advise how to analyse users platform - Thanks in advance.
-
Hello, UniGUI uses different component sets for desktop and mobile. If I want to create an application in desktop and mobile versions (for example http://www.myapplication.comand http://m.myapplication.com), do I have to create 2 separate projects? And what is the hosting strategy for this case? Thank you in advance.
-
Hi, I've tried to create a mobile version of the proof of concept desktop application I've created. I did this by creating first of all a mobile application with the wizard, and then adding the frames (from the desktop version) as well as all needed code/dependencies into the mobile application. Then I replaced the server module and session module (main module) generated by the wizard, with those defined in the desktop application (remove and add the ones from the other project.) Lastly I wired up the frames (login and main frame) onto the corresponding mobile forms and then rejigging them to be positioned reasonably. The project then compiled and ran fine. However when attempting to use it, I get in my browser the following errors 1) First of all an alert dialog displaying "Cannot read property Panel of undefined" 2) When dismissing this I then get a (nicely animated) dialog displaying: Ajax Error O44 is not defined I'm completely at a loss as to what might be causing this. Has anybody seen it? Have I done something wrong or broken something inadvertently? Many thanks. Edit: I've just created another blank mobile app with nothing in it but: a) MainForm b.) LoginForm c) LoginFrame with edit and button added d) Login Frame dropped on Login form e) Compile, Run. Result: Alert saying "Cannot read property 'Text" of undefined." So I suppose this must be yet another trial limitation or bug? (Can I just tactfully say that the trial limitations are making it quite difficult for me to try and develop something sufficiently compelling to get agreement from customers, nor is it helping convince me that the quality/stability is there to risk taking to production...)