# Two new embed points for FrameExtension template/class

**URL:** <https://clarionhub.com/t/two-new-embed-points-for-frameextension-template-class/8518>\
**Category:** code\
**Tags:** templates\
**Created:** [August 24, 2025, 10:51am UTC](https://clarionhub.com/t/two-new-embed-points-for-frameextension-template-class/8518 "2025-08-24T10:51:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [August 24, 2025, 10:51am UTC](https://clarionhub.com/t/two-new-embed-points-for-frameextension-template-class/8518/1 "2025-08-24T10:51:24Z")

</div>

To gain more control over the FrameExtension template/class, I've added two new embed points which lets you wrap code around the FrameExtension call, which can help with short cutting the class.

In ABWindow.TPW search for  
`#AT(%WindowManagerMethodCodeSection,'TakeEvent','(),BYTE'),PRIORITY(2500),DESCRIPTION('Top of CYCLE/BREAK support')`

and then add

```auto
#PRIORITY(3200),DESCRIPTION('Before Frame Extension TakeEvent')

```

and

```auto
#PRIORITY(4800),DESCRIPTION('After Frame Extension TakeEvent')

```

so you end up with...

```auto
#AT(%WindowManagerMethodCodeSection,'TakeEvent','(),BYTE'),PRIORITY(2500),DESCRIPTION('Top of CYCLE/BREAK support')
#?LOOP #<! This method receives all events
  #?IF Looped
    #?RETURN Level:Notify
  #?ELSE
    #?Looped = 1
  #?END
  #PRIORITY(3200),DESCRIPTION('Before Frame Extension TakeEvent')
  #EMBED(%AcceptLoopBeforeEventHandling,'Accept Loop, Before TakeEvent'),LEGACY
  #PRIORITY(4800),DESCRIPTION('After Frame Extension TakeEvent')
  #PRIORITY(7500),DESCRIPTION('Bottom of CYCLE/BREAK support')
  #SUSPEND
  #?IF ReturnValue THEN RETURN ReturnValue .
  #EMBED(%AcceptLoopAfterFieldHandling,'Accept Loop, After CASE FIELD() handling'),LEGACY
  #EMBED(%AcceptLoopAfterEventHandling,'Accept Loop, After TakeEvent'),LEGACY
  #RESUME
  #?RETURN ReturnValue
#?END
#?ReturnValue = Level:Fatal
#ENDAT

```

There will be an equivalent in the Clarion (CW20) template chain, which needs modifiying, but I think its good to be able to shortcut the FrameExtension class in certain situations.

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [August 24, 2025, 11:38pm UTC](https://clarionhub.com/t/two-new-embed-points-for-frameextension-template-class/8518/2 "2025-08-24T23:38:26Z")

</div>

.. or just set the priority of your embed code and not muck with the template

---

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [August 25, 2025, 7:57am UTC](https://clarionhub.com/t/two-new-embed-points-for-frameextension-template-class/8518/3 "2025-08-25T07:57:17Z")

</div>

You can’t do that, it doesnt work. I did try that, there is no embed before the FrameExtension call, only after, so it was impossible to wrap the FrameExtension call.
