Skip to main content
Participant
May 6, 2008
Question

Balancing Braces via the DW API

  • May 6, 2008
  • 1 reply
  • 249 views
I'm attempting to create my first extension, but I'm running into a bit of trouble. I would like to balance braces from the current selection and then collapse the selected code. Everything's working except for the balance braces part.

When I try to run the dom.source.balanceBracesTextview() function per the API documentation, I get the following error:

"dom.source.balanceBracesTextview() is not a function."

I've attached the function that attempts to do this functionality.

Any help would be most appreciated.

Cheers,
Steve
This topic has been closed for replies.

1 reply

Inspiring
May 9, 2008
Hi Steve,

> When I try to run the dom.source.balanceBracesTextview() function per the API
> documentation, I get the following error:
>
> "dom.source.balanceBracesTextview() is not a function."

There seems to be a typo in the documentation. Try
balanceBracesTextView() (with a capital V). If you search the DW
Configuration folder, you'll find a few examples.

Also, this exchange is more for DW Server Model and Database stuff.
You'll probably get a better response for extensibility questions in the
macromedia.exchange.extensions.dreamweaver forum.

Randy