QTXLibrary on google code
To make things easier in the future I decided to push all my Smart Pascal examples into one basket and upload them to Google Code. That way people don’t have to copy & paste from this website, but rather just update their SVN repo folder.
Point your SVN client at: https://code.google.com/p/qtxlibrary/
I must however stress that these units should be considered “examples”. This blog is more about experimentation, research and education than it is anything else. I do not provide any form of support. I work full-time as a professional software developer, so there is quite frankly not enough time for large-scale hobby projects.
For new features and ideas around Smart Pascal, send an email to the Smart Mobile Studio team. It will be registered in the system and receive a proper ticket.
Ayways, do a checkout of the google repository – remember to check out to the Smart Mobile Studio Libraries folder – and have a peek 🙂
What can it do?
All sorts of cool stuff! You have the in-memory dataset class, which is very handy. And the latest additions are the effect helpers. Smart Mobile Studio RTL contains a lot of cool stuff – but for beginners it may be hard to get to grips with all the new terminology. If you are serious about y0ur HTML5 coding, you should get a book and learn some JS. It makes all the difference.
So how are the effect helpers useful? Well, for instance, to make buttons that “grow” when you move your mouse hovers over them, you would write this:
W3Button1.OnMouseEnter:=Procedure (sender:TObject; Shift: TShiftState; X, Y: Integer) Begin //grow the button by 4x4 pixels in 0.2 seconds w3Button1.fxScaleUp(4,0.2); end; w3button1.OnMouseExit:=procedure (sender:TObject; Shift: TShiftState; X, Y: Integer) Begin // Shrink button back to original size w3Button1.fxScaleDown(4,0.2); end;
What I have been playing with lately (thought only for now) is an effect stack. Basically a “mini” effect language that you can use to script effect chains inside your SMS application.
For instance, a script could look like:
var script:String := #"fadeout(0); fadeIn(0.6); moveTo(100,100); rotate(-30,-60,-70); scale(200,200); Scew3d(-90,-90-36); warpOut(0.9);"; FStack.push(script,w3button1); FStack.execute(esImmediate);
Reminds me a bit about the old Amos Basic “sprite language” that we used in the 90’s for writing shoot’em up enemies for games and demos.