Jump to content

IElite

Members
  • Content count

    984
  • Joined

  • Last visited

About IElite

  • Rank

Contact Methods

  • Website URL
    https://www.facebook.com/coldrivermedia

Profile Information

  • Gender
    Male
  • Interests
    FreePascal, Delphi, Smart Mobile Studio

Business

  • Company name
    Cold River Labs
  • Sector
    Information technology
  • Position
    Founder

Smart Mobile Studio

  • Edition
    Professional

Recent Profile Visitors

3,817 profile views
  1. POST by Sockets

    alright, so , I dont want to have to keep asking you one question at a time, but did you then try your URL? If so, do you still connect? etc, etc. etc. Its process of elimination here....
  2. POST by Sockets

    comment out your try except block and let the OnError event test for error replace your url with the test url: wss://echo.websocket.org Do you get a "Socket Connected!" message?
  3. POST by Sockets

    You did not say whether you got an error, whether or not you know you were connected, or what your jso to Json looks like Did you use your socket open event to test for a connection? FSocket.OnOpen:= Procedure (Sender:TW3WebSocket) begin writeln("Socket connected"); //Sender.Write("your data here"); end; what about your on error event? Did you get an error at all? are you handling the message event?
  4. W3webSocket

    Mine runs fine! See my code below. If yours does not work, you need to uninstall and re-install. First , Make sure you first save your projects folder (any work that is not part of SMS install) and your license (user.lic) file Next. Uninstall any versions you have installed AND/OR remove any old install locations delete all remaining occurrences of C:\Program Files (x86)\Smart Mobile Studio C:\users\<username>\My Documents\Smart Mobile Projects C:\ProgramData\The Smart Company\Smart Mobile Studio Next Re-install using : http://smartmobilestudio.com/alpha.zip (just unzip folder) Next Run the SmartUpdate.exe unit Form1; interface uses W3C.DOM, System.Types, System.Types.Convert, System.Objects, System.Time, SmartCL.Net.websocket, SmartCL.System, SmartCL.Time, SmartCL.Graphics, SmartCL.Components, SmartCL.FileUtils, SmartCL.Forms, SmartCL.Fonts, SmartCL.Theme, SmartCL.Borders, SmartCL.Application, SmartCL.Controls.Button; type TForm1 = class(TW3Form) procedure W3Button1Click(Sender: TObject); private {$I 'Form1:intf'} FSocket : TW3WebSocket; protected procedure InitializeForm; override; procedure InitializeObject; override; procedure Resize; override; end; implementation { TForm1 } procedure TForm1.W3Button1Click(Sender: TObject); begin FSocket.Connect("wss://echo.websocket.org",[],nil); end; procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components end; procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} FSocket := TW3WebSocket.Create; FSocket.OnOpen:= Procedure (Sender:TW3WebSocket) begin ShowMessage("Socket connected"); Sender.Write("your data here"); end; FSocket.OnClosed:=procedure (Sender:TW3WebSocket) begin ShowMessage("Socket disconnected"); end; FSocket.OnMessage:= Procedure (Sender: TW3WebSocket; Message: TWebSocketMessageData) begin ShowMessage("Data received:" + Message.mdText); end; FSocket.OnError:= procedure (Sender: TW3WebSocket; const Error: JEvent) begin ShowMessage("Socket has errors"); end; end; procedure TForm1.Resize; begin inherited; end; initialization Forms.RegisterForm({$I %FILE%}, TForm1); end.
  5. W3webSocket

    I get no error when compiling FSocket.OnError:= procedure (Sender: TW3WebSocket; const Error: JEvent) begin writeln("Socket has errors"); end;
  6. W3webSocket

    This one compiles and runs without error for me as well procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components var FSocket: TW3WebSocket; FSocket := TW3WebSocket.Create; FSocket.Connect('http://192.168.1.170:8085/api/pedidoslogistic',[],nil) end; [INFO] Building project 'test'... [INFO] Compilation successful [227 ms] [INFO] Generating JavaScript successful [553 ms] [INFO] Linking successful [31 ms]
  7. W3webSocket

    It compiles just fine for me on 3.0.0.209 procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components var FSocket: TW3WebSocket; FSocket := TW3WebSocket.Create; FSocket.Connect('http://192.168.1.170:8085/api/pedidoslogistic',[]); end; [INFO] Building project 'test'... [INFO] Compilation successful [166 ms] [INFO] Generating JavaScript successful [585 ms] [INFO] Linking successful [50 ms]
  8. W3webSocket

    you should have procedure Connect(URL: string; Protocols: array of string; const CB: TWebSocketCallback); procedure Connect(URL: string; Protocols: array of string); overload; procedure Connect(URL: string); overload;
  9. W3webSocket

    Update using smart update?
  10. Max length text in editbox

    or W3EditBox1.handle.setAttribute('maxlength', '5');
  11. Max length text in editbox

    procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} w3_setAttrib(W3EditBox1.handle, 'maxlength', '10'); end;
  12. Calling a method of another class

    Can we see your code? Did you instantiate TMyControl in TMyChildRed ? Did you make your method public within the TMyControl class?
  13. Node.JS - simple server - fails to compile

    hmm, i dont have that folder called "Simple Server demo"
  14. Node.JS - simple server - fails to compile

    It also compiles and runs on mine as well [info] Program starting 12 Apr 19:11:29 - Server listening on port 1881
  15. Where is rtl folder?

    When installing Smart Mobile Studio (SMS) the following is the default path: C:\Program Files (x86)\Smart Mobile Studio Once installed, the following folders are created: C:\Program Files (x86)\Smart Mobile Studio C:\users\<username>\My Documents\Smart Mobile Projects C:\ProgramData\The Smart Company\Smart Mobile Studio NOTE: During the install, no Registry entries are created When running SMS for the first time, the following files are created in the following folders C:\ProgramData\The Smart Company\Smart Mobile Studio 1. User.lic 2. Keyboard _Shortcuts.XML C:\ProgramData\The Smart Company\Smart Mobile Studio\Layouts 1. DefaultLayout.Layout (configuration file) NOTE: During the first run, the following registry entries are created HKEY_CURRENT_USER\Software\Optimale Systemer AS HKEY_CURRENT_USER\Software\Optimale Systemer AS\Smart Mobile Studio HKEY_CURRENT_USER\Software\Optimale Systemer AS\Smart Mobile Studio\FormMain 1. Flags 2. FormVersion 3. MinMaxPos 4. NormPos 5. PixelsPerInch 6. ShowCmd
×