Help with Oscript inheritance when writing RKTEngine Subtags
Hi,
I'm pulling my hair out over this. Development env is the CS 21.1 with the latest version of the SDK. I'm trying to write WebReport subtags as Oscript to avoid having to add a complicated file transfer in my module. This should be the right way to do sub-tags based on what I've read elsewhere. I can write the tag objects no problem, but my issue has to do with inheritance. I have a series of utility functions I want to make available to my subtags. In normal oscript, you would write an object like so:
public Object MasterSubTag inherits RKTENGINE::AllTags::#'Sub-Tags'#
public function Frame GetCategoryFrame()
// My code here
return myFrame
end
end
I then write my sub tag as
public Object MySubTag inherits MasterSubTag
override function Object Execute(List args={})
Frame myFrame = .GetCategoryFrame()
end
end
Code when run ALWAYS crashes on the .GetCategoryFrame() call above. What am I missing here????
-Hugh
Comments
-
The actual tag object isn't the execution context at runtime. If you check the __Init function for the tag it copies the Execute script to the TagProcessor object on startup using the tag name and the engine runs it as TagProcessor.TagName().
You can use all the utils on the TagProcessor object directly from your Execute. Check out all the dataAs... utils. There is already a .dataAsCategoryFrame. Not sure if that does what you need or not. If not you will probably have to create a separate utils object in your ospace and call that from the tag. The dataAs... utils will often be optimized with caching so it's advisable to use these if there is one that does what you need.
0 -
Thanks for the information!
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 151 General Questions
- 146 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 179 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 9 XM Fax
- Follow Categories