Jump to content

Pink-El

uniGUI Subscriber
  • Posts

    140
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Pink-El

  1. Hi

     

    Where do you set these paths? At deigner?

    No. Runtime

    procedure TUniServerModule.UniGUIServerModuleBeforeInit(Sender: TObject);
    begin
     ExtRoot:='.\[ext]';
     UniRoot:='.\[uni]\';
     UniMobileRoot:='.\[unim]\';
     TouchRoot:='.\[touch]\';
    end;
     
    I found problem. The name of the folder has to be uni-0.99.80.1273 and not depend what I wrote in UniGUIServerModuleBeforeInit event. 
    I can not found a goal of this behavior.
    Dmytro
  2. Hello,

    Build 1273

     

    What is happened with paths? I copied my application to the server and it does not work. In the log:

     

    webwaiter.exe: 00000EDC: 18:43:46 [TUniServerModule]:Server First Init.

    webwaiter.exe: 00000EDC: 18:43:46 [TUniServerModule]:Erasing Cache Folder...

    webwaiter.exe: 00000EDC: 18:43:46 [TUniServerModule]:Cache Folder Erased. <0> Files deleted.

    webwaiter.exe: 00000EDC: 18:43:46 [TUniServerModule]:HTTP Server Started.

    webwaiter.exe: 000007E8: 18:43:55 []:TUniThemeProps: File not found: C:\unim\css\uni-sencha-touch.css

    webwaiter.exe: 000007E8: 18:43:55 [HandleFileRequest[127.0.0.1]]:File not found: C:\unim\css\uni-ext.css

    webwaiter.exe: 00000AC8: 18:43:55 [HandleFileRequest[127.0.0.1]]:File not found: C:\uni\ext-unicommon-min.js

    webwaiter.exe: 00000530: 18:43:55 [HandleFileRequest[127.0.0.1]]:File not found: C:\unim\locale\ext-lang-ukr.js

    webwaiter.exe: 0000062C: 18:43:56 [HandleFileRequest[127.0.0.1]]:File not found: C:\uni\ext-sync-min.js

    webwaiter.exe: 00000BD4: 18:43:56 [HandleFileRequest[127.0.0.1]]:File not found: C:\unim\touch-unigui-min.js

     

    Settings:

    ExtRoot:='.\[ext]';

    UniRoot:='.\[uni]\';

    UniMobileRoot:='.\[unim]\';

    TouchRoot:='.\[touch]\';

     

    unim and uni are located in the server root folder

     

    I tried to set path directly for Uniroot and Unimobileroot on my computer 

     

    UniRoot:='c:\temp\uni\';

    UniMobileRoot:='c:\temp\unim';

     

    and I found in the log;

     

    webwaiter.exe: 000038C4: 18:48:52 []:TUniThemeProps: File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\unim\css\uni-sencha-touch.css

    webwaiter.exe: 000038C4: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: c:\temp\touch\resources\css\sencha-touch.css

    webwaiter.exe: 0000033C: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: c:\temp\touch\sencha-touch-all.js

    webwaiter.exe: 000053A8: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\unim\css\uni-ext.css

    webwaiter.exe: 00007878: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\uni\ext-unicommon-min.js

    webwaiter.exe: 000054D8: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\uni\ext-sync-min.js

    webwaiter.exe: 00004CF0: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\unim\locale\ext-lang-uk.js

    webwaiter.exe: 00006290: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: c:\temp\touch\packages\sencha-touch-grid\build\sencha-touch-grid.js

    webwaiter.exe: 00005024: 18:48:52 [HandleFileRequest[127.0.0.1]]:File not found: C:\Program Files (x86)\FMSoft\Framework\unigui\unim\touch-unigui-min.js

     

    How to fix it?

    Dmytro

  3. Well, it`s good code but I can not to understand how implement third-party script with existing page. In my example some java script functions plugin to the page and I just need back some values. The simple way to generate ajax event with parameters and catch there on the server. As far as I can see the problem with first parameter of the ajax event. I need to get UserID and Username for the login.

    Mainmform is unknow object. Window and document are ok but server part does not catch event. I am lost a little

    Dmytro

  4. Hello,

    I need create facebook login in my app.

    I added fblogin.js to the custom files

    When I use the following  code <fb:login-button scope="public_profile,email" onlogin="checkLoginState();"></fb:login-button><div id="status"></div>

    On click event back me with a result to the java function  on the page

    function testAPI(userID) {
        console.log('Welcome!  Fetching your information.... ');
        FB.api('/me', function(response) {
              ajaxRequest(MainmForm, 'fblogin', []);
          document.getElementById('status').innerHTML =
            'Thanks for logging in, ' + response.name+' ID '+userID +'!';
        });
    }
    
    

    I tried to generate ajax event but I`ve got error message Event:fblogin Object not found in session list

    How to fix it?

     

    fblogin.js

    // JavaScript Document
    
      // This is called with the results from from FB.getLoginStatus().
      function statusChangeCallback(response) {
        console.log('statusChangeCallback');
        console.log(response);
        // The response object is returned with a status field that lets the
        // app know the current login status of the person.
        // Full docs on the response object can be found in the documentation
        // for FB.getLoginStatus().
        if (response.status === 'connected') {
          // Logged into your app and Facebook.
    	  var uid = response.authResponse.userID;
    	  //var uname = response.name;	  
    	  // alert(uname);
    	  // alert(uid);
          testAPI(uid);
        } else if (response.status === 'not_authorized') {
          // The person is logged into Facebook, but not your app.
          document.getElementById('status').innerHTML = 'Please log ' +
            'into this app.';
        } else {
          // The person is not logged into Facebook, so we're not sure if
          // they are logged into this app or not.
          document.getElementById('status').innerHTML = 'Please log ' +
            'into Facebook.';
        }
      }
    
      // This function is called when someone finishes with the Login
      // Button.  See the onlogin handler attached to it in the sample
      // code below.
      function checkLoginState() {
        FB.getLoginStatus(function(response) {
          statusChangeCallback(response);
        });
      }
    
      window.fbAsyncInit = function() {
      FB.init({
        appId      : '1558074717851346',
        cookie     : true,  // enable cookies to allow the server to access 
                            // the session
        xfbml      : true,  // parse social plugins on this page
        version    : 'v2.5' // use version 2.2
      });
    
      // Now that we've initialized the JavaScript SDK, we call 
      // FB.getLoginStatus().  This function gets the state of the
      // person visiting this page and can return one of three states to
      // the callback you provide.  They can be:
      //
      // 1. Logged into your app ('connected')
      // 2. Logged into Facebook, but not your app ('not_authorized')
      // 3. Not logged into Facebook and can't tell if they are logged into
      //    your app or not.
      //
      // These three cases are handled in the callback function.
    
      FB.getLoginStatus(function(response) {
        statusChangeCallback(response);
      });
    
      };
    
      // Load the SDK asynchronously
      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
    
      // Here we run a very simple test of the Graph API after login is
      // successful.  See statusChangeCallback() for when this call is made.
      function testAPI(userID) {
        console.log('Welcome!  Fetching your information.... ');
        FB.api('/me', function(response) {
           // if (response.id) {
           //     var facebook_userid = response.id;
           // }
              ajaxRequest(MainmForm, 'fblogin', []);
     	  //var uid = response.authResponse.userID;
    	  //console.log('Successful login for: ' + response.name);
          document.getElementById('status').innerHTML =
            'Thanks for logging in, ' + response.name+' ID '+userID +'!';
        });
      }
    
    

    Regards,

    Dmytro

  5. Hello,

    I need to add facebook login java script to the TUnimForm but I can not find script property. How to do it?

    <script>
      // This is called with the results from from FB.getLoginStatus().
      function statusChangeCallback(response) {
        console.log('statusChangeCallback');
        console.log(response);
        // The response object is returned with a status field that lets the
        // app know the current login status of the person.
        // Full docs on the response object can be found in the documentation
        // for FB.getLoginStatus().
        if (response.status === 'connected') {
          // Logged into your app and Facebook.
    	  var uid = response.authResponse.userID;
    	  //var uname = response.name;	  
    	  // alert(uname);
    	  // alert(uid);
          testAPI(uid);
        } else if (response.status === 'not_authorized') {
          // The person is logged into Facebook, but not your app.
          document.getElementById('status').innerHTML = 'Please log ' +
            'into this app.';
        } else {
          // The person is not logged into Facebook, so we're not sure if
          // they are logged into this app or not.
          document.getElementById('status').innerHTML = 'Please log ' +
            'into Facebook.';
        }
      }
    
      // This function is called when someone finishes with the Login
      // Button.  See the onlogin handler attached to it in the sample
      // code below.
      function checkLoginState() {
        FB.getLoginStatus(function(response) {
          statusChangeCallback(response);
        });
      }
    
      window.fbAsyncInit = function() {
      FB.init({
        appId      : '1667654300160467',
        cookie     : true,  // enable cookies to allow the server to access 
                            // the session
        xfbml      : true,  // parse social plugins on this page
        version    : 'v2.5' // use version 2.2
      });
    
      // Now that we've initialized the JavaScript SDK, we call 
      // FB.getLoginStatus().  This function gets the state of the
      // person visiting this page and can return one of three states to
      // the callback you provide.  They can be:
      //
      // 1. Logged into your app ('connected')
      // 2. Logged into Facebook, but not your app ('not_authorized')
      // 3. Not logged into Facebook and can't tell if they are logged into
      //    your app or not.
      //
      // These three cases are handled in the callback function.
    
      FB.getLoginStatus(function(response) {
        statusChangeCallback(response);
      });
    
      };
    
      // Load the SDK asynchronously
      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
    
      // Here we run a very simple test of the Graph API after login is
      // successful.  See statusChangeCallback() for when this call is made.
      function testAPI(userID) {
        console.log('Welcome!  Fetching your information.... ');
        FB.api('/me', function(response) {
           // if (response.id) {
           //     var facebook_userid = response.id;
           // }
      
     	  //var uid = response.authResponse.userID;
    	  console.log('Successful login for: ' + response.name);
          document.getElementById('status').innerHTML =
            'Thanks for logging in, ' + response.name+' ID '+userID +'!';
        });
      }
    </script> 

    Regards,

    Dmytro

  6. Hello,

    I found how to catch direction of the swipe but I can not to find how to close current form in the script.

    Hide method works but I need close. Have you any ideas?

    function window.afterCreate(sender)

    {

     

      sender.element.on("swipe",

        function(e){

          if(e.direction=='right')  {

          alert("onSwipeRight");         

          window.Close();

          }

          if(e.direction=='left')  {

          alert("onSwipeLeft")

          }

     

        }

      )

    }

  7. Thank you, will try

    Dmytro

    Unfortunately it does not work. I call function with Showmessage from UniMainModule and as a result I can see windows message dialog

    Example

    procedure TUnimForm1.BSaveClick(Sender: TObject);

    begin

    UniMainModule.Test;

    end;

    procedure TUniMainModule.Test;

    begin

      ShowMessage(‘Hello’);

    end;

    Dmytro

  8. Hello,
    I am lost with google map. I am sorry. I created mobile app and copy UnimHTMLFrame1 from googledemo form. After running I`ve got Ajax Error variable googlemap not found. As I see I`ll need to add something to the project. Right?
    Dmytro

  9. Well, I tried different ways but I did not found how to set scrollwidth… My idea was to create Unipanel set the width and use Insertcontrol method of the uniscrollbox, but no effect. I can scroll but uniscrollbox does not update scrollwidth and back… Any ideas?

  10. UnimScrollBox does not work correctly. It does not fix curret position if create child controls dynamic. Can you help me?
    for i:=0 to 100 do
      begin

      with TUnimButton(InsertControl(TUnimButton.Create(Self))) do
      begin
        height:=25;
        width:=40;
        Left:=width+i*(width+5);
        Top:=65;
        Caption:=IntToStr(i);
        OnClick:=UnimButton1Click;
        Parent:=UnimScrollBox1;
      end;

     

    Dmytro

  11. for the stand alone server code is Ext.Component({id:"O25_id",html:"\x3Cimg src='m/cache/bakerymobile/__2957D50B65600F0B8EBD4C92.png' width='93' height='89' hspace='0' vspace='0'\x3E"

    for the ISAPI code is Ext.Component({id:"O25_id",html:"\x3Cimg src='data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D' width='93' height='89' hspace='0' vspace='0'\x3E"

     

    and I do not see picture in the cache folder. 

    May be compiler forgot to include image file or problem with path in ISAPI mode.

     

    I use function

     function GetModuleFileSpec: String;
     var
       cret: integer;
       ModName: array[0..MAX_PATH - 1] of Char;
     begin
       Windows.GetModuleFileName(HInstance, ModName, SizeOf(ModName));
       cret := GetLongPathName(ModName, ModName, SizeOf(ModName));
       SetString(Result, ModName, cret);
     end;
    

    but this function returns \\?\c:\myweb string under IIS and I needed to cut first symbols

     

    Dmytro

  12. I have same problem with ISAPI under IIS Delphi XE2. In my case it`s png image.

    no file in the cach folder

    source is <img src="data:image/gif,base64,R0IGODlhQA....%3D" width="93" height="89" hspace="0" vspace="0">

    but i can see in cach folder other icons like plus and so on

×
×
  • Create New...