Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by lennart

  1. lennart

    Questions about Smart

    Hi Bora! There are examples for connecting to remobjects and thus bridging the gap between "real" delphi and Smart. I have been using remobjects since they started and will be using their RO framework on the server to provide things like remote storage for our apps. André Mussche have examples of how to connect to remobjects services on his G+ blog (https://plus.google.com/u/0/114001209728324470020/posts) - worth checking out!
  2. lennart

    Questions about Smart

    1. Smart focuses on mobile devices, but you can use it for desktop apps as well. 2. Not sure what you mean here, you have no access to delphi from Smart and normal DLL files doesnt work with a browser. The entire app compiled to javascript so you cant interface with DLL's. But, if you mean source libraries then yes - as long as the libraries use vanilla object pascal, no pointers (and other rules as well) then most Delphi7 apps compiles. But our environment is not buildt to be delphi compatible, it's a whole new system but with the same language. But the controls differ due to the rules of HTML5. 3. No and yes. Smart has its own component model, which mimics delphi in some aspects. So it wont magically fit with other JS packages. But what you can do is to create a wrapper unit for it. It depends on the library you want to use. And also, if you need it. Smart doesnt need jQuery or jQTouch for instance. A lot of people are asking about that - but these packages means very little to Smart. There is nothing in those systems that you want. It's very easy to create your own controls under Smart so there are very few scenarios where you want to dump the VJL core in favour or other controls.
  3. lennart

    Ctrl-V in Search Dialog

    I will register it as a ticket. There are aspects of SVN that are old, but will try to fix it
  4. lennart

    Ctrl-V in Search Dialog

    Are you using vmware? I noticed the same problem but only under vmware. I will add it to the synEdit list.
  5. lennart

    "Create" variants?

    The VJL will be expanded as we go along. I cant take credit for the dictionary classes, it was Primoz Gabrijelcic that suggested them (and sent in a proposal). When the IDE is done we will have more time to add "missing" pieces of the puzzle. RC4 encryption, blowfish, lookup tables, hashes and direct access to the filesystem. So there are a lot of goodies comming Two extractKeys / extractValues functions is a good idea for the dictionary classes, thanks! Forgot: You can use similar code to extract name/value pairs from any JS object. This is a snippet i sometimes use to examine a tag/element: function getKeys (obj){ var aKeys = ""; aKeys +="Properties:|"; aKeys +="===========|"; for(var key in obj){ if ( obj.hasOwnProperty(key) ) aKeys += key + '|'; } if (obj.hasOwnProperty("style")) { aKeys +="|Style:|"; aKeys +="===========|"; for(var key in obj.style){ aKeys += key + '|'; } } return aKeys; } Then just use a StringReplace(getKeys(myRef),'|','[br]') to dump a whole HTML object or JS object.
  6. lennart

    Feature: Choose Compile Target

    In the alpha the default target is the "bin" folder, which is always relative to the project - however we will add an optional output path in the final release.
  7. lennart

    "Create" variants?

    If you are looking to use a JS object as a dictionary (name/value pairs) then you can also use the ready made classes in w3dictionaries.pas
  8. lennart

    "Create" variants?

    Good catch! Variants are initialized to "undefined". So you are correct that it doesnt have a default value or type. By initializing it to {} like you do, you turn it into a javascript object. I will add it to our list. The simplest way is if we add a CreateVariant(datatype) function in the RTL. In short it would be a function that returns a variant: function createObjVariant:Variant; begin asm return {}; end; end;
  9. lennart

    Feature: Freely choose location for project

    In the alpha we just made it simple and put the project's folder together with the main executable. In the final release the projects folder will be moved to "my documents". This will be the default location (just like delphi does) but we will no doubt smart up the IDE so it remembers the last open/save path
  10. When the IDE is done I will have time to write some cool units, a tile map-editor and a sprite engine is something I will do
  11. OpenGL is not something we will support out of the box (at least not in version 1). However, this should be fairly easy to wrap up (although probably time consuming). You could for instance wrap V8-GL in a Smart unit and use that. We will be adding more and more unit as time permits it, so a 2d game engine is unavoidable (i love coding 2d games/demos). As for 2d-tile graphics, I coded a unit for using 2D tiles (spritesheet) in combination with the TW3Canvas class. It was just something i slapped together as an example(http://smartmobilestudio.com/2012/01/06/a-simple-sprite-sheet/). It's more or less the same I used when i coded the Dune II remake many years ago. Although i must admit I havent tested it as much as i want to. To handle maps just use a TW3Buffer object with a byteview. You can have several byte-layers (each byte representing a tile). One layer is typically reserved for "entities", which are animations drawn on top of tiles (turrets etc). As always - If you can make it in JS, then you can use Smart. But you need to write some wrapper classes for the base technology.
  12. lennart

    Wrong window size

    Thanks for the tip -will scale it down a bit
  13. lennart

    Random replacement

    As of writing the Random function is sadly broken. This is ofcourse being fixed right now, but in the meantime you can use: function RandomEx(topRange:Integer):Integer; Begin if topRange topRange:=abs(topRange); if topRange>0 then Begin asm @Result = Math.floor(Math.random() * @topRange); end; end else result:=0; end;
  14. lennart

    Smart Mobile Studio Alpha 4

    The fourth alpha release has now shipped to all members of the testing group. We experienced some problems with our email server, but this is now taken care of. For a quick overview go to: http://smartmobilestudio.com/2012/01/30/smart-mobile-studio-alpha-4/