File: template

package info (click to toggle)
libcdk-perl 4.9.10-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 884 kB
  • ctags: 411
  • sloc: perl: 6,419; makefile: 33; sh: 27
file content (37 lines) | stat: -rwxr-xr-x 695 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl -w
# $Id: template,v 1.2 2002/07/27 20:11:17 tom Exp $

#
# Purpose:
#	To demonstrate the Perl5 Cdk Template Widget.

#
# Initialize Cdk.
#
use Cdk;
Cdk::init();

# Create the template object.
my $template = new Cdk::Template ('Label' => 'Type in a date:',
					'Plate' => '## ## ####',
					'Overlay' => 'DD-MM-YYYY');

# Activate the widget.
my $date = $template->activate();

# Get the mixed date back.
my $mixedDate = $template->mix();

# Check the results.
if (!defined $date)
{
   popupLabel (["<C>Escape hit. No information to return."]);
}
else
{
   popupLabel (["<C>With Overlay Mixing   : $mixedDate",
		"<C>Without Overlay Mixing: $date"]);
}

# Exit Cdk.
Cdk::end();