Title: What's new in UNIFACE 8
1CBG Workshop
Michael Zille
2Uniface 9 Whats new? Stichworte
- UDE
- Unicode
- Farbverwaltung
- Widgets
- Dynamische Formlayout-Änderungen
- XML Reader/Writer
- Integrierter Serverpage-Editor
- Proc Statements/Functions
- Migration
3Application Platform Suite
4UDE - Enhancements
5(No Transcript)
6UDE Look and Feel
7(No Transcript)
8(No Transcript)
9(No Transcript)
10(No Transcript)
11Multi Language Support (Unicode)
12- Internationaler Standard für Zeichen bzw.
Textelemente - Codebereiche
- UCS-2, 16 Bit gt 65.536 Zeichen
- UCS-4, 32 Bit gt 1.114.112 Zeichen derzeit zu
etwa 9 genutzt - Formate
- UTF-8
- UTF-16
- ...
- Unicode Consortium (seit 1991)
- Zusammenarbeit mit ISO (Norm 10646)
13- String literals
- Messages
- Menu text
- Panel text
- widgets
14Restrictions
- No Unicode support for
- CHUI
- Profile Characters
- Uniface Names
- Enhanced Printing in non-Windows platform
- SQL (/workbench),database error messages,
username and password - C, Tuxedo and Corba Call-In and Call-Out
- UHTTP components
- UPOPMAIL components
- No Unicode sorting support
- Supported Databases ORACLE, SOLID
- external Interfaces e.g. Filenames (supported
on Windows, not on UNIX)
15SYS_CHARSET Specify the character set used for
communication with the operating system and for
communication between Uniface and non-Uniface
components, if they are not Unicode-based.
DEF_CHARSETdefault character set used for
storing data in String fields with C packing code
16Support for Unicode and other Character Sets
17(No Transcript)
18Multi Language Support
Special strings does not exist anymore
19- ASCII (ASC) (font0) uses Unicode Range 0-7F
- Extended ASCII (MUL) use Unicode Rage
0-ff(formerly font 0 1) - Full Character Set (FUL) DEFAULT is determind
by FULL_SYNTAX (font 0 to 7)
20(No Transcript)
21Assignment Settings
- META_LANGUAGE Section
- EXTENDED_SYNTAXSpecify which characters are
allowed as extended characters ( or _at_) in the
field syntax definition. - FULL_SYNTAXSpecify the allowed character set
for the FUL shorthand code in the field syntax
definition. - META_IN_TRXSet the data storage format of
String fields with the U packing code to XML or
TRX. - WIDE_CHAR_BEHAVIORSpecify the character set
used for String fields with the W packing code. - GAIJIAllow the use of Japanese Gaiji
characters.
22GUI - Enhancements
23(No Transcript)
24(No Transcript)
25Color Handling
- Widgets
- Color List
- Color Box
- Functions Statements
- windowproperties(instancename)"backcolorCOLOR
- fieldproperties(fld_test)"backcolorCOLORforec
olorCOLOR" - colorbox/full
- Properties
- Windows Properties
- Background Color
- Widget Properties
- Background Color
- Foreground Color
26(No Transcript)
27(No Transcript)
28(No Transcript)
29(No Transcript)
30Enhanced Grid Widget
- Supports Windows XP Vista look and feel
- Supports now the following widget types
- Editbox
- Checkbox
- Picture
- Command button
- Spin Button
- Drop-down List
- Color box
31Enhanced Tree Widget
Delete Items
Re-order
32(No Transcript)
33Dynamic Menus
34Dynamic Menus
35Dynamic Menus
36(No Transcript)
37Proc Functions Statements
38paintedfieldproperties (myfield1, 2,
XposYpos) Xpos20Ypos15
paintedfieldproperties( Field ,
PaintedOccurrence , PropertyList )
PropertyValuesList PropertyValuesList
paintedfieldproperties( Field ,
PaintedOccurrence , Position Size )
39paintedfieldproperties
paintedfieldproperties( Field ,
PaintedOccurrence , PropertyList )
PropertyValuesList PropertyValuesList
paintedfieldproperties( Field ,
PaintedOccurrence , Position Size )
paintedfieldproperties (NAME, 4)
"xsize3ysize25" paintedfieldproperties
(NAME.PROJECT.MYORG, "341") "xsize2"
paintedfieldproperties(FIELD1,"1")
"XPos50YPos50"
40New Statements file/directory management
dircreate Creates the specified directory
dirdelete Deletes the specified directory
dirrename Renames the specified directory
filecopy Copies the specified file to the target
location filedelete Deletes the specified file
filemove Moves the specified file to the target
location filerename Renames the specified file
within the same directory
41Use of Zip-files
These instructions can create, read, and write
zip files and directories.
(Local) File I/O
(Local) directory management
(Local) file management
filedump fileload
ldircreate ldirdelete ldirrename ldir
ldirlist
dircreate dirdelete dirrename
lfilecopy lfiledelete lfiledump lfileload
lfilemove lfilerename lfileexists
lfileproperties
filecopy filedelete filedump fileload
filemove filerename
lfiledump lfileload
ZIP unlock
flush lflush
42Use of Zip-files
Zip Path Assignments Assignment file
redirections now accept zip archive definitions.
For example FILES All forms compiled into a
ZIP archive .frm myforms.zip.frm All xml
files are imported from the sources ZIP in the
installation directory umeta.xml
usys..\sources\sources.zipumeta.xml
usource.xml usys..\sources\sources.zipusour
ce.xml udefault.xml usys..\sources\sources.zi
pudefault.xml
43(No Transcript)
44UDE
Perform actions on Repository data, including
compiling, exporting, importing, and converting.
Syntax Export Repository data ude ("export",
ObjectType , ObjectProfile ,ZipArchive
Filename , OptionList ) Import data into the
Repository ude ("import", "misc",ZipArchive
Filename ,"", OptionList ) Copy or convert
data from one format to another ude
("copy","misc", Source , Target , OptionList )
Compile development objects ude ("compile",
ObjectType , ObjectProfile ,"", OptionList )
Note ude only works on the development
Repository and requires a fully configured
Uniface Development Environment and Repository to
be available.
45entitycopy
Copy data from one DBMS or file to another.
Syntax entitycopy Source , Target , OptionList
Description The entitycopy Proc statement copies
or converts one or more entity occurrences from a
source database or file to another. It enables
you to incorporate the functionality provided by
the /cpy command line switch into your Uniface
application.
46Miscellaneous Functions
- procreturncontext
- itemcount
- string
47procreturncontext
Return context information about the return value
of the previous Proc instruction.
Syntax procreturncontext
Description
The procreturncontext function provides
additional information for Proc instructions that
are typically involved in batch processing, such
as copying data. For example, it can be used
after entitycopy and UDE.
48procreturncontext
Item Description
Context Context Context of the information. Can have the value EntityCopy, UDE Copy, UDE Import, or UDE Compile. If the Context is UDE Compile, only Release is available
Error Number Error number if process failed on error
InputRecords Number Number of records to be copied.
OutputRecords Number Number of records where an attempt was made to write them. The difference between InputRecords and OutputRecords is the number of void mappings.
WriteErrorsContinues Number Number of write errors encountered that did not stop the copy action.
InputDescriptors Number Number of descriptors to be copied. The same descriptor can occur more than once.
OutputDescriptors Number Number of signatures actually output. This can be less than the number of InputDescriptors if void mappings are encountered.
InputTrxFiles Number Number of TRX files to copy, if a wildcard was specified.
InputXmlFiles Number Number of XML files to copy, if a wildcard was specified.
Release ReleaseNumber Number of the Uniface release of the source data.
AdditionalInfo String Reserved for future
49itemcount
Return the number of items in a list.
Syntax itemcount ( List )
Description The itemcount function enables you
to determine how many items are in a list before
processing each item.
variables string vListe endvariables putlistitems
/id vListe, order_id.order, total.order message/in
fo "Number of Items itemcount(vListe)"
50string
Return a string containing the replacement of
each named XML entity in the input parameter
string by the character represented by the
entity. (XML entities are character mappings
they are not the same as Uniface entitites.)
Syntax string ( String )
In the following examples, FLD is a String field
whose packing code is W. vVar1string("XML has
five predeclared entities.") 0 xml entity
vVar2string("They are lt, gt, amp, \
apos, and quot.") 5 xml entities
FLDvVar1vVar2 After executing
this Proc, field FLD contains the following XML
has five predeclared entities. They are lt, gt,
, ', and ".
51string
Variables string vVar1 string vVar2 string
vFLD endvariables GrossBuchstaben vVar165 vVar2
"" while(vVar1 lt 91) vVar2"vVar2vVar1
" vVar1vVar11 endwhile FLD_Wstring(vVar
2)
After executing this Proc, field FLD_W
contains ABCDEFGHIJKLMNOPQRSTUVWXYZ
52XML Reader / - Writer
53XML -Reader / -Writer
- It enables the procedural creation and parsing of
XML strings - It is comparable to SAX parser
- Use UXMLWRITER to generate a XML file or data
stream - Use UXMLREADER to parse an existing XML file or
data stream
54Simple API for XML (SAX)
- Die Simple API for XML (SAX) ist ein
Pseudo-Standard, - der ein Application Programming Interface (API)
zum Parsen von XML-Daten beschreibt. - Die aktuelle Hauptversion SAX 2.0 wurde 2000 von
David Meggionson veröffentlicht und - ist Public Domain.
- Ein SAX-Parser liest XML-Daten als sequentiellen
Datenstrom und ruft für im Standard definierte
Ereignisse vorgegebene Rückruffunktionen
(callback function) auf. - Eine Anwendung, die SAX nutzt, kann eigene
Unterprogramme als Rückruffunktionen registrieren
und auf diese Weise die XML-Daten auswerten.
55Simple API for XML (SAX)
lt?xml version"1.0"?gtltdocgt ltparagt Hello,
world!lt/paragt lt/docgt
lt?xml version"1.0"?gt ltdocgt ltparagt Hello,
world! lt/paragt lt/docgt
start document start element doc start
element para characters Hello, world!
end element para end element doc end
document
56XML-Reader
- STARTDOCUMENTactivated when the parser starts
reading the document. - STARTELEMENTactivated when the parser encounters
a start tag, for example lttag docgt - CHARACTERactivated when character data is
encountered between a tag and its end tag. - ENDELEMENTactivated when the parser encounters
an end-tag such as lt/tag docgt. - ENDDOCUMENTactivated when the end of the
document is reached.
57XML-Reader
operation warning error fatalerror params str
ing list in endparams your code end
operation startdocument your code end ---------
----------------?gt operation enddocument your
code End
operation startelement params string name
in string attr in endparams your
code end ----------------------------?gt operation
endelement params string name
in endparams your code end
operation characters params string chars
in endparams your code end
58To create a SAX handler
- Create a component that implements at least one
SAX callback operation.These operations are
activated by the PARSE and PARSEFILE operations
of the UXMLREADER component. - Optionally, implement error handling operations
to handle invalid data and other errors. Data
read by the parser is expected to be legaleither
there is no DTD defined for the data, or if there
is a DTD, the tags, attributes and character data
conform to the DTD. If this is not the case, the
appropriate operation is activated, if present. - For warnings, the WARNING operation is activated.
- If the error is deemed recoverable by the SAX
parser, the ERROR operation is activated
otherwise, the FATALERROR operation is activated.
- If there is no ERROR operation, recoverable
errors are silently recovered from and ignored. - After a fatal error occurs, no further processing
of the XML file is done and the PARSE or
PARSEFILE operation returns a negative value.
59To read and parse an XML document
- Create an instance of the UXMLREADER component.
- Create an instance of the handler component, or
retrieve the instance name of an already active
handler component. - Activate the handler by calling the SETHANDLER
operation. - Start parsing XML documents using PARSE to parse
a field or variable of type string or xmlstream,
or PARSEFILE to start parsing a file. - As the XML document is parsed, the
operations in the handler instance are activated
based on what the parser encounters in the XML
document. When PARSE or PARSEFILE returns, either
the entire XML document has been successfully
parsed, or a fatal error has occurred, in which
case a negative return value is returned.
60XML-Writer
- internal Uniface component that enables you to
generate XML documents - The UXMLWRITER component operations enable you to
construct an XML document. - The operations must be called in a specific
sequence. - STARTDOCUMENT
- ENDDOCUMENT
- STARTELEMENT
- ENDELEMENT
- ADDATTRIBUTE
- CHARACTERS
- DOCCOMMENT
- GETDOCUMENT
61To generate an XML document
- For each XML document you want to generate,
create an instance of the UXMLWRITER component. - Call the STARTDOCUMENT operation for each
instance. - Add XML elements, attributes and comments using
the operations available on the UXMLWRITER
component. - Retrieve the resulting XML documents with the
GETDOCUMENT operation. - Manipulate the data as required.
- Delete the instances of UXMLWRITER when they are
no longer required.
62Integrated Web Development
63Integrated Web Development
- No generation of HTML Skeletons
- USP layout information is incorporated into the
server page itself - Complete definition is stored in the repository
and compiled into the .usp files - The integrated graphical HTML layout editor is
the main tool for defining server pages - Component editor for
- view data structure
- load fields
- define properties
- write proc code
64(No Transcript)
65(No Transcript)
66(No Transcript)
67Migration
68(No Transcript)
69(No Transcript)
70(No Transcript)
71(No Transcript)
72CBG Workshop