Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 21 total
Thread Random thoughts on EWB2
Fri, Sep 4 2015 6:33 AMPermanent Link

Matthew Jones

So far, conversion of my 15 form application has been going fine. The
new layout system is lovely and allows me to get a good looking layout
without any fuss. A few types changed, like EError to Exception,
TElement to TDOMElement, but these have been easy to find and sort.

I have made some observations, thoughts and questions while doing it,
all below signature. Would be interested in thoughts.

--

Matthew Jones



I don't understand TMenu. If I put it on a TPanel as the Header for a
page, it doesn't go outside the panel. Am I expected to use a button or
similar to cause it to "pop-up"?


Purpose of THeaderPanel? How is it different to a normal TBasicPanel?


Is it possible to edit the form file to change the type of a control
easily? Perhaps to change a TBasicPanel to a THeaderPanel.


A way to be able to "block" or "grid" items would be nice. A panel with
segments that auto-size according to the layout of the segments children
I wanted to do this:
-----------------
label.............label..edit
label...Button.......
label.............label..edit
-----------------
It isn't easy to get that with the current layouts as the button is
bigger than labels. Of course I can just pop in a panel and solve it,
but I mention it as a desire. Basically, build a column of components,
and then start over at the right limit of that column. Hmm, on
rebuilding my forms, it looks like this is possible using the reset on
a right consuming item. Will have to have a play with this. Holy cow!
It can indeed do this just nicely. Columns of components. Consume down,
bottom one consumes right, reset, next component is in second column.
Powerful.


TPagePanel, would like a version or option to hide the tabs at run
time. I guess that could be done using an interface change, but I'd not
want all tabbed panels to be hidden, just sometimes when I want to
control the display by code.


I think there are too many tabs in the component options. Perhaps move
grids to containers, or database. Indicators to graphics? Menus to
toolbars? Actually, I have grid twice. Is that a hangover from
something?


It would be very helpful if the property editor would keep the open
sub-items open as I have them. Particularly the layout and margins are
a pain to keep opening all the time.


Is there a way to make a TBasicPanel stretch down to have its contents
fit? I have some items which can vary in height significantly, and the
whole thing needs to be adjusted.


Negative margins - excellent!


Auto-size check box would be nice - when managing a layout of labels
and checkboxes, the labels nicely update their size, but the check
boxes don't. Would obviously be optional.


TSeparator has disappeared. Was a nice way to divide up rows of forms.


There aren't enough "near white" colours. Or there don't appear to be.
More "old lace" and "azure" please.

It might perhaps be nice to be able to hide, or edit, some of the
colours in the colour selector. Perhaps a theme editor, so I can set up
colours for "my theme" and then only select from those. I also tend to
have a few colours that mark panels and placeholders so that I can see
edges etc.

I think the default text colour is too grey. It should be much closer
to black just for clarity. Indeed, why not black...


I just created about 15 forms. In the project options, I now have 15
"Form1"'s listed.


xStrings.Remove(nLoop) doesn't compile any more (nLoop is an Integer,
xStrings is TStringList). Help says it is there, but Delete works.


I have this as a common construct:
 try
 ...
 except
   on errInfo : Exception do
   ...
The EWB code had procedures where this was used multiple times. Now I
get an error that there are two errInfo duplicates.


Double-clicking on a TLink doesn't seem to work reliably, at least
after the first assignment of the event handler.


TParser - did it lose the TokenPos property, or was that something I'd
added. Anyway, it would be very handy to have for my code, as it is key
to traversing my JSON. At the moment anyway, but primary purpose it to
get running asap of course.
Fri, Sep 4 2015 8:43 AMPermanent Link

Matthew Jones

Matthew Jones wrote:

> Double-clicking on a TLink doesn't seem to work reliably, at least
> after the first assignment of the event handler.

This appears to be because double clicking creates an OnLinkChange
event, but it should be OnLinkClick. Not sure what's happening as it is
inconsistent, working when IDE is restarted, and failing later.

--

Matthew Jones
Fri, Sep 4 2015 9:11 AMPermanent Link

Matthew Jones

More thoughts/ questions.

The values in LocalStorage can be NULL, and I used to test against nil
to check if it was valid. This appears to not be allowed any more.
Options?
  m_szDebugLogID := Window.LocalStorage.GetItem('logid');
  if m_szDebugLogID = nil then // now fails



TFont cannot be assigned any more? I have things like "Label1.Font :=
Label2.Font". It says the left side is not assignable. I appear to be
able to do "Label1.Font.Assign(Label2.Font)" but is this okay?


ShowHint has gone. Not sure if that's a problem, I did use it for some
things. Will work out what.


How can I set the Placeholder property for a TEdit? It is there in the
help, but I can't see the connection to the TEdit and its elements.


TButton no longer has a ModalResult property. Is there a reason for
this? What was the thinking on how this would work. Heck, does
ModalResult still work? Hope so!



--

Matthew Jones
Sun, Sep 6 2015 3:05 AMPermanent Link

Malcolm Taylor

Matthew Jones wrote:

> I think the default text colour is too grey. It should be much closer
> to black just for clarity. Indeed, why not black...

I too found the grey text for input data (TEdits, etc) a little pale
for my taste.
OK, the darker caption text is on a grey background while the input
text is on near white so there is some logic.
Yet, while I think the data text is more 'important' than the captions,
my eyes are drawn to the captions.
Then, I am not a graphic designer.  Surprised
Tue, Sep 8 2015 9:13 PMPermanent Link

Steve Gill

Avatar

Matthew Jones wrote:

> I think the default text colour is too grey. It should be much closer
> to black just for clarity. Indeed, why not black...

Me as well.  I painstakingly change every instance to clElevateLightBlack..

= Steve
Wed, Sep 9 2015 3:20 AMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

I always change the default font colour to a darker one as well.

Chris Holland
[Team Elevate]

On 09/09/2015 02:13, Steve Gill wrote:
> Matthew Jones wrote:
>
>> I think the default text colour is too grey. It should be much closer
>> to black just for clarity. Indeed, why not black...
>
> Me as well.  I painstakingly change every instance to clElevateLightBlack..
>
> = Steve
>
Wed, Sep 9 2015 11:49 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I don't understand TMenu. If I put it on a TPanel as the Header for a page, it doesn't go outside the panel. Am I expected to use a button or similar to cause it to "pop-up"? >>

If you want it to.  It's a general-purpose vertical menu, meaning that it can be just put on a form, ala mobile, or you can use it as a popup.

<< Purpose of THeaderPanel? How is it different to a normal TBasicPanel? >>

The only differences are the styling and default layout.

<< Is it possible to edit the form file to change the type of a control easily? >>

Yes, just change the ClassName property.  However, this will be an option in the form designer soon, so then you won't have to manually edit the JSON.

<< A way to be able to "block" or "grid" items would be nice. A panel with segments that auto-size according to the layout of the segments children I wanted to do this: >>

See here:

http://www.elevatesoft.com:8081/panels/panels.html

Click on Create Panels, and then start minimizing panels.  You'll see that the next 2.01 B3 build will also fix the issue with "max consumption" when it comes to determining layout consumption on "rows".  In 2.01 B2 and earlier, only the *last* control on a given "row" would determine the consumption.

<< TPagePanel, would like a version or option to hide the tabs at run time. >>

TPage.Tab.Visible

<< I think there are too many tabs in the component options. >>

There's room being left for future controls.

<< Actually, I have grid twice. Is that a hangover from something? >>

I've never seen an issue with duplicates.  Are they both on the same page ?

<< It would be very helpful if the property editor would keep the open sub-items open as I have them. Particularly the layout and margins are a pain to keep opening all the time. >>

It does do so, but only if you're on an equivalent class type.

<< Is there a way to make a TBasicPanel stretch down to have its contents fit? I have some items which can vary in height significantly, and the whole thing needs to be adjusted. >>

Do you mean an AutoSize for the panel ?  2.01 B3 has this in there experimentally, so you can un-comment the AutoSize property for the TBasicPanel to try it out.

<< Negative margins - excellent! >>

Never tried them, but I don't see why they wouldn't work.

<< Auto-size check box would be nice - when managing a layout of labels and checkboxes, the labels nicely update their size, but the check boxes don't. Would obviously be optional. >>

I've kept the number of auto-sizing controls to a minimum primarily because measuring text is *slooowww* in browsers.

<< TSeparator has disappeared. Was a nice way to divide up rows of forms. >>

Take your pick:  TBasicPanel, THeaderPanel, TLabel, etc.   Or, create your own - it will probably take about 5 minutes. Smile

<< There aren't enough "near white" colours. Or there don't appear to be. More "old lace" and "azure" please. >>

EWB uses standard web colors.  Anything else you can create manually using the color editor, and save it as a commonly-used color (just drag the color and drop it in an empty square at the top of the color editor dialog).

<< It might perhaps be nice to be able to hide, or edit, some of the colours in the colour selector. Perhaps a theme editor, so I can set up colours for "my theme" and then only select from those. I also tend to have a few colours that mark panels and placeholders so that I can see edges etc. >>

There will be more improvements in this area.

<< I just created about 15 forms. In the project options, I now have 15 "Form1"'s listed. >>

I had someone else report this.  Was this in a new project, or an existing, already-saved project ?

<< xStrings.Remove(nLoop) doesn't compile any more (nLoop is an Integer, xStrings is TStringList). Help says it is there, but Delete works. >>

The help says that Remove takes a String, not an Integer.  These methods were updated to use more Delphi-like method names.

<< The EWB code had procedures where this was used multiple times. Now I get an error that there are two errInfo duplicates. >>

Please send me/post an example of what you're describing.  I just tried this:

  try

  except
     on errInfo: Exception do
        ShowMessage(errInfo.Message);
  end;

and it compiles fine.

<< Double-clicking on a TLink doesn't seem to work reliably, at least after the first assignment of the event handler. >>

This is fixed - the default event wasn't set properly.

<< TParser - did it lose the TokenPos property, or was that something I'd added. Anyway, it would be very handy to have for my code, as it is key to traversing my JSON. At the moment anyway, but primary purpose it to get running asap of course. >>

Why do you need the parse position ?  You should look at using the TReader component now for reading JSON.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Sep 9 2015 12:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

<< The values in LocalStorage can be NULL, and I used to test against nil to check if it was valid. This appears to not be allowed any more. Options? >>

Use the Exists method, it performs the proper checks for you.  The compiler allowing nil comparisons to strings was always a little flaky in conceptual terms (strings are *never* nil in JS), so I got rid of it.

<< TFont cannot be assigned any more? I have things like "Label1.Font := Label2.Font". It says the left side is not assignable. I appear to be able to do "Label1.Font.Assign(Label2.Font)" but is this okay? >>

Yes, Assign is the ticket.

<< ShowHint has gone. Not sure if that's a problem, I did use it for some things. Will work out what. >>

Hint property is blank: don't show.  Hint property isn't blank: show. Smile

<< How can I set the Placeholder property for a TEdit? It is there in the help, but I can't see the connection to the TEdit and its elements. >>

Where in the help ?  It's in there at the base UI level, but not for TEdit.

<< TButton no longer has a ModalResult property. Is there a reason for this? What was the thinking on how this would work. Heck, does ModalResult still work? Hope so! >>

TDialogButton is what you want.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Sep 9 2015 12:50 PMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> << How can I set the Placeholder property for a TEdit? It is there in
> the help, but I can't see the connection to the TEdit and its
> elements. >>
>
> Where in the help ?  It's in there at the base UI level, but not for
> TEdit.

Exactly! I would like to set the placeholder text for edit boxes
("enter email address" or something). The propery exists for input
elements. Isn't an edit box an input element?

--

Matthew Jones
Wed, Sep 9 2015 1:03 PMPermanent Link

Matthew Jones

Tim Young [Elevate Software] wrote:

> You'll see
> that the next 2.01 B3 build will also fix the issue with "max
> consumption" when it comes to determining layout consumption on
> "rows".  In 2.01 B2 and earlier, only the last control on a given
> "row" would determine the consumption.

That would be a useful improvement.


> << Actually, I have grid twice. Is that a hangover from something? >>
>
> I've never seen an issue with duplicates.  Are they both on the same
> page ?

They weren't, but I have only one now. Ignore me.



> << It would be very helpful if the property editor would keep the
> open sub-items open as I have them. Particularly the layout and
> margins are a pain to keep opening all the time. >>
>
> It does do so, but only if you're on an equivalent class type.

It needs to just know that the property type is open or closed, and
retain that across components of different types without them. I'd use
a stringlist and keep the properties open in it. If closed, remove the
item. Right now it is a lot of opening to achieve a nice layout.


> << I just created about 15 forms. In the project options, I now have
> 15 "Form1"'s listed. >>
>
> I had someone else report this.  Was this in a new project, or an
> existing, already-saved project ?

This was a new project, with the forms saved as I finished them.


> << The EWB code had procedures where this was used multiple times.
> Now I get an error that there are two errInfo duplicates. >>
>
> Please send me/post an example of what you're describing.  I just
> tried this:
>
>    try
>
>    except
>       on errInfo: Exception do
>          ShowMessage(errInfo.Message);
>    end;
>
> and it compiles fine.

procedure TForm.Blah;
begin
  try

  except
    on errInfo: Exception do
       ShowMessage(errInfo.Message);
  end;

  try

  except
    on errInfo: Exception do
       ShowMessage(errInfo.Message);
  end;

end;

Not actually tried that, but it is two identical handlers in the same
procedure.




> << TParser - did it lose the TokenPos property, or was that something
> I'd added. Anyway, it would be very handy to have for my code, as it
> is key to traversing my JSON. At the moment anyway, but primary
> purpose it to get running asap of course. >>
>
> Why do you need the parse position ?  You should look at using the
> TReader component now for reading JSON.

Speed of getting my application converted. I can improve it later. And
the actual use was getting the complete object data from the JSON.
Perhaps just ignore it - I can hack for now, and improve to remove.


--

Matthew Jones
Page 1 of 3Next Page »
Jump to Page:  1 2 3
Image