General XMetaL Discussion
jrob61 October 22, 2012 at 3:36 pm
macro On_Click and nodelist indexOctober 22, 2012 at 3:36 pmParticipants 0Replies 1Last Activity 9 years, 11 months ago
trying to speed up the process of editing, Open, and save for large documents and have been experimenting using a Strucuted_View and .css 'display:none' approach by limiting what is shown in the activedocument window to the currently clicked item in the structured_view.
(1) One hurdle to overcome – is there anyway to know whether or not the user clicked in the structured_view vs the activedocument window (we are tripping over On_Click events in the activedocument window unnecessarily running the macro script to populate the activedocument window again.
(2) having some difficulty grasping how XMetal 5.5 (or 7) Essential knows which nodelist to position the cursor for its On_Click event? We can duplicate it by looping thru all the nodes but this takes extra time. curious if there is a nodelist index number that the macros have access to without looping?
basically, if we know the exact nodelist index#, we can sets its 'ContainerStyle=”display:none;” which appears to work faster than the time it takes to refresh the entire document using ActiveDocument.RefreshCssStyle()jrob61 November 19, 2012 at 9:26 pm
Reply to: macro On_Click and nodelist indexNovember 19, 2012 at 9:26 pm
a) in .css set 'display:none' for all tags
b) On_Document_Open_Complete set first child's .css to 'dipslay:block'
c) use .xft's TheView_OnInitialize to load activedocument tags into comboBox
5) use comboBox's OnChange to display desired tag contents and toggle between 'display:block' and 'display”none'
- You must be logged in to reply to this topic.