Recent

Author Topic: Window for constants  (Read 7164 times)

Goodie

  • Guest
Window for constants
« on: February 17, 2006, 10:29:44 pm »
This was already posted in another forum.

Everyone know it: Whyle using functions or procedures often parameters have to be set. But unfortunately you cannot know which constants for the parameters are available.

In other IDE's a completion window appears, which shows the constants which are available for the parameter.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Window for constants
« Reply #1 on: February 20, 2006, 08:02:01 pm »
It´s not very hard to know how which constants are available.

1 - Write the name of the procedure, like if you were going to call it on the code.

2 - Right-click that name and select "Find Declaration"

You will be taken to it´s declaration

3 - Right click the type you want to know.

This will work for set or enumerated types.

This is probably possible to be implemented via a plugin or on the IDE.

For constants passed as integer, then there is no way for the IDE to know which constants are available.

If you really want this, please, send a patch =)

Goodie

  • Guest
How to start?
« Reply #2 on: February 23, 2006, 03:03:22 pm »
I am not familar with the use of Lazarus. How I have to start?

How is it possible to read the Name of the constants of an enumeration type?

In my opinion a lot of improvements for the IDE are needed to make it "convenient".

tech-pro

  • Full Member
  • ***
  • Posts: 173
    • Tech-Pro.net
RE: How to start?
« Reply #3 on: February 23, 2006, 03:32:17 pm »
The trouble is, programmers have been spoiled by IDEs such as Delphi. They forget that it took years for IDEs to develop to this level of sophistication. Lazarus is actually a lot better than the first few versions of Delphi, which were considered quite revolutionary 10 years ago.

At the moment I think it is more important to complete the underlying functionality in the LCL and so on, so that programs can actually work, rather than pander to the needs of people who are too lazy to use a search tool to examine the library source code and find the answers to their questions (something I frequently had to do even with Delphi because of Borland's lousy documentation.)
Julian

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: How to start?
« Reply #4 on: February 23, 2006, 08:48:55 pm »
Quote
How is it possible to read the Name of the constants of an enumeration type?


Right-Click the name of the enumeration type on the source edit. Select "Find Declaration".

For this to work, the name of the enum type must be written somewhere on the source, like on:

var
  myvar: TEnumType;

--

In this case you would right-click TEnumType

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
Re: How to start?
« Reply #5 on: February 24, 2006, 10:50:16 am »
Quote from: "sekel"
Quote
How is it possible to read the Name of the constants of an enumeration type?


Right-Click the name of the enumeration type on the source edit. Select "Find Declaration".

For this to work, the name of the enum type must be written somewhere on the source, like on:

var
  myvar: TEnumType;

--

In this case you would right-click TEnumType


Or just CTRL click

(and after that CTRL-H to jump back)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Goodie

  • Guest
Window for constants
« Reply #6 on: February 25, 2006, 01:25:59 pm »
Thanks to all for your interest.

What have I to do, to make such a "feature" for the Laz IDE available? How is it possible to read the "Names" of the constants of the Enum Types?

TReplaceFlags = (rfIgnoreCase, rfReplaceAll)

How I can find "rfIgnoreCase" and "rfReplace" in order to show it as a completion window in the Laz IDE? I am just a Beginner, but maybe it is possible to send you a "patch".

 

TinyPortal © 2005-2018