jahlxx
uniGUI Subscriber-
Posts
1241 -
Joined
-
Last visited
-
Days Won
3
jahlxx's Achievements
Advanced Member (4/4)
23
Reputation
-
Hi. In an htmlframe, I load an html file that contains an html form. All is OK, and correctly shown, but when I press Tab key, the focus don't move between html form elements, it moves between unigui elements. How can I solve this? Thanks.
-
Hi all. In applications, in servermodule, in beforeinit procedure, I load some custom css. I have hybrid application. Is there any way to detect the device from I am calling the application, and if it is a mobile device con't load that css? Thanks.
-
Of course. Done with touch components. I 've followed these steps: 1.- In a unimform, put 2 unimedits (xlat, xlon), and a unimbutton (disabled). 2. In the onshow event of the form, this code: xlat.text := 'x'; xlon.text := 'x'; uniSession.addJS ( 'if ("geolocation" in navigator) {' + ' var watchID = navigator.geolocation.watchPosition(' + ' function(position) {' + xlat.JSName+'.setValue(position.coords.latitude);' + xlon.JSName+'.setValue(position.coords.longitude);' + ' }' + ');' + '} else {' + xlat.JSName+'.setValue("x");' + xlon.JSName+'.setValue("x");' + '}' ); 4. This ask the user to allow the app to access the location. (tested in android and an iOS cell phones) (I think that as Sherzod said in a post before, this depends of the browser, not the device). 5. If the user accept, then after a few seconds, latitude and longitude appear in the unimedits (xlat and xlon). If not, the values remains set to 'x'. 6. Give some code, to the xlat (or xlon) edit onchange event. What value is not 'x', then the button is enabled, and do what you want in the onclick event. When enabled, meand that device could be geolocated. Value 'x' means that geolocation is not done, due to the user denied the permission, and/or technical issues that didn't the browser to be able to locate the device. In my case, is mandatory to be geolocated. If not, the service will be unavailable for the user. That's all.
-
Ok friends. Thanks to all. Everything works perfect. Tested in android and ios devices with success. Thanks.
-
Ok. Thanks friend. Everything works perfect. I have tested in android cell phone. Should this work in iPhone too?
-
Hi. In Ext JS Event of a UnimButton, I have this: function tap(sender, e, eOpts) { MainmForm.xedit.setText('Clicked !!'); } It seems to do nothing. But, if I do this: function tap(sender, e, eOpts) { alert ("clicked!!"); } Works OK. All of this, with UniGUI desktop application, works, but no in mobile. Someone knows where is the problem? I need to write to xedit (it is s tunimedit). Thanks in advance.
-
WOW. Thanks friend. I almost got it. With your code, raises this compile errors; [dcc32 Error] Main.pas(70): E2003 Undeclared identifier: ' MyDataLabel' [dcc32 Error] Main.pas(70): E2029 ')' expected but identifier 'JSId ' found If I try other code based in yours: uniSession.addJS ( 'if ("geolocation" in navigator) {' + ' var watchID = navigator.geolocation.watchPosition(' + ' function(position) {' + ' alert ("geolocation IS available "+ "lat:" + position.coords.latitude + ", long:" + position.coords.longitude);' + ' }' + ');' + '} else {' + ' alert ("geolocation IS NOT available");' + '}' ); This works, but have 2 problems: 1) I don't know how to return lat ans long to 2 variables (delphi variables) 2) The call to that JS is called permanently until close the browser or the browser page where is running. Any idea?
-
Ok friend. I'll test. Do you have a full example to help me? (in delphi) Thanks.
-
Hi. This works perfect, thanks. The only problem is that the location is not OK. For example it give my location in other city near me. For the purpose I'm working, I need more accuracy. Is possible activate the GPS in the cell phone from a unigui mobile application? I need the exact location (or as near as possible) of the user for some operations. Some mobile applications, raise a message in the cell phone asking for activate the GPS, and if its not activated, the the option dosen't works. Is there any way to do this? Thanks.
-
Thanks. I'll try. But this used to work in the past. I don't know since when this doesn't works. Is very suspicious that typing the url in the browser works, but don't work from application.
-
Hi all. I have this function (is an example): function Tlib.GetGeoInfo2(const IpAddress: string): string; var get_url: string; lHTTP: TIdHTTP; sURL: string; xgeoloc: string; begin lHTTP := TIdHTTP.Create(nil); sURL := 'http://api.ipinfodb.com/v3/ip-city/?key=bf37c2d7fffa57c8a0dd1260bdfe5dcaf587b250562ea1f768b5cc4eb3f55b99&ip=188.85.82.223'; //get_url := Format(sURL, [IpAddress]); xgeoloc := ''; try xgeoloc := lHTTP.Get(sURL); finally lHTTP.free; end; GetGeoInfo2 := xgeoloc; end; In I run this, returns HTTP/1.1 403 Forbidden, but, If I copy the url, and paste directly in a browser, works perfect. Please, can someone give me some help? Thanks.
-
Ok. Take the demo: \FMSoft\Framework\uniGUI\Demos\Desktop\DBLookupComboBox - Custom Remote Query Add a button in mainform, and in onclick event: UniDBLookupComboBox1.keyvalue:='10001'; This does nothing.