Forum > Designer

Event value disappeared in the object inspector

<< < (2/3) > >>

alpine:

--- Quote from: Josh on February 14, 2024, 06:11:44 pm ---have you tried uninstalling/removing your component from the ide, making sure you rebuild and restart the ide to complete the removal.
Then re-install the component and rebuild and restart the ide.

--- End quote ---
I haven't tried exactly that, but since I'm modifying an existing and installed package, I'm constantly doing a "Build Lazarus with Profile:" on each change. When I experienced troubles, I have installed the package on my Winbox Lazarus (currently I'm on Linux) and there the behavior was the same. Then I've made a small, isolated package - the one attached - and tried it on both Win/Linux installations - again - the same.

About the {M+} - it is not the only property in the original component, I believe that without RTTI no property will be shown at all in the inspector, and all the components are TPersistent descendants - docs says the {M+} is implied.

Thaddy:
You HAVE to rebuild the Lazarus IDE. There is no option yet to get around that. There will be in the future.

wp:
In TAChart there's this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TChart.SetOnAfterCustomDrawBackground(AValue: TChartAfterCustomDrawEvent);begin  if TMethod(FOnAfterCustomDrawBackground) = TMethod(AValue) then exit;  ...end;
When I apply this (and implement the TMethod compare operator) your component works:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---operator = (const A, B: TMethod): Boolean;begin  Result := (A.Code = B.Code) and (A.Data = B.Data);end; procedure TShape1.SetOnWhatever(AValue: TNotifyEvent);begin  if TMethod(FOnWhatever) = TMethod(AValue) then exit;  FOnWhatever:=AValue;end; 

n7800:
I just wanted to give a link:
https://wiki.freepascal.org/IDE_tricks#Events_.28Method_properties.29_in_the_Object_Inspector

alpine:

--- Quote from: n7800 on February 14, 2024, 07:45:14 pm ---I just wanted to give a link:
https://wiki.freepascal.org/IDE_tricks#Events_.28Method_properties.29_in_the_Object_Inspector

--- End quote ---
Thanks, that makes the things clear. I didn't know it.

@wp
No matter how confident I can feel, there is always something more that can be learned. It's not an important one but it is of those that can ruin your whole afternoon.
Thanks a lot, pal.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version