Assuming the class type has been registered either through RegisterComponent or RegisterNoIcon, what is the most straight forward way to get the package name it is defined in given a class type?
Mailing lists / fpc-pascal / 2017-07
Class type to package name?
5 messages · 3 people · –
- AAnthony Walter 2
- MMichael Van Canneyt 2
- MMattias Gaertner 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Anthony Walter wroteAssuming the class type has been registered either through RegisterComponent or RegisterNoIcon, what is the most straight forward way to get the package name it is defined in given a class type?
Define package ?
Michael.
When I register a component with the IDE it is installed from a package. The package has a name. I want to know the name of the package, given a class type of a component registered in the IDE.
See this issue:
https://bugs.freepascal.org/view.php?id=32182
procedure RegisterForm(const Package: string; FormClass: TCustomFormClass;
const Category, Caption, Description, Units: string);I would like to simplify this further by omitting the Package string if it could be computed from the FormClass parameter.
See also:
Anthony Walter wrote 13 lines
So you mean a lazarus package.
In that case, you had better ask this on the lazarus mailing list ?
By sending the mail here, I was not sure whether you meant (future) dynamic package support or current Lazarus package support.
Michael.
When I register a component with the IDE it is installed from a package. The package has…
When I register a component with the IDE it is installed from a package. The package has a name. I want to know the name of the package, given a class type of a component registered in the IDE.
You have to search the packages.
I added a utility function to make it more comfortable:
uses packageintf;PackageEditingInterface.FindInstalledPackageWithUnit()
Mattias
