Jump to content

Edwin Yip

Members
  • Content Count

    351
  • Joined

  • Last visited

Community Reputation

126 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Edwin Yip

    Where is Ctrl-F3 coming from?

    Try this magical Delphi Expert: https://github.com/NickRing/Delphi-Shortcut-Finder It's as amazing as a magic! I'm using an older version for my old XE4.
  2. Alternatively, Maybe raise a request to the CNWizards team for their InputHelper module might get such feature implemented faster ;)
  3. Edwin Yip

    Report Builder + HTML Library + Office Library.

    Wonderful! FWIW, please consider QuickJs ;)
  4. Edwin Yip

    Report Builder + HTML Library + Office Library.

    Hi Alexander, Another question, do you have a plan to provide JavaScript support in the future for HCL in the future? I'm not asking for any concrete time-frame but just if a plan is there ;)
  5. Edwin Yip

    Report Builder + HTML Library + Office Library.

    Great! Pity. Can't the editor provide events like `OnBeforeDeleteElement`, `OnBeforeEditElement`, and so on?
  6. Edwin Yip

    Report Builder + HTML Library + Office Library.

    Hi Alexander, Good job! May I take this chance to ask, can you control which elements can/cannot be modified in HCL editor? For examples: Allows some <p> texts to be editable while some cannot be edited. Disable deleting of <p> tags while allowing editing the texts. And so on...
  7. As you said, "I do understand however that you may have non technical users from which you may want to hide this detail.", and that's what I wanted, just like DMustache allows you to use methods (non-class methods) to define custom functions. Anyways, I understand that's the current status of the template engine, I can live with that.
  8. Oh, that make the template code complex, especially if you need third parties to write the template... And actually I'm asking something else - What I mean is how to access relevant data in Delphi utility functions, like TMyUtilities.DoSomething in the document example...
  9. @darnocian, according to the documents, since custom function for the template must be defined as static class methods, how do I access contextual data in those utility methods? I can see you can use `class var` to pass contextual data to the utility class before calling `Template.Eval`, but in case of multi-threaded template rendering, it seems that locking is unnecessarily needed. But at least it's workable? I'll try but you might have a better answer? Thanks. It'll be great if ITemplateFunctions.AddFunctions supports non-class methods, so that in the methods the object's fields are accessible.
  10. Oh, I think you misunderstood - what I mean is that you can customize the html code generated by `RenderMenu` by allowing the passing to it the `<li>` tags to use, for example, use `<li class="levelItem">`
  11. After more thoughts I realized that you can customize the starting/closing tags through function parameters, so that to be more practical.
  12. As I understand it, I think you are actually demonstrating option 1? However, it's not suitable for me since I need the logic to be represented in the template code. But thanks all the same. The nested for loops does the work - all after all, the menu always have a limited nesting level, on contrary to my original statement...
  13. Thanks, no hurry, because I've solved the issue with nested for loops in the template code. The recursion must be represented in the template code in order to be helpful in my case.
  14. @Dany Marmur, Thanks for sharing. Without sample code actually I'm not sure what does "use a stack in the template" as described by @darnocian actually mean. I use nested `for` loops to access the tree structure passed to the template engine.
  15. Thanks for the help. I'm trying to use option 2, by passing multi-level nested objects that represents the menu structure and in the template code use nested `for` loops to generate the `ul/li` items.
×