• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Macros in WO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Macros in WO


  • Subject: Macros in WO
  • From: Hugi Þórðarson <email@hidden>
  • Date: Thu, 8 May 2008 17:48:36 +0000

Where to begin....

If anyone here has used Confluence, you'll be familiar with its content macros. I love them, and I've been working on integrating them in my WO projects. I'm interested in knowing if someone has actually implemented something like these macros in WO, because I'm having second thoughts about my implementation. I won't bother you with details (trust me, I will later), so I'll start with the basics. The syntax for a macro in my implementation looks like this:

{namespace:macroname argument="pair" argument="pair"}

Example, if I want to fetch content from a website and embed it, the macro call might look like this:

{km:fetchdata url="http://karlmenn.is/"; encoding="UTF-8" timeout="10"}

The macro is processed in dispatchRequest() and I have, probably, something like a hundred lines of code to do the processing; parsing the response content and replacing the macros I find with their processed results.

But. What I keep thinking is: "Hugi, you're doing this the wrong way. A Macro is nothing but a component, arguments are just bindings - and you're reinventing WO-inline syntax in a bad way".

So, if you made it this far - then finally, here's the question:
Anyone try to implement macros? And - if not, perhaps you harbor some ideas of using WO's awesome power instead of writing this all over again? Sounds simple, but I can't find any exposed API to do it simply...


Cheers,
- Hugi

// Hugi Thordarson
// http://hugi.karlmenn.is/

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Macros in WO
      • From: "Matthew W. Taylor" <email@hidden>
    • Re: Macros in WO
      • From: Mike Schrag <email@hidden>
  • Prev by Date: Re: Inheritance...
  • Next by Date: Re: Macros in WO
  • Previous by thread: JBoss and WebObject
  • Next by thread: Re: Macros in WO
  • Index(es):
    • Date
    • Thread