﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Creating Base Classes</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Sat, 23 May 2026 05:43:32 GMT</lastBuildDate><ttl>20</ttl><item><title>Creating Base Classes</title><link>http://forum.strataframe.net/FindPost25139.aspx</link><description>I want to SubClass all the relevant SF classes and am looking for guidance/ best practise. Also if there are any utilities for dong this&lt;P&gt;At this stage I dont want to build in any additional functionality but will want to do so in the future the following. Is it sufficient to do the following for each of the classes:&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;[codesnippet]public class MyBaseBo : MicroFour.StartaFrame.BusinessLayer&lt;BR&gt;{&lt;BR&gt;}[/codesnippet]&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;[codesnippet]public class MyBaseTextBox : MicroFour.StrataFrame.UI.Windows.Forms.Textbox&lt;BR&gt;{&lt;BR&gt;}[/codesnippet]&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;or do I need to refer to Methods inside each class&lt;/P&gt;&lt;P&gt;(e.g. In VFP terms, do I need to put in a DoDeafult() for each method</description><pubDate>Mon, 09 Nov 2009 10:48:27 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Creating Base Classes</title><link>http://forum.strataframe.net/FindPost25149.aspx</link><description>Hi Greg. Thanks again for your reply.&lt;/P&gt;&lt;P&gt;Inmitially then it would appear to be quite straightforward.....just sub class ALL the Staratframe Controls with a {}</description><pubDate>Mon, 09 Nov 2009 10:48:27 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Creating Base Classes</title><link>http://forum.strataframe.net/FindPost25143.aspx</link><description>This is enough. Then if you want to add an additional property or method, you just add it to your class. You will be able to reference any property of the base class via the normal "this" reference. If you override methods or properties, you'd then use "base" to reference the base class. E.g.&lt;br&gt;
&lt;br&gt;
[codesnippet]public override string ToString()&lt;br&gt;
{&lt;br&gt;
&amp;nbsp;&amp;nbsp;//-- Establish a return var&lt;br&gt;
&amp;nbsp;&amp;nbsp;string text;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;//-- Get value returned by base class&lt;br&gt;
&amp;nbsp;&amp;nbsp;text = base.ToString();&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;//-- Based on existing value of some other property, append some other text&lt;br&gt;
&amp;nbsp;&amp;nbsp;if (this.BindingField != null)&lt;br&gt;
&amp;nbsp;&amp;nbsp;{&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;text += ": bound";&lt;br&gt;
&amp;nbsp;&amp;nbsp;}&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;return text;&lt;br&gt;
}[/codesnippet]&lt;br&gt;
&lt;br&gt;
When I first started realizing how easy this was, it [i]almost[/i] felt like cheating...just too easy :D</description><pubDate>Mon, 09 Nov 2009 09:51:27 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>