Jump to content


Photo

Client Events Editor - Help please


  • Please log in to reply
4 replies to this topic

#1 Daryl McMurray

Daryl McMurray

    Member

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

Posted 10 February 2018 - 04:09 PM

I am trying to find out how to access the list of possible ClientEvents javascript events for a given UniGui Control.  How does the ClientEvents property editor know what they are?

 

I am building a more functional Property editor for ClientEvents - I find I spend a lot of time searching through js events that I don't care about to get to the ones I've already initiated and just want to tweak.

 

I've created an editor that adds to the context menu (right Click Menu) in the IDE and lists all the existing js events (Ext and Uni) and then can take you directly to that event for editing.  Once the editor is up, you can also quickly get to all other existing events for both Ext and Uni - 

 

I have also made this editor non modal so that you can have several open at a time and switch between them and the form editor and code.  (I also spend a lot of time opening the ClientEvents editor, finding an event, copying some code, closing it then going to another component, opening its ClientEvents editor, finding an event and pasting code.)  This now lets me copy and paste js code bits easily from one component to any other.  I have also added an "Apply" changes function so that I can save the change back to the component and run/test the project without having to close the editor.

 

The only thing stopping me from replacing the default ClientEvents property editor is that I can not figure out how to get the list of all possible events for a given component class.  So, I can edit existing ones that were created with the default editor, but I can't properly Add New ones...   I've searched through all the source code that came with my purchased version, but I have either missed where the possible js event names come from, or it isn't included.

 

For now, I just have a button that launches the default editor for me so I can add an event and then return to my simplified editor.  

 

Any thoughts?  I'd be happy to post and share my finished editor here - it is all contained in a single form file and easy to install.

 

I've included some images to show how it works/looks.

 

Attached File  Editor.jpg   60.95KB   4 downloadsAttached File  RCM.jpg   80.25KB   4 downloads


  • 0

#2 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 10 February 2018 - 07:14 PM

Dayrl, I am interested in what you are doing.

 

Are you happy to share your code ?

 

Andy - Australia


  • 0

Andy


#3 Daryl McMurray

Daryl McMurray

    Member

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

Posted 11 February 2018 - 09:08 PM

Hi Andy - Yes, I will share my code for the editor once I have tested it a bit more under fire.  I will post it to the "Components and Code Samples" form and notify here that I have done so.

 

I would really like to be able to use it to add Client Events too though... does anyone know where the component ClientEvents possibilities list comes from?  I'm hoping they are not just stored in the ClientEvents Property editor.


  • 0

#4 Daryl McMurray

Daryl McMurray

    Member

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

Posted 12 February 2018 - 04:09 AM

I believe I have found them! It's going to take some time to code though... I have to access the JSObjects array of a given component (which is protected)... and then locate the correct Resource String in the ExtJS.RES file, parse that out for the events, and then construct a JSfunction prototype...   Here goes :)


  • 0

#5 Daryl McMurray

Daryl McMurray

    Member

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

Posted 26 February 2018 - 04:34 AM

I have finished and uploaded the new editor:

 

http://forums.unigui...niclientevents/


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users