Erratta: Using Elevate Web Builder 2

Book details for Using with Version 3 of EWB

Erick Engelke

Update: Aug 8, 2022

 

It’s been a few years since I wrote Using Elevate Web Builder 2, a very popular book explaining many features of the EWB ecosystem, and how to extend it with JavaScript libraries.

 

I have not updated the book, but this errata page does give you the guidance you need to apply the book to EWB 3.x

 

IDE

The look of the IDE has changed, but I like the new design and think it makes more sense.  Most of the controls are identical to and compatible with EWB 2.x controls.

 

One annoyance, in my opinion, is that EWB 3.x does not generate an error if you accidentally assign a variable you meant to compare, it only generates a compile warning.

 

So:

    c = 25

will generate False, rather than assign 25 to c.  It will give a small compile warning, but you may not notice it.

 

Eval versus CreateObject

EWB’s CreateObject() is identical to the Eval() function I kept entering in my applications.  You can use them interchangeably.

 

TObject and External Objects

EWB 3.x makes a distinction between External Object (descend from class TExternalObject) and internal Objects (descend of class TObject).

 

One big difference is that TExternalObject methods and attributes are case sensitive, while TObject based objects are case insensitive and will get mapped to encrypted names if you select Encrypt/Compress output.

 

Type Casting

EWB 3.x requires you to typecast many objects before assigning them, this includes TObject and TExternalObject based objects.

 

Application of These Changes

My EWB book frequently has lines like:

Type

   TMyobject : TObject;

Var

    Obj : TMyObject;

Begin

    Obj := eval(‘new TObject()’);

    …

 

EWB 3.x requires:

Type

  TMyObject : TExternalObject

Var

  Obj : TMyObject;

Begin

   Obj := TMyObject( eval(‘new Object()’));

….

 

Free Advice

I’ve written thousands of lines of EWB code.  The following are my top tips to help you get going:

 

1.     Rename your forms immediately upon creating them.  I’ve noticed problems if you have two TForm1’s in your project, EWB appears to get confused and cause problems down the road.  Avoid that by instantly renaming your forms before you forget.

2.     Name your forms similar to the code’s filenames to avoid confusion as your project grows.  If you name a file: Budget.wbs, name the form FormBudget. 

3.     Use responsive design (Layout: Position, Consumption, Stretch and Reset).  Your applications will flow much better than hard coded positioning.

4.     Back up your work.  I make daily zip files of the code with the name of the project and the date, and save them to a cloud drive.  If something goes wrong, I’ve only lost a few hours worth of work.

5.     If you can’t figure something else, create a small project which tests the idea.  Sometimes you will figure out with simplified programs, however there are occasional bugs in the compiler or libraries, if you cannot resolve the small file problem, submit to the bulletin board or to EWB’s support Email depending on whether you think It’s your fault or can’t explain it.  But nobody wants to debug your whole large program.
   

 

Changes to EWB

The book had a lot of examples, but you had to type them in, or copy and paste from the PDF.  And changes in EWB meant that they would become slightly incompatible over time.

 

For example, the CK Editor no longer works with EWB, and I don’t know why, I don’t know if it was changes from the CK Editor line or changes in EWB.  I have moved on from that package to the Quill editor in my Nice toolkit, so it doesn’t matter to me.

 

Nice Toolkit

I eventually realized it would make more sense to offer advanced components as a toolkit I would use myself and could keep current with each new release of EWB.

 

My Nice Toolkit is a library of components and tools that do things like:

·      Add Graphs to your applications (eg. Google Graphs)

·      Add an advanced rich editor capable of editing HTML

·      Add a simple camera input

·      Read or create barcodes (using built-in cameras, eg. On phone)

·      Change the look of stock components (colours, sizes, fonts, etc.) en masses

·      Print or save as PNG any EWB forms, with no loss in resolution and WYSIWYG

·      And much more

 

To see examples of all the EWB functionality it adds, check out https://erickengelke.com/nice

 

I charge a $50 one time fee for the toolkit, updates for new functionality are free to existing clients of the toolkit.

 

Custom Work
I do some consulting and I’ve become quite proficient at EWB interfacing with other libraries.

 

If you need some extra functionality or have JavaScript libraries but don’t know where to start, you may wish to have aome small custom work. 

 

For example, someone needed to enhance the TMap feature in EWB to add shipping routes, another  I can often help for a reasonable fee and can offer quotes.