Release notes: Embedded Wizard 9.30
Version 9.30 contains the following changes and improvements:
New 'Memory (RAM) usage' window
★New window Memory (RAM) usage replaces the old 'Garbage Collector' window. The new window tracks the memory usage of the entire application. In the upper area the window lists all Chora object classes and their memory (RAM) usage. In the lower area, it displays the estimated total memory (RAM) usage of the tested application as a bar chart. The chart reflects the amount of memory needed by the application within the real target device:
★The window also gives the lowest possible configuration parameters for the glyph cache and issue buffers estimated during the runtime of the application.
New 'Code Generation Report' (Code metrics)
★During code generation Embedded Wizard calculates the amount of flash memory (ROM) for the entire application as it will be needed in the target system. It includes all involved resources (e.g. bitmaps) as well as the logic of the application (the classes and the Chora implementation). This Code Generation Report is stored as HTML file together with other generated files. You can open it in a WebBrowser:
★Besides the estimated overall flash usage, the report also provides many other helpful metrics and information regarding your application.
Improvements of the 'Chora Objects' window
★The list of Chora objects within the Chora Objects window has been enhanced by a new column displaying the amount of memory (RAM) occupied by the object. With this additional information you can e.g. detect which objects have the biggest impact in memory usage, etc.
★The context menu of the Chora Objects window has been enhanced by new toggle item . Per default, this item is disabled causing the window to display only the regular objects, means objects being created via new operator. If this menu item is enabled, the window lists all Chora objects, also those which are nested inside another objects. This is very helpful to get an overview about all objects and during debugging the application when you are looking for a particular instance existing within another object.
★The sorting of the objects in the objects list has been simplified. Clicking on a column sorts according to the values of this column. Previously the column Location and Class were combined together.
Improvements of the Log window
★The Log window contains now 3 separate lists to group Debug, Search and all other messages (Main). Especially the list Debug is used to collect all messages generated by trace statement.
★If the list Debug is shown, the user can specify a pattern to filter the trace messages.
Improvements of the Multi-Touch support
★The Prototyper window has been enhanced to react to touch events if the MS-Windows PC contains a (multi-) touch capable display. In other words, the user can test the GUI application by touching on the screen of his/her PC.
★If the MS-Windows PC does not contain a multi-touch capable display, the multi-touch interactions can be simulated by using the mouse device and keyboard. For this purpose the user holds down the key Alt and clicks with the mouse the positions for up to 5 fingers. After releasing the Alt key the user can move and activate all previously placed fingers simultaneously by using the single mouse device. With the additionally pressed key Shift the placed fingers can rotate or be spread when the user moves the mouse. For more details see Touch screen inputs. With this feature the user can test multi-touch gestures even on a PC without any touch capability.
★The Win32 Platform Package has been improved to handle multi-touch events if the used MS-Windows PC does contain the corresponding touch capable device. In other words, the user can run the Win32 application on a PC with touch screen.
★The WebGL Platform Package has been improved to handle multi-touch events if the computer running the WebBrowser does contain the corresponding touch capable device. In other words, the user can interact with the WebGL application via touch screen.
★The Simple Touch Handler has been enhanced by the property NoOfFingers. With this property the handler can be configured to react and process gestures only when the user has put the specified number of fingers within the handler's area.
★The Wipe Touch Handler has been enhanced by the property NoOfFingers. With this property the handler can be configured to react and process gestures only when the user has put the specified number of fingers within the handler's area.
★The Rotate Touch Handler has been enhanced by the property NoOfFingers. With this property the handler can be configured to react and process gestures only when the user has put the specified number of fingers within the handler's area.
★The Slide Touch Handler has been enhanced by the property NoOfFingers. With this property the handler can be configured to react and process gestures only when the user has put the specified number of fingers within the handler's area.
★The possibility to specify RetargetCondition for a touch handler has been enhanced by new option ForeignPress. With this condition, the affected handler will resign if a new touch event arrives and this event is handled by a foreign touch handler lying in front or behind the affected handler. This is useful when the application combines handlers configured to react to two or more fingers.
Improvements of Composer and Inspector windows
★Composer window has been reworked to arrange newly pasted members within the actually visible area. Concrete, if a member is copied/pasted and the members lies fully outside the visible area of the Composer, the member is arranged in the center of the actually visible area. The user can thus see the member and it is not necessary to scroll the Composer to find it. Similarly, if a view is copied and the view lies outside the visible area of Canvas, the view is arranged in the center of the actually visible area of Canvas. If no canvas is visible, the view retains its original position. If the copy/paste operation affects a view AND a brick, the both members retain their original positions without being rearranged. This is true even if the members lie outside the visible area.
★The command Close this Composer has been enhanced to also react on CtrlW hot-key.
★The menu Extras has been modified and enhanced by new command Zoom 100 %. With this command the user can restore the default 1:1 scaling in the Composer window. Additional hot-key Ctrl0 has been added to allow the user to access the command by using the keyboard.
★The command Close all Composers has been modified to not ask the user for confirmation of the operation.
★New command Close other Composers has been added to the Window menu and to the context menu of the Navigation Bar. With this command the user can close all other composers except the actually opened one.
★Automatic project refactoring after moving members between two units has been added.
★The double-click behavior in Composer and Inspector has been improved to avoid false double clicks.
★Composer enhanced to react to CtrlMouseWheel events. These cause the Composer contents to be zoomed-in/out.
Improvements of the Navigation Bar
The behavior of Navigation Bar has been changed:
★Previously the tabs were grouped and sorted automatically according to their type (units, classes, enums, ...). Now, no automatic sorting is performed. Only the Project tab is arranged at the first position. The position of all other tabs is not predetermined.
★When the user clicks on a tab and drags it horizontally, the tab exchanges its position with its neighbor. The user is flexible to arrange the tabs according to his/her workflow.
Improvements of the Prototyper window
★In the past the Garbage Collection needed during Prototyping were triggered every 10 sec. Now the starts are determined dynamically. If there is no activity in the application, Garbage Collection starts still every 10 sec. In turn, if the application creates many new Chora objects, the Garbage Collection is started more frequently up to 4 times per second to avoid that many garbage objects occupy memory unnecessarily. Please note, this aspect addresses the Prototyping only. In the target system the Garbage collection is triggered after each screen update - as usual.
★The menu Debug as well as the corresponding toolbar have been enhanced by new menu item . This allows the user to pause the running Prototyper and then e.g. analyze the memory usage/garbage collector statistic data, etc..
Automatic installation of TrueType files (TTF and OTF)
In the past the fonts used in your Embedded Wizard project have to be installed properly by MS-Windows. Without this, the code generation were not able to find and convert the used fonts. Now when opening a project, Embedded Wizard searches the project and all unit folders for TTF and OTF files. If found, MS-Windows is asked to install the files as private fonts visible for Embedded Wizard application only. When closing the project again, the previously installed fonts are uninstalled automatically again.
With this improvement it is easy to deploy your Embedded Wizard project together with the font files to your customers or colleagues. They don't need to take care of whether all fonts are installed as expected. Please see also Choice the TrueType font.
Improvements of Mosaic framework
★The Outline Box has been enhanced by the property OnUpdate permitting the implementation of code to be executed when the outline content is scrolled or its layout changes. This helps to align eventual decoration views on the outline content.
★The formation modes supported by Outline Box have been enhanced by 8 grid combinations (e.g. LeftToRight_TopToBottom, etc.). These grids allow the user to arrange the views in multiple rows or multiple columns. If there is not enough space for a view within a row/column, the row/column is automatically wrapped.
★The Rotate Touch Handler has been enhanced by the variable Radius. This variable is updated during the user interacts with the handler. It contains the distance in pixel between the actual touch position and the center of the handler area..
★New property StackingPriority added to the Core::View class. With this property it is now easy to configure e.g. top-most views. The Mosaic framework automatically prevents views from being rearrange behind another view with lower StackingPriority or in front of a view with higher StackingPriority. This feature is not a replacement for Z-Order. It is just a constraint how Mosaic automatically rearranges views.
As consequence of this adaptation, the functionality in the class Core::Root intended to ensure that eventually used VirtualKeyboards are always top-most has been removed. To achieve the same effect now, just set the StackingPriority of the VirtualKeyboard to a value higher than the priority of all other views.
★Optimization of the Group view to avoid that the entire view's area is redrawn if only small area of the original group has been invalidated. This optimization works only if no scaling/stretching is applied to the group image.
★The class Graphics::Path used to store vector graphic Path Data has been enhanced by the method CreateFromSVGString(). With this method the Path Data object can be loaded with data provided in SVG string.
★The class Graphics::Path used to store vector graphic Path Data has been enhanced by new methods GetSubPathBounds() and GetPathBounds(). These methods are very useful to calculate the extent of the path and e.g. arrange or scale path accordingly. See also: Evaluate and modify the coordinates stored in the Path Data object.
Improvements of Chora programming language
★The limitation not permitting the creation of variants from classes existing in the unit Core has been removed.
★The verification of Done() methods has been reworked to ensure that during Garbage Collection no code is executed which may have side effects on the actual Garbage Collection. After the Garbage Collection has determined which Chora objects are not in use anymore, the Done() methods of these objects are invoked and the objects are disposed thereupon. The order in which the objects are processed is not predetermined. Consequently, code executed within one Done() method can evaluate a references to an object being disposed before. To avoid such fatal programming errors we restricted the Done() methods to the below rules. Disregard leads to Chora compiler error message:
1.Access to data members containing a reference to an object is not permitted.
4.Other methods invoked from the method (Rule 3) have also to fulfill the rules recursively.
★New attribute OutputFileNameExtension added to profile. With this attribute the user can override the default file extension for generated code files (e.g. C in case of ANSI-C code). Now the user can specify cpp, etc. to generate other output file names. The resulting code can thereupon be compiled as C++ code. In case of WebGL PP the attribute is hidden and preinitialized with js.
★Bitmap Resource has been enhanced by new attribute Mode. It can assume the values Compressed, DirectAccess or Default. With this attribute the access mode for each Bitmap Resource can be configured individually.
★The trace statement has been modified to convert string characters in hex notation only when these don't belong to following UNICODE blocks: Basic Latin, Latin-1 Supplement, Latin-Extended-A, Latin-Extended-B, IPA Extensions, Greek and Coptic, Cyrillic, Cyrillic Supplement. In other words trace with string containing characters from the mentioned blocks are displayed as they are. Previously, all characters above 0x00FF have been converted.
Improvements of Runtime Environment
★New Heap Memory Manager implemented. With this step Embedded Wizard does not rely on any extern alloc/free functions (e.g. the TLSF manager, etc.). The new heap manager is optimized for the typical application cases arising from the GUI development. Compared with TLSF it saves ~3kB RAM. When using the new Heap Manager please call the functions EwInitHeap() and EwAddHeapMemoryPool() in order to initialize it correctly. With the functions EwVerifyHeap(), EwGetHeapInfo() and EwDumpHeap() you can check the heap coherence and display its actual status/contents.
★The usage counters used originally to mark strings being still in use has been removed. Now the Garbage Collector marks the strings by using similar approach to how Chora objects are marked. This simplifies and improves the Garbage Collection.
★ANSI C version of RTE has been adapted to allow so-called immediate Garbage Collection. Unlike the regular Garbage Collection, the immediate Garbage Collection can be started during Chora code execution. It is not necessary to wait for the end of Chora code execution. Accordingly, the system can clean up memory reserved during actual code execution and not needed anymore. The immediate Garbage Collection is started automatically if memory allocation fails. In order to use the immediate Garbage Collection:
1.Re-build the entire application, Runtime Environment and Graphics Engine with the C macro EW_USE_IMMEDIATE_GARBAGE_COLLECTION being defined. Depending on your target system you can configure the macro in the file ewconfig.h or in the Make file or your IDE.
2.Before the GUI application is initialized invoke the function EwSetStackBaseAddress() to inform the Garbage Collection about the location of the CPU stack. Knowing this the Garbage Collection can evaluate the stack till its actual address and so detect and mark used objects and strings.
3.In any cases, don't remove the regular Garbage Collection function EwReclaimMemory(). It is still needed!
4.If you are not using the Embedded Wizard own Heap Manager (you are using your own alloc/free functions), then you have to adapt the function EwIsMemory(). The function checks whether a pointer does refers any memory on your heap. The function is found in the module ewextrte.c.
Please note, immediate Garbage Collection is available for customers having the Professional license only. If you are working with the Small Business edition or you are using the Free edition, the immediate Garbage Collection can't be activated.
★The Memory-Profiler Statistic used in the target device has been enhanced to also display the amount of memory used by the Off-Screen buffer, if any.
★The Chora instant properties lower and upper have been rewritten to support the lower/upper-case conversion for more UNICODE characters. Following UNICODE blocks are supported now: Basic Latin, Latin-1 Supplement, Latin-Extended-A, Latin-Extended-B, IPA Extensions, Greek and Coptic, Cyrillic, Cyrillic Supplement.
Improvement of Bitmap Resource Management
★The Graphics Engine can be configured now to lazy load bitmap resources. If this mode is enabled, the memory (RAM) needed to store the pixel data of a bitmap frame is allocated and loaded not before the frame is used for a drawing operation. This function is controlled by the macros EW_LAZY_LOAD_BITMAPS and EW_LAZY_LOAD_BITMAPS_IF_ANIMATED_ONLY within the file ewconfig.h or in the Make file or your IDE.
★The Graphics Engine can be configured now to discard bitmap resources even if these are still in use. The discarding begins if the surface cache has exceeded the predetermined threshold value. This function is controlled by the macros EW_DISCARD_BITMAPS, EW_DISCARD_BITMAPS_IF_ANIMATED_ONLY, EW_DISCARD_BITMAPS_IF_NOT_USED_IN_CURRENT_UPDATE and EW_DISCARD_BITMAPS_IF_NOT_USED_IN_RECENT_UPDATES within the file ewconfig.h or in the Make file or your IDE. Both, discarding and lazy loading of bitmaps may reduce the memory (RAM) usage significantly at the cost of performance, however.
★The Bitmap Resource has been enhanced to support motion JPEG (MJPEG file) format. In such case, all frames from the MJPEG are loaded and converted to a single multi-frame bitmap. This is especially convenient to add splash screens or short video sequences rendered by an external video, etc. authoring tool.
Modifications in the available Templates
★The template for the Constant member initializes the Constant with an empty string instead of "Hello World".
★The template to add new Macro has no initialization - the content for new macros is empty per default.
★Bug-Fix in Inspector window causing an Assistant window (if it is actually opened) to behave incorrectly when the user tries to scroll the Inspector contents. The Assistant did not follow the scrolling.
★After closing a project the corresponding project file directory remained locked unless new project has been opened or the user quit Embedded Wizard Studio. Consequently, the user was not able to rename or delete the directory.
★The commands and in Gallery Bowser window have not worked as expected. Sometimes the Expand/Collapse menu items were available although there was nothing to expand/collapse. Similarly the tree view showed the expand/collapse icon (triangles) without needing it. Now, the Browser Window has been reworked. The previously used two different triangle icons (empty and filled) are replaced by filled triangles only. Automatically expanded items without any sub-items are shown without the triangles. The context menu of the Browser window shows now the items Expanded/Collapsed only when these operations make sense.
★All floating windows have been corrected to react to changes in screen resolution (monitor switch). In such case the windows which are not visible anymore are moved to the area of the next possible monitor automatically.
★The Code Editor commands Search/Replace/Indent were not updated if the editor was empty or ready only. The commands remained always enabled.
★Bug-fix for problematic initialization of nested objects if following condition was fulfilled:
1.Let's assume, there is a class A and the derived class variant B.
2.The variant contains an embedded object O.
3.The variant overrides a method M defined in the original class A.
4.During the initialization of the object O, the object can evaluate the global variable parentthis and access so the superior object of the class A.
5.The object O can invoke now the M method of class A.
6.Since the method M is overridden in the variant B, the The Runtime Environment will try to invoke the method M in context of the variant B.
7.The variant B has not yet finalized its initialization. The invocation fails.
★The screen update in Prototyper window was inefficient causing the tested GUI application to feel slowly if the user interacted with it very quickly (e.g. dragged the mouse fast). This triggered many intermediate screen updates. Now the screen updates are performed with the fixed rate regardless of the user inputs.
★Bug-fix in WebGL version of EwInitSubPath() function. The function returned false even if it was successful.
★Bug-fix for incorrectly displayed characters in the Code Editor if Embedded Wizard is running on Chinese windows 7 or 10.
★If during a multi-touch interaction, the interaction for one of the fingers is deflected, the global cursor repetition timer is stopped and not restarted. As consequence the hold events for all other fingers are not delivered unless the user releases them again.
★Bug-Fix with multi-frame bitmaps generated in DirectAccess mode. If the bitmap contains many frames so that it is necessary to store it in several surfaces, only the first surface displayed the contents as expected. Frames from the second and following surfaces, in turn, appeared shifted by 1-pixel.
★Bug-fix for chorac.exe command line Chora compiler when used with very complex projects. This caused the command line compiler to abort the code generation while Embedded Wizard Studio was able to process it without problems.
★Bug-fix in ShiftNodes() method. The operand aTranslateY was ignored if aTranslateX was 0 (zero).
★Bug-fix for incorrectly drawn path and lines within a surface configured with SCREEN pixel format.
★Bug-fix for Win32 Platform Package used together with Visual Studio > 2012. In such case the Win32 console window has not worked anymore. The printf() outputs were ignored.
★When generating code, all Bitmap and Font resources are stored now in separate *.h files instead of within the common *.c file. With this approach the individual *.h files can be flushed and completed preliminary, which removes the 'out of memory' problem with large projects containing many resources.
★Minor adaptations in the Runtime Environment, Graphics Engine and Code Generators to satisfy the CPPCHECK and CLANG static analyzer.
★During code generation the names for created files (e.g. *.h and *.c) are derived from the original names of the corresponding project members. While Embedded Wizard is case sensitive, the MS-Windows file systems are not. This may lead to the problem of two different project members being mapped to one and the same file. The resulting code is incomplete. For example, let's assume you have a unit containing two Bitmap resources named Logo and logo. Since Embedded Wizard is case sensitive, it will distinguish the both resources. During code generation, however, both resources are mapped to one and the same file logo.h.
★During code generation the names for created files (e.g. *.h and *.c) are derived from the original names of the corresponding project members and the superior unit member. Depending on your project contents, two different unit + project-member combinations can produce one and the same file name. The resulting code is incomplete. For example, the member DeviceClass within the unit Test and the member Class within the unit TestDevice will be mapped to one and the same file name _TestDeviceClass.h.
★During code generation the names for created files (e.g. *.h and *.c) are derived from the original names of the corresponding unit members. MS-Windows system, however, has few file names reserved for special system devices. Accordingly, if your project contains a unit with name corresponding to the reserved by MS-Windows, the code generation will fail. Following names should be avoided when naming project members CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, COM0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, LPT9, LPT0.