Questions tagged [smart-mobile-studio]

Smart Mobile Studio is a RAD tool for programming web client applications in an Object Pascal Dialect.

Smart Mobile Studio takes a program, written in a dialect of the Object Pascal and compiles it to a JavaScript. Run time library supports various browsers - from mobile (Safari, Android, Chrome) to desktop (Safari, Chrome, Firefox). Development environment supports creation of visual applications, games and console applications.

36 questions
6
votes
1 answer

How do i use events at design time in Smart Mobile Studio?

Am i missing something here? I purchased Smart Mobile Studio two days ago, and been trying its features. I would expected that it would at least emulate delphi’s event model. No? Shouldn't I be able to click on a control and have access to an…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
5
votes
1 answer

How do i use AudioContext in WebAudio

I'm trying to create a way to generate sounds in sms. This gives me a "Cannot call method 'createScriptProcessor' of null" ? Is the JAudioContext supposed to be created ? ... AudioContext : JAudioContext; node :…
5
votes
1 answer

Add colors to Box2D objects in Smart Mobile Studio

I want to add colors to dynamic objects in Box2D. It seems like some properties of dynamic objects have to be assigned in the rendering of the scene. I have played around with the Box2D demo but can't figure out how to add properties like colors…
Flemming
  • 694
  • 7
  • 22
5
votes
2 answers

Using Smart Mobile Studio to interact with a mySQL database

Is there any way what-so-ever of SMS interacting with a mySQL database on my host site? What if I make the SMS code reside there? Is there any kind of web code (PHP, Perl, JavaScript, ect. that I can use to call from within the SMS code to perform…
sholmes
  • 53
  • 4
5
votes
1 answer

How do i create an offscreen image in smart mobile studio?

When working with graphics, how do i create an offscreen image in smart mobile studio? I want to paint to create the image, paint to the canvas - and then copy that graphics onto the display in a game project.
Jon Lennart Aasenden
  • 3,920
  • 2
  • 29
  • 44
4
votes
1 answer

Repaint AND resize in TW3CustomGameApplication?

SMS version 2.1.2.3592 How do I do a Repaint or call the PaintView method, when the application has been resized by the browser (in a TW3CustomGameApplication) ? I am using the GameView.Width and GameView.Height properties to determine the…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
4
votes
1 answer

How to wrap js classes to sms?

I'm trying to wrap the peerjs libs in Smart Mobile Studio. However I'm not sure what the rules for wrapping are. I've looked at the RTL units and tried to deduce some rules from that. However some questions still remain. (function(exports){ var…
Johan
  • 74,508
  • 24
  • 191
  • 319
4
votes
2 answers

Getting started with Leap Motion

I just got my Leap Motion controller. But i must admit that i dont know how to get the basic initialisation up and running in SmartMS !? I have included the leapmotionts-1.0.9+8391.js from https://github.com/logotype/LeapMotionTS and added the…
Flemming
  • 694
  • 7
  • 22
4
votes
1 answer

Where to perform final processing before application closes?

I have been trying to write out data to storage when the form closes or the application terminates and have NOT been successful. I first tried from the Form unit procedure TForm1.FinalizeObject; begin inherited; SaveData; end; and procedure…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
3
votes
1 answer

String Utils Library for formatting Floats?

is there a String Utils Library for formatting Floats FormatFloat('$0.00', FTotal) FloatToStrF ? I was able to do what i needed with '$' + format('%0.2f', [FTotal]); but just curious if those routines exist somewhere?
JakeSays
  • 2,048
  • 8
  • 29
  • 43
3
votes
1 answer

Best way to call a javascript function like 'window.open()' in Smart Mobile Studio

I'm evaluating SMS and really enjoying the experience. I need to open a new window/tab on the browser using window.open(). I have got this working using an asm block but I can't help but feel that there is a better way which I don't know about. So,…
Will Honor
  • 33
  • 4
3
votes
1 answer

How to remove a property from JS object

How can I remove a property from a variant object in Smart Pascal? In JavaScript I can remove a property with the delete keyword delete obj['myProp']. How to do it in Smart Pascal?
markus_ja
  • 2,931
  • 2
  • 28
  • 36
3
votes
3 answers

Unable to access RTTI for SmartMobileStudio

Trying to use Smart's RTTI as defined in this post, I was not able to let RTTI be emitted to the HTML. When I define: type TBase = class published Field : Integer = 1; end; var base := new TBase; …
Arnaud Bouchez
  • 42,305
  • 3
  • 71
  • 159
3
votes
2 answers

Need help importing NodeJS-Module "htmlparser2" in SmartMobileStudio

I tried to use the htmlparser2 module (installed via npm install htmlparser2) in SmartMobileStudio. The module itself works well in direct javascript (using a slightly changed sample from htmlparser2's Homepage): var htmlparser =…
Steffen Binas
  • 1,463
  • 20
  • 30
3
votes
1 answer

Prevent Dialog form from closing in Smart Mobile Studio application

I have a modalDialog with a W3EditBox where the user enters a string that ultimately gets added to a W3ListBox on the main form I am trying to prevent the modalDialog from closing if one of these conditions exist 1.) W3EditBox text is nil 2.) if…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
1
2 3