[Lazarus] Cross Codebot surface drawing examples

Anthony Walter sysrpl at gmail.com
Fri Mar 27 15:31:33 CET 2015


Lukasz,

Yes, I'd like to do that something like that sometime sooner rather than
later. There are areas I think need to be improved in the IDE, especially
the CodeTools, before that happens though. I've communicated with Mattias
on these lists with and offered to help improve CodeTools, but he's still
busy trying to get Lazarus 1.4 done.

Here are some of the areas of CodeTools needing improvements with which are
particularly painful given the language features used by Cross Codebot.

1) Class and record helper methods do not show up in the with code insight.
Trying to say MyString.Replace('a', 'b') and 'This is a
message'.Replace('a', 'b') both cause code tools to stop highlight the line
errors if you try to use method completion.

2) Class and record helper methods need code navigation support. That is,
if you hold control and mouse over Replace, it ought to highlight in blue
and be underlined.

3) Using generics with interfaces inheritance causes the editor to jump to
the what it sees as errors in other units. For example IBitmap =
interface(ICloneable<IBitmap>) causes the editor to jump to the
Codebot.Graphics.Types unit and highlight IBitmap whenever you type
MyBitmap and dot.

4) Dotted namespace like Codebot.Graphics do not provide namespace insight
when you type Codebot and dot. Actually it does provide a list of unit
names, but they are pulled from the global list of units rather than
restricted to the units beginning with the Codebot identifier.

5) Using implementations of dotted namespace file in include files can
cause serious problems. For example in Codebot.Graphics I used to have the
defined of the types, and in the implementation section I'd have:

uses
  {$ifdef windows}Codebot.Graphics.Windows{endif}
  {$ifdef linux}Codebot.Graphics.Linux{$endif};

This problem still persist with Bare Game. See the 2nd bullet on the know
issues page: http://www.baregame.org/#topic_known_issues

The problem is so bad I had to create workaround. I've restructured unit
names such that include files in dotted units never begin with the same
dotted identifiers as the units they are included from.

Mattias has done a fine job so far, but I think these areas of CodeTools
(especially points 1, 2, and 4) will fixing. I've tried to make fixes to
CodeTools before and got really confused when trying to follow along with
it, so until I get more familiar with it or someone fixes these problems,
the problems I outlined above are going to persist.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150327/0691b753/attachment-0003.html>


More information about the Lazarus mailing list