{"id":527,"date":"2019-12-29T19:35:09","date_gmt":"2019-12-30T02:35:09","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=527"},"modified":"2019-12-30T10:40:57","modified_gmt":"2019-12-30T17:40:57","slug":"classes-instances-and-objects","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2019\/12\/29\/classes-instances-and-objects\/","title":{"rendered":"Classes, Instances and Objects"},"content":{"rendered":"\n<p>There&#8217;s a fun &#8220;theoretical question&#8221; on the forums.<\/p>\n\n\n\n<p><em>What is the relationship between a class, object, and instance?<\/em><\/p>\n\n\n\n<p>Lets see if I can help any (or maybe just confuse the heck out of folks even more)<\/p>\n\n\n\n<p>In Xojo in the IDE when you define a CLASS you are creating a &#8220;template&#8221; for how every item of this type will behave. You&#8217;re defining the properties, the methods, events etc etc etc. And EVERY item that IsA &lt;this type I defined> returns true for IsA one of these.<\/p>\n\n\n\n<p>AT runtime when you application runs and it uses the NEW operator to create a new item of this type you are creating new INSTANCES. Instances are the ACTUAL copies you create that you can manipulate at runtime.<\/p>\n\n\n\n<p>And EVERY instance in Xojo IsA Object. Its the base object for EVERY dynamically created type where you use NEW to create one. <\/p>\n\n\n\n<p>So CLASSES are a design time thing.<\/p>\n\n\n\n<p>INSTANCES and OBJECTS are runtime things.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s a fun &#8220;theoretical question&#8221; on the forums. What is the relationship between a class, object, and instance? Lets see if I can help any (or maybe just confuse the heck out of folks even more) In Xojo in the IDE when you define a CLASS you are creating a &#8220;template&#8221; for how every item &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2019\/12\/29\/classes-instances-and-objects\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Classes, Instances and Objects&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-527","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/527","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=527"}],"version-history":[{"count":3,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/527\/revisions"}],"predecessor-version":[{"id":533,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/527\/revisions\/533"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=527"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}