Coder Social home page Coder Social logo

Comments (9)

pyscripter avatar pyscripter commented on June 13, 2024

The vrc file is created by the compiler. If you see the source code of
zcontrols/Demo/InspDemo.dproj it does not contain hard coded paths. However it does specify the use of AmethystKamri and the other styles which apparently are not available in your Delphi installation or at least they are not present in the location expected by the compiler. Just go to the Project options, Appearance, remove these styles and you should be OK.

from zcontrols.

mawg avatar mawg commented on June 13, 2024

Yes, I can see that the file is auto-generated. When I editted it to my path, the file was overwritten when I built. What I did was to copy those three files to the default location & everything was fine. is it worth making a small note in How To Install.txt?


A separate question.:I have long been looking for something like the Object Inspector which I can use at run-time to examine & change (some of) the properties of my own objects, which are not all VCL controls. Can I do that with this component?

from zcontrols.

pyscripter avatar pyscripter commented on June 13, 2024

The inspector can be used to inspect and change any object. The property Component is of type TObject and can be set to any Delphi object.

from zcontrols.

MahdiSafsafi avatar MahdiSafsafi commented on June 13, 2024

Hi there,

As pyscripter pointed you out, there is no hard paths from the library. Only the compiler that made such paths.
Please, select Project => Options => Appearance and then press OK. This will fix all paths.

Note: There is no need to remove styles. The demo enumerates the available styles and it doesn't force
for a particular style.

For your second question, I believe that pyscripter explained it very well :)

from zcontrols.

mawg avatar mawg commented on June 13, 2024

Can you show a very basic demo of adding a non-VCL control class and showing its properties in the inspector?

from zcontrols.

mawg avatar mawg commented on June 13, 2024

I tried
TMyClass = Class(TObject)
public
val :Integer;
motto : String;
End;
myObject : TMyClass;

and

procedure TMain.FormCreate(Sender: TObject);
begin
GetObjsList;
EnumStyles;

myObject := TMyClass.Create();
myObject.val := 13;
myObject.motto := 'Hello, world';

zObjectInspector1.Component := TComponent(myObject);
end;

but my object was not shown in the object inspector :-(

from zcontrols.

MahdiSafsafi avatar MahdiSafsafi commented on June 13, 2024

That's because var is not a published property. Inspector works with properties and not variables/constants.

from zcontrols.

mawg avatar mawg commented on June 13, 2024

You are correct !!! I changed it to

TMyClass = Class(TObject)
private
myValue : Integer;
myMotto : String;

 Published
    property  val :Integer read myValue write myValue;
    property  motto : String read myMotto write myMotto;

End;

and now those properties of my object show in the Object Inspector !

Wow! I have been looking for something like this for over ten years; thank you so much !

from zcontrols.

pyscripter avatar pyscripter commented on June 13, 2024

Please close the issue.

from zcontrols.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.