Thursday, 28 July 2011 15:47

Migration to version 0.86

Written by

As we discussed earlier versions 0.85 and 0.86 will be new milestones for uniGUI library. They will introduce new framework core which brings lots of architectural changes and improvements.

Here is a brief list of these changes:

  • All controls will be descendant of a common root opposed to previous releases where each Control had a different ancestor.
  • Only implemented properties and events are published. This will avoid confusion in previous versions where lots of public and published features in VCL mode were not implemented in Web mode.
  • Class types no longer change among Web and VCL. Now TUniButton is always a TUniButton regardless of the displayed mode.
  • In event handlers Sender parameter will always contain correct class type.
  • As a result of above changes you can safely use as and is operators.
  • Advanced client side event scripting.
  • Extended Server side event handling for click and mouse events.

Other benefits of this new core will become manifest as framework continues to grow. For example, without new core integration of client side scripting would be very difficult.

Since it contains some huge changes, incompatibility with older versions is inevitable.  i.e.  it will not be as easy as opening your projects and simply recompiling it. In some areas it breaks compatibility and you must go through a procedure to make your existing projects compatible with 0.86.0.

Here is the receipt. Please follow these steps exactly as described in below order.

  • Completely uninstall any previous version of uniGUI and remove uniGUI design time libraries from Delphi IDE.
  • Download and install the latest build for version 0.86.0.
  • As always build all packages and Install the design time packages.
  • Make a full backup of your existing project which you want to convert.
  • Before you open the project in Delphi IDE do the following changes.
  • Locate Forms which contain TUniPageControl component.
  • Open the associated DFM file in a Text Editor and replace all TTabSheet instances with TUniTabSheet.
  • Save the DFM file and repeat this for all Forms containing  TUniPageControl control.
  • In order to simplify next steps you can delete the DSK (Desktop) file of the related project.
  • Open the project in the IDE.
  • Open ServerModule.pas.
  • IDE will nag you for some properties that no longer exist. Ignore them and save the ServerModule.pas.
  • For all Forms and Frames in project open them one by one. Again IDE will warn you about several properties that aren't published anymore. Press Ignore all and save the Form.
  • When you try to save modified Form, IDE may complain about some components that have incorrect class types. IDE will prompt you to correct the problem. Answer Yes to all prompts and save the Form.
  • Repeat above steps for all Forms and Frames.
  • Now try building the project.
  • Compiler will generate errors for units X,Y, Z... that do not exist anymore. (e.g. UniControls, UniExtControls, ...etc.) Remove these units from Uses list and save the Form.
  • For some Forms compiler may generate error for some "Unknown class type". Add UniGUIAbstractClasses to Uses list of Form and recompile the project.

Now you have successfully converted your project to version 0.85 and you can run and test it in a web browser. Hopefully all converted projects should run as expected in both VCL and Web mode. If not try to localize the problem or look at the browser JS error logs.

Read 5733 times Last modified on Monday, 16 February 2015 09:02