April-2008 / GSS
Major Improvement:
1. PHP Builder
GSS can generate PHP aplication based on template
Generated PHP Application can running on web server and avaliable on web browser without any changes.
Follow this step:
- put \template\*.* into GSS directory
- Fill home directory in internet project properties
- in GSF Editor click internet button and Fill module name with apropriate name
- PHP aplication ready to generate, goto project properties, click internet button dan build application
Output PHP will stored in specified home directory.
2. GSS Script (beta)
GSS has own script language to manipulate data at client side or to handle complex proces.
===============================
mini tutorial GSS Script (beta)
===============================
single line remark : //
block remark : /* */
keywords:
if, else, while, for, var
variable declaration:
var x, y, z; -- memastikan bahwa variable yang digunakan lokal
assignment:
x = 12; -- value
x = x+12/3; -- expression
x = GetValue(); -- get return value from a function
f = frmEmployee;
q = frmEmployee.QryData;
comparison:
=, >, <, <=, <=, <>
logical operators:
or, and, not
operators:
+, -, *, /, %, mod
--, ++, +=, -=
function delaration:
function name()
{
return 5*7+x; // optional
}
this function will affected in main form:
function #self.name()
{
}
this function will affected in editor form:
function #editor.name()
{
}
calling a procedure/function:
Prepare();
CountDown( x, 12 );
if condition:
if () {
Statement;
} else
{
}
looping:
while ( ) { }
ex:
i = 1;
s = "";
while( i<10)
{
s = format( "%1%2", s, i );
i++;
}
message( "%1", s );
for( ; ; ) { }
ex:
for (i=0;i<10;i++) { }
foreachfile( "*.txt", file ) {
}
boolean:
true/false;
1/0
special variables:
#self.caption = "Hore";
#editor
#data.edit();
#grid
Object Structure:
- Form -> form-name, #self, #editor
.Font*
.Caption
.left
.top
.right
.bottom
.height
.width
.goto( , )
.blend
.
- Grid
.font
.field
- Query
.edit()
.next()
.prev()
.cancel()
.insert()
.append()
.editing()
.delete()
.post()
.inserting()
.editing()
.inedit()
.isempty()
.eof()
.recordcount
.clear
.close
- field -> Query[field-name]
.value
- font
.color
.size
Keywords:
IF,Function,While,For,Var,Return,Else,Break,Continue,Exit,ABORT,ForEachFile
Internal Functions:
Message( , ) ex.: message( "%1x%2=%3", 3, 2, 2*3 );
Format( , ): string ex.: s = format( "%1%2", s, i );
Copy( , , ): string // copy a sting
Delete( , , ): string // delete a string
Length( ): integer // get length of string
Query( , [] ) // c = query( "SELECT * from customers", 1 );
Execute( )
Upper( ): string
Lower( ): string
Sweet( ): string
Delay( )
ProgressBar( ) // set progressbar visible and set maximal number as supplied
ProgressBar( -1 ) // hide progress bar
Progress( ) // set progress bar position
Confirm( ): boolean // get user comfirmation
Command( ) // execute dos command line (ShellExecute)
FileExists( ): boolean // check file if exists
Run( ) // open *.gsf file
Input( , ): value // get user input
Substitution( ): string // s = substitution( "Date is : %defdate%" );
Grefresh( ) // do refresh to opened data
Randomize() // activate random generator
Random( ): integer // get a random value
===============================
A function declared in GSS script can called at event such as:
BeforeOpen, BeforeInsert, and so on to validate or to process some gss statement.
ex.:
function Test()
{
message( "This just test !!" );
}
Event: BeforeOpen = ?Test()
See what happen when then form open.
Multiple function can call, ex.:
?Test(),print(),other()
3. Tabed inteactive SQL
you can run SQL at anytime, tabed and editable.
4. Data Pump, now gss can transfer data between two server.
5. cached application,
application stored at server and will copy into local directory as necessary to reduce network trafic
6. some bug fix
xx-2008 / Gss
a) now we can call *.exe file as a part of module
b) now gss can connect into more then one server
c) dataset exporter to HTML template based was included
d) template based application builder with gss was begun
e) now gss can browse databases tables, so the wizard feature more easy
f) some additional features
g) some bug fix
Ags-2007 / GSS v2.2.804
a) Now Wallpaper and other image can contain JPeg Format
b) Some bug fix
July-2007 / GSS v2.1.715
a) We improve the calculation of an expression ability.
So complex expression can be calculated now.
Ex:
%level%*12/(0.5*%def.year%)
b) The rules of default field in Fields Properties was changed:
- There is different between string with apostrophe and not.
'NOW' is not same with NOW
- Don't use apostrophe in Substitution ID, apostrophe will added automatically.
'%name%' <-- wrong
%name% <-- true
'%user.name%' <-- wrong
- Default field can accept an expression, put '=' character at first charecter
Ex:
=%def.YEAR%*2
=12*7-4
- You can put single date/time substitution id without '%' sign:
SOY ; start of year
%def.soy% ; have same result
YEAR ; good
YEAR*2 ; error, this is not single default falue
=%def.year%*2 ; good
Note: Substitution id with '%' is general substitution, it's can use in whole of SQL, default field or any caption.
Sometime we need to add a prefix in a table name, so you can write sql like this:
SELECT ....
FROM %input.month%order ; example result: FROM janorder
c) Date/Time substitution ID was changed, here is the list:
NOW
DATE
DAY
MONTH
YEAR
TIME
SOY Start Of The Year
EOY End Of The Year
SOM Start Of The Month
EOM End Of The Month
SOW Start Of The Week
EOW End Of The Week
d) Functions:
DATEADD( 'day', , )
DATEADD( 'month', , )
DATEADD( 'year', , )
COPY( , , )
STRTODATE( )
STRTOTIME( )
FRAC( ) eg.: frac(123.62) -> 0.62
INT( ) eg.: round(123.62) -> 123
ROUND( ) eg.: round(123.62) -> 124
STR( )
e) Logical Operator: Or, And, Not
f) Arithmatic Operator: *, /, +, -, MOD
g) Now we cn specify the master field substitution
%CustID% ; Get CustID in current dataset
%+CustID% ; Get CustID in master dataset
%++CustID% ; Get CustID in master master dataset
h) we handle barcode event now,
to activate barcode support just fill procedure handler in 'Layout-Tab' in GSF Editor.
Barcode editor will appear on top panel of data grid,
F9 key is to set cursor focus to barcode editor.
i) we use single key to find data in lookup proses.
when user type a text in a field that have a lookup, the entered text will become a value to filter in lookup query.
e.g:
key: regionid,custid ; lookup key will be just custid
data: L001 ; entered text
filter is: custid='L001' ; 'regionid' is unuse,
; you must move regional key into internal query filter, ('where' clause)
; where regionalid=:regionalid -- or
; where regionalid=%regionalid%
j) Now GSS can call external code in *.DLL using stdcall convention.
format: {entry}?par='';cap='';hint=''
There are two kind of procedures:
a. Procedure with a string parameter:
E.g: backup.dll{runbackup}?par='%user.uid%'
b. Procedure without parameter:
E.g: backup.dll{runbackup}?
note: you can pass database username and password as procedure parameter.
%sys.host% -- server
%sys.db% -- database name
%sys.user% -- database user name
%sys.pwd% -- database password
k) calculator added, press Alt+F9 to activate/deactivate calculator.
l) unnecessary properties was removed and sume bugs was fixed.