Recent

Author Topic: (SOLVED): Creating a new package  (Read 2467 times)

JZS

  • Full Member
  • ***
  • Posts: 194
(SOLVED): Creating a new package
« on: December 08, 2014, 11:27:37 am »
Hi All,
I have tried creating a new package with my own PropertyEditor (followed the wiki page), but I can not get it to call the newly created FormEditor, although everything seems right (well, to my own eyes  :)) but all I get is empty DropDownList with "(none)".
What am expecting is to show "[...]", when clicked, it shows my form (I could be wrong).

Pretty simple but I can not figure it out  >:(

If anyone who is willing to go through that simple code, attached, and would be kind enough to tell what am I doing wrong there, it will be appreciated.

All I need to do is to have a property on the OI shows my own property editor (simple form that access some properties), similar to the TFont Editor.

Thanks

PS: this package is simplified of my package.
« Last Edit: December 09, 2014, 07:31:00 am by JZS »
I use recent stable release

JZS

  • Full Member
  • ***
  • Posts: 194
Re: Creating a new package
« Reply #1 on: December 09, 2014, 02:22:15 am »
Did I post in the wrong topic area?
I use recent stable release

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Creating a new package
« Reply #2 on: December 09, 2014, 03:57:19 am »
A quick guess based on this line:
Code: [Select]
  RegisterPropertyEditor(TypeInfo(TListEditor), TMyPropEdit, 'List', TMyPropertyEditor);

You restricted the property editor to a property named 'List'. TMyPropEdit does not have one with that name. Try to remove all restrictions:
Code: [Select]
  RegisterPropertyEditor(TypeInfo(TListEditor), nil, '', TMyPropertyEditor);
or correct the name to 'FrmEditor'

JZS

  • Full Member
  • ***
  • Posts: 194
<Solved> Creating a new package
« Reply #3 on: December 09, 2014, 07:30:17 am »
Many Thanks engkin that was it.
I use recent stable release

 

TinyPortal © 2005-2018