Jump to content
uniGUI Discussion Forums
Sign in to follow this  
Daryl McMurray

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 6

Share this post


Link to post
Share on other sites

Master Farshad, I hope your contribution will be included as a native form in the next version of unigui, thank you very much for your invaluable contribution.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Hi Mika - it looks like there are some parts of the editor that XE5 doesn't like.  I'm working on it and will post here when I've got it corrected.  

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

This is very much appreciated. Thank you very much Daryl!  :) It was very nice of you to update this for XE5 also.

Share this post


Link to post
Share on other sites

No problem - I put it up here so that people could use it - I'm glad that people are interested.  Please let me know how it works for you, and if you find any other issues.  

Share this post


Link to post
Share on other sites
Sign in to follow this  

×