How to use REALproperty

  1. 2 years ago

    Aaron H

    10 Jan 2018 Pre-Release Testers Europe (Germany)

    Question on behalf of a friend who makes plugins: Can anyone supply a bit of source code showing how to assign a REALproperty so that plugin properties will be shown in the IDE during debugging? Or point me to a reference on this topic? Thanks!

  2. Christian S

    10 Jan 2018 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    Your friend looked into examples and documentation provided by Xojo?

  3. Christian S

    10 Jan 2018 Pre-Release Testers, Xojo Pro, XDC Speakers, Third Party Store Germany

    From one of the examples:

    REALproperty TestClassProperties[] = {
    	{ "", "CatName", "String", REALconsoleSafe, REALstandardGetter, REALstandardSetter, FieldOffset( TestClassData, mCatName ) },
    	{ "", "HumanName", "String", REALconsoleSafe, (REALproc)HumanNameGetter, nil },
    	{ "", "MooseName", "String", REALconsoleSafe, (REALproc)MooseNameGetter, (REALproc)MooseNameSetter },
    	{ "", "MooseWeight", "UInt32", REALconsoleSafe, REALstandardGetter, nil, FieldOffset( TestClassData, mMooseWeight ) },
    };

    first property is a normal data property in the class data structure. By using REALstandardGetter/REALstandardSetter, you can leverage Xojo's default getter/setter. The value still needs to be freed in destructor.

    The next two properties use custom getters and setters.

  4. Aaron H

    10 Jan 2018 Pre-Release Testers Europe (Germany)

    Thank you, I'll see if that helps.

or Sign Up to reply!