Got it. Thanks.
Two things that may, or may not, be related...
1 - Units not included to support all IDEObjectInspect events
It appears when you choose to use the following events in the IDEObjectInspector
IDEInspectorCompare
IDEInspectorFillEventList
IDEInspectorFilter
IDEInspectorGetEditorClass
The following units must be added to your uses clause:
PropertyList, PropertyInspEditors, TypInfo
I'm not sure if that is intentional or should be added when the component drops. Thought to mention.
2 - Unclear on how to use the custom dropdown option in the inspector
We have set a property in the ObjectInspector to reference an instance of a TGrpButtonItem control.
We've converted the property to use a Dropdown and override the list to populate it with a list of all TGrpButtonItems found in the application (By name)
When selecting the item from the combo dropdown we are seeing an error
"raised excveption class EConvertError with message "Port1A" is not a valid integer value"
The execution order leading to the issue...
Our inspector event... (currently contains an entry to just log that it fired and give us a breakpoint to trace)
procedure TForm1.IDEInspector2SetValue(Sender: TObject; TheIndex: Integer;
var Value: string; var EnableDefault: Boolean);
begin
ListBox1.Items.Add('SettingValue');
end;
The above fires then passes up to :
procedure TAdvCustomComponentInspector.SetValue(TheIndex: Integer; const Value: string);
var
i: Integer;
P: TProperty;
Val,Name: string;
EnableDefault: Boolean;
begin
with FPropertyList do
begin
EnableDefault:=True;
Val:=Value;
if Assigned(OnSetValue) then
OnSetValue(Self,TheIndex,Val,EnableDefault);
if EnableDefault and ValidPropIndex(TheIndex) then
begin
Val:=Translate(Val,False);
Name:=Properties[TheIndex].FullName;
for i:=0 to Pred(PropertyListCount) do
begin
P:=PropertyLists.FindProperty(Name);
if Assigned(P) then
SetPropertyValue(P, Val);
end;
end;
Change(TheIndex);
end;
end;
It appears this may be looking for a pointer reference to the object represented by my string.
My thinking is to do a FindComponent(Value) then assign a pointer... that said, this is within a function that is expecting a string... so then that doesn't seem correct either;
I'm not sure if adding those uses (since I am referencing properties, etc) led to this or not, so I'm a little confused.