Jump to content

Property Editor for TUniClientEvents


Recommended Posts

I have created a new property editor for the UniGui TUniClientEvents property in UniGui Controls.

 

This is a single editor that can edit both the ext JS Events and the Uni JS Events for any UniGui component, form or frame.

 

 

Main features: 

  - Only displays the events for which a handler has been created - no more scrolling when you just want to modify an existing event.  

  - All extJS events can be added for all JSObjects of a given component.  Quick filter for finding possible events.

  - Non Modal - you can have multiple editors open for different UniGui components/forms/frames at the same time and Copy / Paste between them.  

  - adds existing events to the context menu (Right click) in IDE so you can instantly jump to any existing event for a given component and begin editing.

  - allows access to original editors supplied with UniGui via button or context menu.

 

History:

 

When working with UniGui, I found I was spending a lot of time searching through JS event lists to find the one or two that I was using and needed to edit or tweak. 

I also found it unproductive to have to keep closing one editor to open and work with the events of another as I was often copying JS code from multiple events of one component to another.

 

This editor is the result of my efforts to improve the productivity of this amazing framework.  

 

If any of you find this useful, please let me know.  I have been using it exclusively for a few weeks now and believe it to be bug free.  All feedback is appreciated.

 

post-5050-0-52785000-1519619226_thumb.jpgpost-5050-0-87752200-1519619240_thumb.jpg

 

Updated March 1, 2018 - Corrected issues with using in XE5 (Thank you @mika).  Included Package projects for Delphi versions (Thank you )

 

UniClientEventsPropEditor.zip

  • Upvote 7
Link to comment
Share on other sites

I can't get this to work. I use XE5 and latest uniGUI (1.0.0.1425). I get following errors:

 

Line: 17: System.ImageList // Unit does not exist

Line: 540: LocalClientEvents.ExtEvents.AddPair(EventItem.EventName,EventItem.EventPrototype); // Method AddPair does not exist

Line: 548: LocalClientEvents.UniEvents.AddPair(EventItem.EventName,EventItem.EventPrototype); // Method AddPair does not exist

 

Can anyone help with this?

Link to comment
Share on other sites

I've solved it.  :)  For interest sake... 

 

First, the System.ImageList was left over in my uses from something I had been trying and was no longer needed... I've removed it.

 

Second, the AddPair method of the Tstrings object doesn't exist in in XE5 -   so I just replaced the call with:

  LocalClientEvents.ExtEvents.Add(EventItem.EventName + '=' + EventItem.EventPrototype); 

 

And lastly, if you had gotten past that, you would still had an error because I've learned that in XE5, you can not use a #0 as a quotechar in a Tstrings for delimitedtext.  :)  

 

You can find the new version here -> UniClientEventsPropEditor.zip

 

I have also updated the original post to contain the corrected code.  Thank you Mika for your feedback.

Link to comment
Share on other sites

  • 9 months later...
  • 5 months later...
  • 1 year later...

Haven't been back here for a while... Was looking at getting back into UniGui with all the amazing updates - Wondering if anyone is actually still using my UniClientEvents Property edtior - should I continue to post updates/changes?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • 7 months later...
  • 1 year later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...