Jump to content


Photo

Property Editor for TUniClientEvents

ClientEvents Property Editor

  • Please log in to reply
11 replies to this topic

#1 Daryl McMurray

Daryl McMurray

    Member

  • uniGUI Subscriber
  • PipPip
  • 29 posts
  • LocationOntario, Canada

Posted 26 February 2018 - 04:32 AM

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.

 

Attached File  Editor.jpg   106.92KB   12 downloadsAttached File  RCM.jpg   52.51KB   9 downloads

 

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

 

Attached File  UniClientEventsPropEditor.zip   70.71KB   22 downloads


  • 6

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 5177 posts

Posted 26 February 2018 - 06:28 AM

Very good job, thanks for sharing!


  • 0

#3 Marlon

Marlon

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 371 posts
  • LocationNova Mutum - MT - Brasil

Posted 26 February 2018 - 06:14 PM

Excellent, it follows one more facilitator for installation of the same

Attached Files


  • 2

#4 Daryl McMurray

Daryl McMurray

    Member

  • uniGUI Subscriber
  • PipPip
  • 29 posts
  • LocationOntario, Canada

Posted 26 February 2018 - 06:33 PM

Thank you Marlon, That will make it much easier for people to install and use :)


  • 0

#5 wilton_rad

wilton_rad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 126 posts

Posted 27 February 2018 - 10:57 AM

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.


  • 0

#6 Georges Soares

Georges Soares

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 104 posts
  • LocationCuiabá-MT

Posted 27 February 2018 - 02:26 PM

Very good 


  • 0

#7 mika

mika

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 28 February 2018 - 07:49 AM

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?


  • 0

#8 Daryl McMurray

Daryl McMurray

    Member

  • uniGUI Subscriber
  • PipPip
  • 29 posts
  • LocationOntario, Canada

Posted 01 March 2018 - 04:38 AM

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.  


  • 0

#9 mika

mika

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 01 March 2018 - 06:09 AM

Thank you very much Daryl! :)


  • 0

#10 Daryl McMurray

Daryl McMurray

    Member

  • uniGUI Subscriber
  • PipPip
  • 29 posts
  • LocationOntario, Canada

Posted 01 March 2018 - 03:09 PM

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 -> Attached File  UniClientEventsPropEditor.zip   70.71KB   22 downloads

 

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


  • 0

#11 mika

mika

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 136 posts

Posted 02 March 2018 - 06:14 AM

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


  • 0

#12 Daryl McMurray

Daryl McMurray

    Member

  • uniGUI Subscriber
  • PipPip
  • 29 posts
  • LocationOntario, Canada

Posted 02 March 2018 - 01:56 PM

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.  


  • 0





Also tagged with one or more of these keywords: ClientEvents, Property Editor

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users