{"id":1112,"date":"2012-02-11T16:36:34","date_gmt":"2012-02-11T21:36:34","guid":{"rendered":"http:\/\/anvil-of-time.com\/wordpress\/?p=1112"},"modified":"2021-03-11T11:03:31","modified_gmt":"2021-03-11T16:03:31","slug":"100-days-of-powerbuilder-day-1-creating-a-workspace","status":"publish","type":"post","link":"https:\/\/anvil-of-time.com\/powerbuilder\/100-days-of-powerbuilder\/100-days-of-powerbuilder-day-1-creating-a-workspace\/","title":{"rendered":"100 Days of PowerBuilder &#8211; Day 1: Creating a Workspace"},"content":{"rendered":"<p>This is part of my project &#8216;100 Days of PowerBuilder&#8217; which is a series of discussions focused on basic PowerBuilder development.<\/p>\n<p><em>Note: This article is written with examples created in PowerBuilder version 12.5. The same steps would be almost identical with any version going back to 9.<\/em><\/p>\n<p>When you first install Powerbuilder Classic and the tool is launched, you are presented with a &#8216;Welcome to PowerBuilder&#8217; dialog window asking you to tell the application what you want to do.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/welcome.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1114 size-full\" title=\"welcome\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/welcome.png\" alt=\"\" width=\"645\" height=\"531\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/welcome.png 645w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/welcome-300x246.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/welcome-150x123.png 150w\" sizes=\"(max-width: 645px) 100vw, 645px\" \/><\/a><\/p>\n<p>Initially the infomation presented won&#8217;t mean much to a beginning PB user but what PowerBuilder calls a &#8216;workspace&#8217; roughly corresponds to a &#8216;Project&#8217; in the Visual Studio \/ .Net world. Within a workspace is a target which you can think of as an application or object \/ component collection. You may have many targets inside a workspace but generally there is a one to one relationship between them.<\/p>\n<p>For this exercise lets just start things off fresh and pick the Create new workspace and target selection.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/workspace.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1113 size-full\" title=\"workspace\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/workspace.png\" alt=\"\" width=\"439\" height=\"270\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/workspace.png 439w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/workspace-300x184.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/workspace-150x92.png 150w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><\/a><\/p>\n<p>Here is a standard Windows File create type dialog allowing you to choose where the workspace file will be created. As you can see the file is created with the extension &#8216;.PBW&#8217;. Once you create this the target creation response window appears.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/target.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1115 size-full\" title=\"target\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/target.png\" alt=\"\" width=\"541\" height=\"410\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/target.png 541w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/target-300x227.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/target-150x113.png 150w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/a><\/p>\n<p>For our purposes we are creating a new application so highlight the appropriate icon and click &#8216;OK&#8217;. You now are presented with a window to create the Application, Library file, and Target file. Notice my initial choice for an Application Name &#8211; &#8216;first&#8217; &#8211; and the error message on the lower left. Apparently you cannot create an app called &#8216;first&#8217; so I changed it to &#8216;firstapp&#8217;.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/application.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1116 size-full\" title=\"application\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application.png\" alt=\"\" width=\"519\" height=\"357\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application.png 519w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application-300x206.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application-150x103.png 150w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/application1.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1117 size-full\" title=\"application1\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application1.png\" alt=\"\" width=\"515\" height=\"355\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application1.png 515w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application1-300x206.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/application1-150x103.png 150w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/a><\/p>\n<p>The default is to create the target and application files in the same location but this can be changed is desired. I recommend using the same location for the target and application files to keep things simple and easy to keep track of.<\/p>\n<p>After this process is complete you have the shell of the application completed. There are now three main files created by PB &#8211; the workspace (.PBW), the target (.PBT), and the application library (.PBL). The first two are text files and can be viewed by any editor. The PBL or &#8216;pibble&#8217; file is binary and makes up the core of your PB application. PBL (PowerBuilder Library) files contain all of the objects and code making up an application while in the PB Integrated Development Envionment.<\/p>\n<p>After creating the application you can view the newly created files and objects in the System Tree (Window &#8211; System Tree menu option). At the base is the workspace with all associated targets underneath (we only have one). Opening the firstapp target displays all the libraries (pibbles) &#8211; at this time we only have the initial one created by the wizard. Opening the firstapp.pbl on the treeview shows the objects contained within it &#8211; initially there is only the application object (firstapp in our example).<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/systemtree.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1118 size-full\" title=\"systemtree\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/systemtree.png\" alt=\"\" width=\"310\" height=\"193\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/systemtree.png 310w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/systemtree-300x186.png 300w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/systemtree-150x93.png 150w\" sizes=\"(max-width: 310px) 100vw, 310px\" \/><\/a><\/p>\n<p>At this time you can set some of the initial defaults used when coding the application. If you rightclick on the application object you get a menu with various options &#8211; choose Properties.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/appproperties.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1119 size-full\" title=\"appproperties\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/appproperties.png\" alt=\"\" width=\"254\" height=\"324\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/appproperties.png 254w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/appproperties-235x300.png 235w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/appproperties-117x150.png 117w\" sizes=\"(max-width: 254px) 100vw, 254px\" \/><\/a><\/p>\n<p>Now select &#8216;Additional Properties&#8217;.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/addlproperties.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1120 size-full\" title=\"addlproperties\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/addlproperties.png\" alt=\"\" width=\"295\" height=\"326\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/addlproperties.png 295w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/addlproperties-271x300.png 271w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/addlproperties-135x150.png 135w\" sizes=\"(max-width: 295px) 100vw, 295px\" \/><\/a><\/p>\n<p>Within the Application Properties dialog you can set the default font to be used as you create and code objects within the application. These are set on the Text, Column, Header, and Label Font tabs. The Icon tab is where you set the icon to be used when the application runs (in the upper left corner of windows). The Variable Types are used to set user defined global variables which will be discussed at a later time.<\/p>\n<p><a href=\"http:\/\/anvil-of-time.com\/wordpress\/wp-content\/uploads\/2012\/02\/app_props.png\"><img loading=\"lazy\" class=\"aligncenter wp-image-1121 size-full\" title=\"app_props\" src=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/app_props.png\" alt=\"\" width=\"371\" height=\"450\" srcset=\"https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/app_props.png 371w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/app_props-247x300.png 247w, https:\/\/anvil-of-time.com\/wp-content\/uploads\/2012\/02\/app_props-123x150.png 123w\" sizes=\"(max-width: 371px) 100vw, 371px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of my project &#8216;100 Days of PowerBuilder&#8217; which is a series of discussions focused on basic PowerBuilder development. Note: This article is written with examples created in PowerBuilder version 12.5. The same steps would be almost identical with any version going back to 9. When you first install Powerbuilder Classic and the&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[86],"tags":[12,62],"_links":{"self":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1112"}],"collection":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/comments?post=1112"}],"version-history":[{"count":8,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1112\/revisions"}],"predecessor-version":[{"id":2078,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/posts\/1112\/revisions\/2078"}],"wp:attachment":[{"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/media?parent=1112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/categories?post=1112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anvil-of-time.com\/wp-json\/wp\/v2\/tags?post=1112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}