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
3
votes
2 answers

Check if function param is undefined in SmartMS?

How can I check if a function param is undefined? procedure Test(aValue: TObject); begin if aValue <> nil then ShowMessage('param filled') <-- also when Test() is executed! else ShowMessage('no param filled') <-- not called, only…
André
  • 8,920
  • 1
  • 24
  • 24
3
votes
1 answer

Regular expressions in Smart Mobile Studio

How do I work with regular expressions in Smart Mobile Studio? For example, how do I code following example in Object Pascal? var re = /\w+\s/g; var str = "fee fi fo fum"; var myArray = str.match(re); console.log(myArray);
gabr
  • 26,580
  • 9
  • 75
  • 141
2
votes
2 answers

Resize controls based on Layout dimensions?

ok, i need to resize a control based on the layout dimensions. I also need it to resize when the layout dimensions change (e.g. turning device from profile to landscape) It was my assumption that you just check the dimensions of device and adjust…
John
  • 507
  • 3
  • 13
2
votes
1 answer

How do I reload/Refresh a W3IFrameHtmlElement in Smart Mobile Studio?

How do I reload/Refresh a W3IFrameHtmlElement in Smart Mobile Studio? Version 2.2 When I assign the source property the first time, it works great. When I assign it the second or subsequent times, it never works
JakeSays
  • 2,048
  • 8
  • 29
  • 43
2
votes
1 answer

How do you create a scrollable TW3ListMenu at run-time?

How do you create a scrollable TW3ListMenu at run-time? I need something a little better for scrolling vertically through 50 items I'd like to use a TW3ListMenu and just display the caption and a icon to the right ">" to click - then display the…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
2
votes
3 answers

Style property name format

I have noticed, that a style property name used in SmartMS has a different format than used in the css file. e.g.: in css: line-height, text-overflow, white-space in SmartMS the style properties don't have the '-' sign and are therefore…
markus_ja
  • 2,931
  • 2
  • 28
  • 36
2
votes
1 answer

How to get the height and width of the visible browser area

How can I retrieve the height and width of the browser area? I want to show one form always in landscape mode, regardless whether the mobile phone has rotated the browser view. if the browser is in portrait postion I want to rotate the form…
markus_ja
  • 2,931
  • 2
  • 28
  • 36
2
votes
3 answers

"Wrap" three.js in SmartMS

I would like to add this simple three.js example in Smart Mobile Studio. Is it possible to do without a whole lot of complex wrapping ? I have tried a naive attempt by copying the window.onload content into an asm section - but of course without…
Flemming
  • 694
  • 7
  • 22
2
votes
1 answer

How do I send POST data using TW3HttpRequest

So I've started playing with SMS and I've tried to make a program (label and button) to hit a website with a post request and display the result. I have no problems with Hints/Warnings/Errors and everything looks good to me. The following code is a…
Vivian Mills
  • 2,552
  • 14
  • 19
2
votes
1 answer

Save image to local folder with Smart Mobile Studio

Im trying to figure out how to save a image/canvas to a local folder in Smart Mobile Studio. This should be the way to create a right-click save to folder event: var canvas = document.getElementById('myCanvas'); var context =…
Flemming
  • 694
  • 7
  • 22
2
votes
1 answer

Load a memo control from external file using Smart Mobile Studio 1.1

Ho do I load a memo control from external file example: \res\info.txt thanks
JakeSays
  • 2,048
  • 8
  • 29
  • 43
1
vote
1 answer

How to initialize an object in DWScipt?

What is the equivalent of this JS code in DWScript please? I use the DWScript codegen. // JavaScript: DoIt({name:"Fred", size:{width:3,height:2}}); I tried anonymous record but it seems not working: var obj: variant; obj := record Name =…
1
vote
1 answer

Using params in a sqlite INSERT statement in Smart Mobile Studio?

I have created the following database SqlResult := fDataBase.Exec("CREATE TABLE workstations (workstation string, location string, userId string);"); How do you use params in a sqlite INSERT statement. For example, I assume it would be something as…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
1
vote
1 answer

Navigating forms using HTML?

is there a way to navigate to another form using HTML ? for example, a link in side my innerHTML Form2 it is just HTML i was hardcoding into the innerHTML property of a TW3ScrollControl. Some of the HTML is static,…
JakeSays
  • 2,048
  • 8
  • 29
  • 43
1
vote
1 answer

distinguishing Listbox click, touch, scroll?

I am still having a hard time with a Listbox and distinguishing between "touch" to select and item in a listbox on a desktop/laptop browser.....and "touch" to begin scrolling (e.g. on a phone/tablet) Using a basic example listbox with 100…
JakeSays
  • 2,048
  • 8
  • 29
  • 43