Jump to content

bilcan

Members
  • Content Count

    24
  • Joined

  • Last visited

Everything posted by bilcan

  1. bilcan

    SQL Server Connection

    Hello Lennart, yes I am quite foreigner to NodeJS architecture, so as far as I understand, I do not need to use threads and also I should not use. I did have a look to server examples but they are quite simple, I hope you will write more complicated examples. As for DB, I think I have to wait for a while more for a SQL Server connection wrapper. Thank you for your great explanation.
  2. bilcan

    SQL Server Connection

    Hello, 2 questions. * We can write a Http or Websocket server software via Smart Mobile Studio. Is it possible to connect SQL Server directly? * Can I create a thread to handle websocket messages?
  3. bilcan

    Application.Display.OnMouseMove

    Thank you jarto.
  4. bilcan

    Application.Display.OnMouseMove

    I think I have to use Application.Display.SetCapture to capture global mouse movements but after I do that, I can't capture any w3Panel's OnmouseDown event? It used to work fine. Did I miss something? Application.Display.SetCapture; Application.Display.OnMouseMove := DisplayMouseMove;
  5. Hello Lennart, thank you for your notice, I did not know second param's feature. I have changed form creation part, so application create forms automatically at the beginning and I have not had any problem so far. P.S Migrating from 2.2 to 3.0 beta 2 was quite easy, thank you for your great work.
  6. Hello, I managed to migrate my old 2.2 application to 3.00 beta 2 but gotoform is not doing anything? What can be the reason? It used to work. unit Unit1; interface uses Pseudo.CreateForms, System.Types, SmartCL.System, SmartCL.Components, SmartCL.Forms, SmartCL.Application, FrmMain, FrmOdaListesi, FrmSalon, FrmConnectionunit, FrmOkeyMasa; type TApplication = class(TW3CustomApplication) private FrmOdaListesi: TFrmOdaListesi; FrmSalon: TFrmSalon; FrmOkeyMasa: TFrmOkeyMasa; FrmConnection: TFrmConnection; public procedure ApplicationStarting; override; end; implementation procedure TApplication.ApplicationStarting; begin FrmOdaListesi := TFrmOdaListesi.Create(Display.View); FrmOdaListesi.Name := 'FrmOdaListesi'; RegisterFormInstance(FrmOdaListesi, True); FrmSalon := TFrmSalon.Create(Display.View); FrmSalon.Name := 'FrmSalon'; RegisterFormInstance(FrmSalon, True); FrmOkeyMasa := TFrmOkeyMasa.Create(Display.View); FrmOkeyMasa.Name := 'FrmOkeyMasa'; RegisterFormInstance(FrmOkeyMasa, True); FrmConnection := TFrmConnection.Create(Display.View); FrmConnection.Name := 'FrmConnection'; RegisterFormInstance(FrmConnection, True); inherited; end; end.
  7. Thank you jarto, I'll send it.
  8. unit Unit1; interface uses NodeJS.Core, System.Types, System.Types.Convert, System.Objects, System.Device.Storage, System.Streams, System.Reader, System.Writer, System.JSON, System.IOUtils, SmartNJ.System, SmartNJ.Device.Storage, SmartNJ.Application, SmartNJ.Server.WebSocket; type TNodeProgram = class(TObject) private FServer: TNJWebSocketServer; protected procedure HandleServerStarted(Sender: TObject); public procedure Execute; constructor Create; virtual; destructor Destroy; override; end; implementation constructor TNodeProgram.Create; begin inherited Create; FServer := TNJWebSocketServer.Create; FServer.Port := 3500; FServer.OnAfterServerStarted := HandleServerStarted; end; destructor TNodeProgram.Destroy; begin FServer.free; inherited; end; procedure TNodeProgram.Execute; begin FServer.Start(); end; procedure TNodeProgram.HandleServerStarted(Sender: TObject); begin WritelnF('Server listening on port %d', [FServer.port]); end; end. And I got following error message. (I installed nodejs websocket) [info] Program starting E:\SmartMobile\Server\output\Server.js:5076 throw EW3Exception.CreateFmt($New(ENJWebSocketServer),"Failed to create websocket server object, system threw exception %s with message [%s]",[TObject.ClassName(e$11.ClassType), e$11.FMessage]); ^ [object Object] [info] Program stopped
  9. bilcan

    Websocket Server Start Error

    Hello lennart, I did not know that I have to install ws package in to output directory. I did and it worked right away. Thank you.
  10. bilcan

    TW3JsonStructure ver 2.9.9.41

    Hi, I downloaded 2.9.9.41 and tried to compile my old application but I think I could not find correct unit. I added System.JSON, System.Structure.XML, System.Structure.JSON but no luck.
  11. bilcan

    WebSocket SSL Connection

    Is it possible to create SSL connection over websocket from Smart Mobile Studio? I send and recieve data via websockets and it works fine. But I want to add some security. If there is a possibility a simple example would be great.
  12. bilcan

    tw3Image not move after loadfromurl

    Hi, I put a tw3Image on form and I can move it via form's mouse events. But I can't do that after loading an image via loadfromurl. Mouse cursor turn into crno and not allowed me to move the object. is this a bug or am I missing somethings?
  13. bilcan

    Mouse coordinates

    Is there a function which give me current cursor pos? (Like Delphi TMouse.CursorPos) I'd like to know current mouse cursor pos unrelated any component.
  14. bilcan

    Drag and Drop issue

    Hi, I worked on Drag and Drop demo for a while but I noticed that when I moving a component (w3panel, or w3Image) if I move a bit faster I lost the control of the object. Is there a way to prevent this or this is a known issue at Smart Mobile Studio?
  15. Thank you for replies...
  16. Hi, I'd like to copy an Image's any part to another Image but I can't reach canvas of the picture and I don't know how to copy back canvas to another Image. thank you.
  17. I have encountered some strange things, I am not sure these are bugs or not. 1-) I use Application.GotoForm(FrmXXXX, fefromright) to navigate another forms and it works fine but if I use fenone parameter, SMS navigates me to a different form !!! 2-) I have created my own tw3panel class (tw3mypanel) and has 4 tw3mybutton class which has own Tw3label. For example there are 2 tmyw3panel object on form1 and when I navigate back to form1 from form2 tw3labels on tw3mypanel disappear and buttons on tw3mypanel move to different locations from I set on create event !!! There are total 5 forms in my project (Include Main form). I use beta5
  18. Hi, I saw only one property on Tw3Memo which is Text. Is it possible to use Tw3Memo like Delphi TMemo, I mean I'd like to add a text line to memo (TW3Memo.Add) and is it possible to add images (GIF, JPG, BMP, PNG...) thank you.
  19. bilcan

    Reading JSON data

    Thank you, I solved the problem.
  20. bilcan

    Reading JSON data

    What is the way of reading that kind of JSON data. I tried some ways which I found at the forum but I could not. {This is Embarcadero example of Json} uses System.json; var Obj, ObjCons, ObjIpp: TJSONObject; begin Obj := TJSONObject.Create; try ObjIpp := TJSONObject.Create; ObjIpp.AddPair('ipp', TJSONNumber.Create(1122368)); ObjCons := TJSONObject.Create; ObjCons.AddPair('decision', 'NA'); ObjCons.AddPair('idPatient', ObjIpp); ObjCons.AddPair('idStructure', TJSONNumber.Create(300000000023887)); Obj.AddPair('consentement', ObjCons); Memo1.Lines.Add(Obj.ToJSON); finally Obj.Free; end; end;
  21. { SOLUTION III } // use W3CheckBox1 component as public (global) TForm1(Application.FormByName('Form1')).W3CheckBox1.Checked := not TForm1(Application.FormByName('Form1')).W3CheckBox1.Checked; Hi, how can I declare W3CheckBox1 as public?
  22. This is my way, I have not found better way so far. I tried to access directly to BtnGiris but I got "Syntax Error: Member symbol "BtnGiris" is not visible from this scope [line: 91, column: 51, file: miniClientUnit]" By the way, I'd like to thank you @ielite, he opened the topic for me. {Form 1} unit FrmMain; interface uses SmartCL.System, SmartCL.Graphics, SmartCL.Components, SmartCL.Forms, SmartCL.Fonts, SmartCL.Borders, SmartCL.Application, SmartCL.Controls.Panel, SmartCL.Controls.EditBox, SmartCL.Controls.Label, SmartCL.Controls.Button; type TFrmMain = class(TW3Form) procedure BtnGirisClick(Sender: TObject); public procedure MakeBtnGirisEnable; private {$I 'FrmMain:intf'} protected procedure InitializeForm; override; procedure InitializeObject; override; procedure Resize; override; end; ..... procedure TFrmMain.MakeBtnGirisEnable; begin BtnGiris.Enabled := True; end; {Form2 or another unit} ..... procedure TminiClient.SocketMessage(sender: TW3WebSocket; Message: TWebSocketMessageData); begin ...... TFrmMain(Application.FormByName('FrmMain')).MakeBtnGirisEnable; end;
  23. Hi Please have a look at my demo code. http://wikisend.com/download/546832/SMS.zip
  24. bilcan

    TCP connection

    Hi, I followed the steps above, but I couldn't receive any data. I get "WebSocket connection to 'ws://google.com/' failed: Unexpected response code: 400 [line #153]" error.
×