Jump to content

lennart

Members
  • Content Count

    414
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by lennart

  1. 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
  2. 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.
  3. 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.
  4. 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.
  5. 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
  6. 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;
  7. 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
  8. 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
  9. 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.
  10. lennart

    Wrong window size

    Thanks for the tip -will scale it down a bit
  11. 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;
  12. 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/
×
×
  • Create New...