mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
.uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@5120 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
8bee4528f7
commit
6622aac7f4
11 changed files with 158 additions and 66 deletions
|
|
@ -1,7 +1,7 @@
|
|||
LAYOUT(AccessKeyLayout, 200, 100)
|
||||
ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(90, 80).BottomPosZ(4, 22))
|
||||
ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(4, 80).BottomPosZ(4, 22))
|
||||
ITEM(Label, dv___2, SetLabel(t_("Test")).SetFont(SansSerifZ(20)).LeftPosZ(4, 48).TopPosZ(4, 32))
|
||||
ITEM(Label, dv___2, SetLabel(t_("asdfasdf\aTest")).SetFont(SansSerifZ(20)).LeftPosZ(4, 48).TopPosZ(4, 32))
|
||||
ITEM(EditDate, dv___3, LeftPosZ(56, 140).TopPosZ(4, 19))
|
||||
END_LAYOUT
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ include
|
|||
gdfgsdfg;
|
||||
|
||||
file
|
||||
test.js highlight js,
|
||||
h.iml,
|
||||
bak.tpp,
|
||||
AccessKey.h,
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
48
uppdev/AccessKey/test.js
Normal file
48
uppdev/AccessKey/test.js
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
var s1 = new String("Hello !");
|
||||
var s2 = new String("Hello !");
|
||||
s1 == s2; // Is false, because they are two distinct objects.
|
||||
s1.valueOf() == s2.valueOf(); // Is true.
|
||||
|
||||
//Automatic type coercion
|
||||
alert(true == 2 ); // false... true → 1 !== 2 ← 2
|
||||
alert(false == 2 ); // false... false → 0 !== 2 ← 2
|
||||
alert(true == 1 ); // true.... true → 1 === 1 ← 1
|
||||
alert(false == 0 ); // true.... false → 0 === 0 ← 0
|
||||
alert(true == "2"); // false... true → 1 !== 2 ← "2"
|
||||
alert(false == "2"); // false... false → 0 !== 2 ← "2"
|
||||
alert(true == "1"); // true.... true → 1 === 1 ← "1"
|
||||
alert(false == "0"); // true.... false → 0 === 0 ← "0"
|
||||
alert(false == "" ); // true.... false → 0 === 0 ← ""
|
||||
alert(false == NaN); // false... false → 0 !== NaN
|
||||
|
||||
//Type checked comparison (no conversion of types and values)
|
||||
alert(true === 1); // false... data types do not match
|
||||
|
||||
//Explicit type coercion
|
||||
alert(true === !!2); // true.... data types and values match
|
||||
alert(true === !!0); // false... data types match but values differ
|
||||
alert( 1 ? true : false); // true.... only ±0 and NaN are “falsy” numbers
|
||||
alert("0" ? true : false); // true.... only the empty string is “falsy”
|
||||
alert(Boolean({})); // true.... all objects are “truthy” except null
|
||||
|
||||
var d = new Date(2010, 2, 1, 14, 25, 30); // 2010-Mar-01 14:25:30
|
||||
|
||||
// Displays '2010-3-1 14:25:30':
|
||||
alert(d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + ' '
|
||||
+ d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds());
|
||||
|
||||
// Built-in toString returns something like 'Mon Mar 01 2010 14:25:30 GMT-0500 (EST)':
|
||||
alert(d);
|
||||
|
||||
s.length
|
||||
|
||||
var myRe = /(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})/;
|
||||
var results = myRe.exec("The date and time are 2009-09-08 09:37:08.");
|
||||
if (results) {
|
||||
alert("Matched: " + results[0]); // Entire match
|
||||
var my_date = results[1]; // First group == "2009-09-08"
|
||||
var my_time = results[2]; // Second group == "09:37:08"
|
||||
alert("It is " + my_time + " on " + my_date);
|
||||
} else alert("Did not find a valid date!");
|
||||
|
||||
try
|
||||
Loading…
Reference in a new issue