710 likes | 969 Views
CBG Workshop. Michael Zille. Uniface 9 What‘s new? Stichworte. UDE Unicode Farbverwaltung Widgets Dynamische Formlayout-Änderungen XML Reader/Writer Integrierter Serverpage-Editor Proc Statements/Functions Migration. A pplication P latform S uite. UDE - Enhancements.
E N D
CBG Workshop Michael Zille
Uniface 9 What‘s new? Stichworte • UDE • Unicode • Farbverwaltung • Widgets • Dynamische Formlayout-Änderungen • XML Reader/Writer • Integrierter Serverpage-Editor • Proc Statements/Functions • Migration
Multi Language Support (Unicode)
Internationaler Standard für Zeichen bzw. Textelemente • Codebereiche • UCS-2, 16 Bit => 65.536 Zeichen • UCS-4, 32 Bit => 1.114.112 Zeichen derzeit zu etwa 9 % genutzt • Formate • UTF-8 • UTF-16 • ... • Unicode Consortium (seit 1991) • Zusammenarbeit mit ISO (Norm 10646)
String literals • Messages • Menu text • Panel text • widgets
Restrictions • 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)
$SYS_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
Multi Language Support „Special strings“ does not exist anymore
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)
Assignment Settings • [META_LANGUAGE] Section • $EXTENDED_SYNTAXSpecify which characters are allowed as extended characters (~& or ~@) 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.
Color Handling • Widgets • Color List • Color Box • Functions & Statements • $windowproperties($instancename)="backcolor=COLOR„ • $fieldproperties(fld_test)="backcolor=COLOR·;forecolor=COLOR" • colorbox/full • Properties • Windows Properties • Background Color • Widget Properties • Background Color • Foreground Color
Enhanced 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
Enhanced Tree Widget Delete Items Re-order
$paintedfieldproperties („myfield1“, „2“, „Xpos;Ypos“)= „Xpos=20;Ypos=15“ $paintedfieldproperties( Field , {PaintedOccurrence ,} { PropertyList} ) {=} PropertyValuesList PropertyValuesList = $paintedfieldproperties( Field , PaintedOccurrence {, Position | Size} )
$paintedfieldproperties $paintedfieldproperties( Field , {PaintedOccurrence ,} { PropertyList} ) {=} PropertyValuesList PropertyValuesList = $paintedfieldproperties( Field , PaintedOccurrence {, Position | Size} ) $paintedfieldproperties (NAME, 4) = "xsize=3;ysize=25" $paintedfieldproperties (NAME.PROJECT.MYORG, "3;4;1") = "xsize+=2" $paintedfieldproperties(FIELD1,"1") = "XPos=50;YPos=50"
New 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
Use 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
Use 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.zip:umeta.xml • usource.xml = usys:..\sources\sources.zip:usource.xml • udefault.xml = usys:..\sources\sources.zip:udefault.xml
$UDE 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.
entitycopy 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.
Miscellaneous Functions • $procreturncontext • $itemcount • $string
$procreturncontext 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.
$itemcount 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/info "Number of Items: %%$itemcount(vListe)%%%"
$string 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*. vVar1=$string("XML has five predeclared entities.");0 xml entity vVar2=$string("They are: <, >, &, %\ ', and ".");5 xml entities FLD=„%%vVar1%%%%%^%%vVar2%%%“ After executing this Proc, field FLD contains the following: XML has five predeclared entities. They are: <, >, &, ', and ".
$string Variables string vVar1 string vVar2 string vFLD endvariables ;GrossBuchstaben vVar1=65 vVar2="" while(vVar1 < 91) vVar2="%%vVar2%%%&#%%vVar1;%%%" vVar1=vVar1+1 endwhile FLD_W=$string(vVar2) After executing this Proc, field FLD_W contains: ABCDEFGHIJKLMNOPQRSTUVWXYZ