Presentation is loading. Please wait.

Presentation is loading. Please wait.

CBG Workshop Michael Zille. Uniface 9 What‘s new? Stichworte UDE Unicode Farbverwaltung Widgets Dynamische Formlayout-Änderungen XML Reader/Writer Integrierter.

Similar presentations

Presentation on theme: "CBG Workshop Michael Zille. Uniface 9 What‘s new? Stichworte UDE Unicode Farbverwaltung Widgets Dynamische Formlayout-Änderungen XML Reader/Writer Integrierter."— Presentation transcript:

1 CBG Workshop Michael Zille

2 Uniface 9 What‘s new? Stichworte UDE Unicode Farbverwaltung Widgets Dynamische Formlayout-Änderungen XML Reader/Writer Integrierter Serverpage-Editor Proc Statements/Functions Migration

3 Application Platform Suite

4 UDE - Enhancements


6 UDE Look and Feel





11 Multi Language Support (Unicode)

12 Internationaler Standard für Zeichen bzw. Textelemente Codebereiche UCS-2, 16 Bit => Zeichen UCS-4, 32 Bit => Zeichen derzeit zu etwa 9 % genutzt Formate UTF-8 UTF Unicode Consortium (seit 1991) Zusammenarbeit mit ISO (Norm 10646)

13 String literals Messages Menu text Panel text widgets

14 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)

15 $DEF_CHARSET default character set used for storing data in String fields with C packing code $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.

16 Support for Unicode and other Character Sets


18 Multi 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)


21 Assignment Settings [META_LANGUAGE] Section $EXTENDED_SYNTAX Specify which characters are allowed as extended characters (~& or in the field syntax definition. $FULL_SYNTAX Specify the allowed character set for the FUL shorthand code in the field syntax definition. $META_IN_TRX Set the data storage format of String fields with the U* packing code to XML or TRX. $WIDE_CHAR_BEHAVIOR Specify the character set used for String fields with the W packing code. $GAIJI Allow the use of Japanese Gaiji characters.

22 GUI - Enhancements



25 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





30 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

31 Enhanced Tree Widget Delete Items Re-order


33 Dynamic Menus




37 Proc Functions & Statements

38 $paintedfieldproperties („myfield1“, „2“, „Xpos;Ypos“)= „Xpos=20;Ypos=15“ $paintedfieldproperties( Field, {PaintedOccurrence,} { PropertyList} ) {=} PropertyValuesList PropertyValuesList = $paintedfieldproperties( Field, PaintedOccurrence {, Position | Size} )

39 $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"

40 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

41 These instructions can create, read, and write zip files and directories. (Local) File I/O: filedump fileload (Local) directory management: ldircreate ldirdelete ldirrename $ldir $ldirlist (Local) file management: lfilecopy lfiledelete lfiledump lfileload lfilemove lfilerename $lfileexists $lfileproperties lfiledump lfileload dircreate dirdelete dirrename filecopy filedelete filedump fileload filemove filerename flush lflush ZIP unlock Use of Zip-files

42 Zip Path Assignments Assignment file redirections now accept zip archive definitions. For example: [FILES] ; All forms compiled into a ZIP archive *.frm =*.frm ; All xml files are imported from the sources ZIP in the installation directory umeta.xml = usys:..\sources\ usource.xml = usys:..\sources\ udefault.xml = usys:..\sources\


44 $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.

45 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.

46 Miscellaneous Functions $procreturncontext $itemcount $string

47 $procreturncontext Return context information about the return value of the previous Proc instruction. Syntax: $procreturncontext 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. Description

48 $procreturncontext ItemDescription Context = ContextContext 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

49 $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) %%"

50 $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 ".

51 $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

52 XML – Reader / - Writer

53 XML -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

54 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. Simple API for XML (SAX)

55 Hello, world! start document start element: doc start element: para characters: Hello, world! end element: para end element: doc end document Hello, world! Simple API for XML (SAX)

56 XML-Reader STARTDOCUMENT activated when the parser starts reading the document. STARTELEMENT activated when the parser encounters a start tag, for example CHARACTER activated when character data is encountered between a tag and its end tag. ENDELEMENT activated when the parser encounters an end-tag such as. ENDDOCUMENT activated when the end of the document is reached.

57 operation startdocument ; your code end ;  > operation enddocument ; your code End operation startelement params string name: in string attr: in endparams ; your code end ;  > operation endelement params string name: in endparams ; your code end operation characters params string chars: in endparams ; your code end XML-Reader operation warning | error | fatalerror params string list: in endparams ; your code end

58 To create a SAX handler: 1.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. 2.Optionally, implement error handling operations to handle invalid data and other errors. Data read by the parser is expected to be legal—either 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.

59 To read and parse an XML document: 1.Create an instance of the UXMLREADER component. 2.Create an instance of the handler component, or retrieve the instance name of an already active handler component. 3.Activate the handler by calling the SETHANDLER operation. 4.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.

60 XML-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

61 To generate an XML document: 1.For each XML document you want to generate, create an instance of the UXMLWRITER component. 2.Call the STARTDOCUMENT operation for each instance. 3.Add XML elements, attributes and comments using the operations available on the UXMLWRITER component. 4.Retrieve the resulting XML documents with the GETDOCUMENT operation. 5.Manipulate the data as required. 6.Delete the instances of UXMLWRITER when they are no longer required.

62 Integrated Web Development

63 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 Integrated Web Development




67 Migration





72 Zeit für Fragen CBG Workshop

Download ppt "CBG Workshop Michael Zille. Uniface 9 What‘s new? Stichworte UDE Unicode Farbverwaltung Widgets Dynamische Formlayout-Änderungen XML Reader/Writer Integrierter."

Similar presentations

Ads by Google