tag:blogger.com,1999:blog-192984832024-03-18T22:07:19.859+02:00Insights and RantsNews and general opinion, often privacy, security or computer related, but could be about anything really, including religion, politics, the environment, business or audio books. "Never ascribe to malice, that which can be explained by incompetence/stupidity/neglect." -- Hanlon's RazorDonn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.comBlogger852125tag:blogger.com,1999:blog-19298483.post-34926220646826846882023-12-10T01:57:00.039+02:002023-12-30T15:36:19.916+02:00TymeBank online “security” sucks<div align="center"><i><span style="color: navy; font-size: medium;">“If you are happy with your security, then so are the bad guys”</span></i></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe0ZdddMTiWkmKuw4UqIi1TV5qOOY8idlyxT8xsdjUDzie2bvI6SV6CnPhE7EQjlbma0OxyBpe4sWkbGOj4yJWB1l-PVuZmJTNvrn2E2XezMtgQP4OV65pUF8RYsMZ_90p615wBKio1e0SdSBsw94RbS70GqEyYe9phiyJhuwNg7EE2x79cGeT/s719/Tymebank%20WhatsApp.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="381" data-original-width="719" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhe0ZdddMTiWkmKuw4UqIi1TV5qOOY8idlyxT8xsdjUDzie2bvI6SV6CnPhE7EQjlbma0OxyBpe4sWkbGOj4yJWB1l-PVuZmJTNvrn2E2XezMtgQP4OV65pUF8RYsMZ_90p615wBKio1e0SdSBsw94RbS70GqEyYe9phiyJhuwNg7EE2x79cGeT/s600/Tymebank%20WhatsApp.jpg" width="580" /></a></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />A few days ago a friend sent me a WhatsApp voice message warning about the dangers of “tap to pay” cards. I had a look on my <i>TymeBank</i> app but it provides no information, so I contacted them on <i>Twitter</i>. <i>Big mistake</i>. <a href="https://twitter.com/Hajra32021956/with_replies" rel="nofollow" target="_blank">Someone</a> saw my post and told me that they have a “very helpful” <i>WhatsApp</i> number: 081-591-8538. Turns out it was fake, but I didn't know that at the time. Now the crooks are using 064-022-6823, 062-858-2151, 064-121-8862, 083-539-9981 and 076-847-4973<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnvxfjAi0YRp2Y93N3KZMtayLIow8a2loRI7CDdeybS2OLANGrHyrnuPnNAHlW-IOcYh3RlJQoIleVALT2iS8e35m_B6cAZQgGiIX9NHQsspqIkhGP5BJjOMjJ_jlNkTEqtbSt7rLtvv4VWnmLtAa9fXsvtZjSYNENFNYO6PV1q2B_FFve4TfM/s1318/WhatsApp%20Menu.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1318" data-original-width="713" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnvxfjAi0YRp2Y93N3KZMtayLIow8a2loRI7CDdeybS2OLANGrHyrnuPnNAHlW-IOcYh3RlJQoIleVALT2iS8e35m_B6cAZQgGiIX9NHQsspqIkhGP5BJjOMjJ_jlNkTEqtbSt7rLtvv4VWnmLtAa9fXsvtZjSYNENFNYO6PV1q2B_FFve4TfM/s600/WhatsApp%20Menu.jpg" width="580" /></a></div>
Fairly convincing: helpful options, no spelling mistakes. But here's the kicker: once you choose your option, you have to provide your ID number and the last 4 digits of your card number. That's all they need to login to your account and steal your money. They left R0.87 behind. How kind. Plus they changed my login password and my login PIN.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9gxBCtw5V-EZivBRzMiBe3Ed2rrjIz0EoI3Osb7nY9hwTGhNFbD2ygPMaw8sbcIaIC96BfNVkFEEanfi04zmyKFKYBJRvwBr2VGWrJ4fwCqjzfDUOuSM2B5vX4rhk3ogDiKjyFgnJYUxnjw-PvlBB8RMy-ipwGWDIAg4_hsz7mHZdotnpI1eI/s766/Stolen%20Money.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="766" data-original-width="713" height="600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9gxBCtw5V-EZivBRzMiBe3Ed2rrjIz0EoI3Osb7nY9hwTGhNFbD2ygPMaw8sbcIaIC96BfNVkFEEanfi04zmyKFKYBJRvwBr2VGWrJ4fwCqjzfDUOuSM2B5vX4rhk3ogDiKjyFgnJYUxnjw-PvlBB8RMy-ipwGWDIAg4_hsz7mHZdotnpI1eI/s600/Stolen%20Money.jpg" /></a></div>
<ul>
<li><b>My first problem</b> is this: all the OTP are carefully crafted to fit into less than 160 characters (SMS length), but provide little or no meaningful information:
<blockquote>TymeBank. Never share this One Time PIN with anyone. Use OTP 9411 to change your Login PIN or Internet Banking password. For help 0860999119. 09Dec 22:14</blockquote>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidhjG1R6qgc-tYq1UShADjvOecW4qbV26D-YgyDDKydn57VFbh-UufmNKUr5q7qB9Nk-lYPvzlKA_8tbrvMhBfgCEfN8ovn532TmS53sQLYhYNIUGiq34FK2pUcX-tI2UOHj31B4KLGENOj724hoFte029euMmjPZceQpawF3F1uahuMVYM_wE/s1369/2023_12_11_20.11.38_edit.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="600" data-original-height="1369" data-original-width="720" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidhjG1R6qgc-tYq1UShADjvOecW4qbV26D-YgyDDKydn57VFbh-UufmNKUr5q7qB9Nk-lYPvzlKA_8tbrvMhBfgCEfN8ovn532TmS53sQLYhYNIUGiq34FK2pUcX-tI2UOHj31B4KLGENOj724hoFte029euMmjPZceQpawF3F1uahuMVYM_wE/s600/2023_12_11_20.11.38_edit.jpg"/></a></div>
Had I known that my ID number and the last 4 digits of my card number were all that is required to log in to my account and reset the login password, I obviously would have been more careful.</li>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbJH3ciw6lQNZFuMwKFlDMB6U3-0rcjVlf0qYPgCt2MGKQcN9SdvcfiuWglpx3xee9LspRS3ArPHH2JVjLPAfrq9cztUR0MWDbhxXzH9unq4ZE7Y-O13YDshdUnmwV0xmOEcv5peO1LUkFkG0GbrPuWkriiElfnHvi9RK37-bdcP0IKElpMmw/s296/Capture.JPG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="206" data-original-width="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlbJH3ciw6lQNZFuMwKFlDMB6U3-0rcjVlf0qYPgCt2MGKQcN9SdvcfiuWglpx3xee9LspRS3ArPHH2JVjLPAfrq9cztUR0MWDbhxXzH9unq4ZE7Y-O13YDshdUnmwV0xmOEcv5peO1LUkFkG0GbrPuWkriiElfnHvi9RK37-bdcP0IKElpMmw/s600/Capture.JPG" width="296" /></a></div>
<li><b>My second problem</b> is that neither the SMS messages nor the banking app on my phone bothered to tell me that the login PIN had been changed. They sent me an <b>email</b>. Except I don't receive emails on my phone, and I wasn't in the office on a Saturday evening. They may as well send it by registered letter for all the good it did.</li>
<li><b>My third problem</b> is that in order to send money to someone's phone, no OTP is required at all. Nothing. I have checked the OTP messages sent to my phone and there is absolutely nothing referring to sending money to anyone. But the app conveniently told me that the money had been sent, after it was sent. Too late of course, but still. And once it has been sent, the money voucher cannot be cancelled or reversed.</li>
<li><b>My fourth problem</b> was when I realised I had been defrauded. I called <a href="https://www.tymebank.co.za/money-skills/preventing-fraud/how-to-protect-your-bank-account-from-scams-and-fraud/" target="_blank">0860999119</a> and reported the fraud. The first lady who answered the call was basically clueless, and didn't ask for my email address or home address, just my ID number. That only happened <i>later</i> when I checked that 0860999119 was in fact a genuine number for <i>TymeBank</i>. On the <b>second</b> call I was asked for my details, and told that I would receive an SMS with the fraud reference number GFD-126181. I'm still waiting for that SMS from the <i>first</i> call, or the <i>second </i>call.</li>
<li><b>Another problem</b>: <i>TymeBank</i> claims to be concerned about my security, but my account cannot be protected by <b>secure</b> second factor like a <i>Google Authenticator</i> code. It's simply not an option. Nor is there any option to limit the size of a <i>tap-to-pay</i> transaction. SMS is not secure. Everyone in the financial sector knows that. But they choose to use it anyway. Insecure by design.</li></ul>
Naturally, I will have to wait until Monday for anything to happen. And it will take a week or so for them to think up a weasel excuse for not refunding me the money. In the meantime, <span style="color: red;">my Christmas is ruined</span>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />No one can explain why the SMS messages don't tell you what the code is for. Nor can they explain why there isn't a security check when you send money, or why the fraud case number hasn't arrived by SMS. Maybe that only happens when someone actually looks at the case, by which time it is too late to reverse the transaction, naturally. Their system is designed for fraud to take place.<br />
<br />
<br /><b>Update Sunday 10 December:</b> <i>TymeBank</i> doesn't appear to monitor their own <i>Twitter</i> feed for scammers like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxkN6FXiphKWkQ0Dn2wtulkabS-MkyI_0iHnUyUuNjSzEQUdXwCi5Y6U9yx7wqnoA8eeYFLcIwI2qOhJfjp5loc9-uPHmIODdzhXTSyflLX2yygFFSsLktVq03inNMiJg0Im4f2BpIWyMmtIFxHXU1GpEGdVuNeiwDj_M4Lvw9jByYPnEMUr_5/s392/Capture.JPG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="343" data-original-width="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxkN6FXiphKWkQ0Dn2wtulkabS-MkyI_0iHnUyUuNjSzEQUdXwCi5Y6U9yx7wqnoA8eeYFLcIwI2qOhJfjp5loc9-uPHmIODdzhXTSyflLX2yygFFSsLktVq03inNMiJg0Im4f2BpIWyMmtIFxHXU1GpEGdVuNeiwDj_M4Lvw9jByYPnEMUr_5/s600/Capture.JPG" width="580" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGyYsTdAtWMCcM6zrBNzmODAup506Mk3ZyeSZTaZ2ESyo8k34jbUwnXCv71H0RFA7KaJu751P8iPf2uEVaJ-dxcM_O5ZirpBaplG1gJyUntjR59H2DHo0ivYbnyGoAvMRmVljZdpJj0rPgvuV0RSU6SBqpxtKk6kd02zdtGI0B-IH-gsZ6LOiD/s1390/2023-12-10%2003.01.18.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1390" data-original-width="713" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGyYsTdAtWMCcM6zrBNzmODAup506Mk3ZyeSZTaZ2ESyo8k34jbUwnXCv71H0RFA7KaJu751P8iPf2uEVaJ-dxcM_O5ZirpBaplG1gJyUntjR59H2DHo0ivYbnyGoAvMRmVljZdpJj0rPgvuV0RSU6SBqpxtKk6kd02zdtGI0B-IH-gsZ6LOiD/s600/2023-12-10%2003.01.18.jpg" width="580" /></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0zOY9wfJnH2HZM8zxrQgnrO43wjyDG_Nuih46VkoVUCYR3mobFsj-Bf-bETCZdkBSbwJH391hZaAi9uoyd_RysLys8oHTviCdc2YMogWjJ3V5cvRwdFvZDCZTodRHXvGyrlNdqO-AWKI6ej-KD21UVwJ4hD_BD9j6-nushILalJvkVs9Etke/s1247/2023-12-10%2003.03.02.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1247" data-original-width="713" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS0zOY9wfJnH2HZM8zxrQgnrO43wjyDG_Nuih46VkoVUCYR3mobFsj-Bf-bETCZdkBSbwJH391hZaAi9uoyd_RysLys8oHTviCdc2YMogWjJ3V5cvRwdFvZDCZTodRHXvGyrlNdqO-AWKI6ej-KD21UVwJ4hD_BD9j6-nushILalJvkVs9Etke/s600/2023-12-10%2003.03.02.jpg" width="580" /></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxTTscowr-VHlyCUmkPXeqBUNyPNVHr1uUVK5O2chKRlwDvmjj3ZA6Rs67qHcwz6uHFcO7OymnlMwbLcmxpr0pyV4dko3s8okdhDP_os2NFVB8fUDnQBAsbTy8lCuT9NMalillUFhtO1u5Q0RC2timrrz32jKpgZ5kqh5biDVZTJkhHTobZUeM/s1205/2023-12-10%2003.03.32.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1205" data-original-width="710" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxTTscowr-VHlyCUmkPXeqBUNyPNVHr1uUVK5O2chKRlwDvmjj3ZA6Rs67qHcwz6uHFcO7OymnlMwbLcmxpr0pyV4dko3s8okdhDP_os2NFVB8fUDnQBAsbTy8lCuT9NMalillUFhtO1u5Q0RC2timrrz32jKpgZ5kqh5biDVZTJkhHTobZUeM/s600/2023-12-10%2003.03.32.jpg" width="580" /></a></div>
<br />
<b>Update Monday 11 December 2pm:</b> I got a call from the fraud department (010-241-1363), who can't explain why the message with the fraud case number was not sent, but can assure me that I received and read all their OTP messages. <b><span style="color: #ff00fe;">They don't have a facility to disable tap-to-pay</span></b>, but I do: it's called a <i>microwave</i>. Pop it in for 1 second and the tap-to-pay (and the chip-and-pin) will never work again. “I'm sorry about that we do apologise sir” is a phrase they use often and repeatedly, along with “I hear you”, but until they change the way their systems work, it means nothing and they “heard” nothing. Apparently it's easier to refund R769 than to improve the security of the business. It's not the employee's money they are wasting.<br>They are an <i>internet business</i> that doesn't have any branches, but they don't operate on <i>internet time</i>, only <i>government time</i>. That leaves plenty of time for the crooks to do their dirty business. They have 4 cell phone numbers from this blog, and they have probably seen these numbers before, but they have not found out from FICA/RICA who owns those numbers, or made any arrests. And they don't seem interested in finding out either.<br />
The lady who called <span style="color: #ff00fe;">asked me to remove this article</span>. Apparently I will still get a refund if I refuse. We will see. The refund will most likely happen within the next 5 working days. I'm not holding my breath.<br />
<b>Update Tuesday 12 December</b>: TymeBank Twitter account hadn't blocked <a href="https://twitter.com/Hajra32021956/with_replies" target="_blank" rel="nofollow">@Hajra32021956</a>, until I suggested it, even though they are supposed to monitor the activity on their own Twitter feed. Hopeless. And they seem to think that if I block @Hajra32021956 the criminal activity will somehow stop. Clueless.<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbFewcismf9siRCuJji3h2Ma-4GbhPWyRhwr2WRloIYkUesNw_n2QSQARqSoSomyaa10n7jO1MaOUf8fhwnyYDcjbiAmOqlOI0MaSiY2hL-oWf0ufhf2EWuvUA48PYr3PQBONR5Q_9rn58wOK00hYcFrOOuMnvBVfpa3VHtVuzQlEF4FJ2u2J2/s581/Blocked.JPG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="580" data-original-height="424" data-original-width="581" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbFewcismf9siRCuJji3h2Ma-4GbhPWyRhwr2WRloIYkUesNw_n2QSQARqSoSomyaa10n7jO1MaOUf8fhwnyYDcjbiAmOqlOI0MaSiY2hL-oWf0ufhf2EWuvUA48PYr3PQBONR5Q_9rn58wOK00hYcFrOOuMnvBVfpa3VHtVuzQlEF4FJ2u2J2/s600/Blocked.JPG"/></a></div>
They block their critics warning of their problems, but allowed the scammers to operate for weeks with impunity. Clueless.<br>
<br>
<b>Further update 12 December</b>: I received the following email:<br>
<blockquote>From: Fraud Operations Mailbox <<a href="mailto:fraudoperations@tymedigital.com">FraudOperations@TymeDigital.com</a>><br>
Sent: Monday, December 11, 2023 3:34 PM<br>
To: Donn Edwards<br>
Subject: Liability letter for GFD- 126181<br>
<br>
Good day<br>
<br>
Thank you for contacting TYMEBANK.<br>
<br>
Your Fraud Dispute with Case number GFD- 126181 has been finalized.<br>
<br>
Kindly find <a href="https://www.mustang.co.za/file/Liability%20Letter%20GFD-126181%20for%20Mr%20Edwards.pdf">attached outcome letter</a> <br>
<br>
Regards<br>
<br>
Fraud Operations<br>
<br>
Phone +27 (0)87 286 8833<br>
Email <a href="mailto:fraudoperations@tymedigital.com">fraudoperations@tymedigital.com</a><br>
4th Floor, 30 Jellicoe Avenue, Rosebank 2196<br>
<br>
www.tymebank.co.za<br>
<br>
TymeBank is an Authorised Financial Services Provider (FSP49140).<br>
Tyme Bank Limited Reg no: 2015/231510/06
</blockquote>To which I replied:<br>
<blockquote>From: Donn Edwards<br>
Sent: Tuesday, December 12, 2023 6:54 PM<br>
To: 'Fraud Operations Mailbox' <FraudOperations@TymeDigital.com><br>
Subject: RE: Liability letter for GFD- 126181<br>
<br>
Dear “Fraud Operations”<br>
<br>
At what point is this process do you acknowledge that I was not informed in a timeous manner that my login PIN and password were changed, in the same way that I get a notification when the balance changes?<br>
<br>
Please can you supply me with the police case number, or do I need to open one myself?<br>
<br>
How many times do you get LEGITIMATE withdrawals where:<br>
1. The login PIN was changed;<br>
2. The login PASSWORD was changed; and<br>
3. All the money in the account was sent to a mobile number not used before on the account,<br>
All within a short period of time, such as 30 minutes?<br>
<br>
If not, why does your system not throw up a fraud alert when this happens?<br>
<br>
When do you plan to obtain the FICA/RICA details of the following phone numbers used by these fraudsters impersonating the bank?<br>
081-591-8538<br>
064-022-6823<br>
062-858-2151<br>
064-298-8774<br>
081-043-4791<br>
<br>
I await your prompt reply, and will be visiting your offices tomorrow.<br>
<br>
Best wishes<br>
Donn Edwards
</blockquote>
<br>
I'm still trying to figure out how to sign the <a href="https://www.mustang.co.za/file/Liability%20Letter%20GFD-126181%20for%20Mr%20Edwards.pdf">outcome letter</a> which is a read-only PDF format document. I don't think these muppets throught it through, do you? As it turned out, I was unable to visit their offices to deliver the signed letter. But I have scanned it and sent the scanned image containing my signatures.<br>
<br>
<b>Update: 14 December 2023</b>: I just received the following email message<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJOoQi7RZlQvEbdUNzi50acANyPliqANI5_ryPw_Ll65mkS_ZXMZ980s2C6tfl3d4LqBfrecIwolA55HY6YrYHBVLXjfWjq-RyAsi66tnrs7ekB6P7o9kPY7Hx6kx19sOso4O-yTtYkyvlYHbBU8_XaR1N9J9BmTDhUTsmLxaxnRjpEaiYJ1q/s712/NoTap.JPG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="580" data-original-height="640" data-original-width="712" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAJOoQi7RZlQvEbdUNzi50acANyPliqANI5_ryPw_Ll65mkS_ZXMZ980s2C6tfl3d4LqBfrecIwolA55HY6YrYHBVLXjfWjq-RyAsi66tnrs7ekB6P7o9kPY7Hx6kx19sOso4O-yTtYkyvlYHbBU8_XaR1N9J9BmTDhUTsmLxaxnRjpEaiYJ1q/s600/NoTap.JPG"/></a></div>
In the meantime I have replaced my <i>TymeBank</i> debit card with a <i>Pick 'n Pay Smart Shopper</i> card.<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzk4RvrGpDkjFmGi_pXRqYkZlEnp36gubXSsGqFHZXSFExg-bUby5rglw9HsGVmp8Xq3yX3suSGIeOFxe8Sooqza1Bq8TobgSMQHXZsqIuxLIR6m3Wewd9GN21Ppvo8i32uuasP-qHx2Pdk0sF212KEkjergfmcMHV1h7ss1LDVsPhFkoCtKnG/s580/2023-12-13-0001.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="580" data-original-height="370" data-original-width="580" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzk4RvrGpDkjFmGi_pXRqYkZlEnp36gubXSsGqFHZXSFExg-bUby5rglw9HsGVmp8Xq3yX3suSGIeOFxe8Sooqza1Bq8TobgSMQHXZsqIuxLIR6m3Wewd9GN21Ppvo8i32uuasP-qHx2Pdk0sF212KEkjergfmcMHV1h7ss1LDVsPhFkoCtKnG/s600/2023-12-13-0001.jpg"/></a></div>
<b>Update: 16 December 2023</b>: According to the <a href="https://www.mustang.co.za/file/Liability%20Letter%20GFD-126181%20for%20Mr%20Edwards.pdf">outcome letter</a> they sent, my account has been blocked. Perhaps that would explain why they have not refunded the stolen money yet. I'm not holding my breath.<br>
<b>Update Monday 18 December</b>: The refund finally arrived. I have transferred it to my FNB account.<br>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-34318811077074198242023-10-23T19:23:00.052+02:002024-01-21T15:05:25.091+02:00522 113 hours without electricity!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3bLu8CeUJaXiAmRLIzfk5OYxXIIrLwC7INgzDGMNh9hMTYR1bpdML3U46D-wSEQxNIo67vkYvXiEm3o7DeANYJsnF6V-Hm9815eoz_Oe8PlAXwK_mqVIwUkZAJCxPpusDdG3zA5MTQsb6Oyvyj5SjiJeXIJyp035bKr46pyddXF4D_V3Goja-/s4000/2023-10-23%2012.35.16.jpg" style="display: block; padding: 0, 0, 0 0px; text-align: center;"><img alt="" border="0" data-original-height="4000" data-original-width="3000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3bLu8CeUJaXiAmRLIzfk5OYxXIIrLwC7INgzDGMNh9hMTYR1bpdML3U46D-wSEQxNIo67vkYvXiEm3o7DeANYJsnF6V-Hm9815eoz_Oe8PlAXwK_mqVIwUkZAJCxPpusDdG3zA5MTQsb6Oyvyj5SjiJeXIJyp035bKr46pyddXF4D_V3Goja-/s600/2023-10-23%2012.35.16.jpg" width="580" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3bLu8CeUJaXiAmRLIzfk5OYxXIIrLwC7INgzDGMNh9hMTYR1bpdML3U46D-wSEQxNIo67vkYvXiEm3o7DeANYJsnF6V-Hm9815eoz_Oe8PlAXwK_mqVIwUkZAJCxPpusDdG3zA5MTQsb6Oyvyj5SjiJeXIJyp035bKr46pyddXF4D_V3Goja-/s4000/2023-10-23%2012.35.16.jpg" style="display: block; padding: 0, 0, 0, 0px; text-align: center;"></a><span style="font-size: small; text-align: center;">Trying to get work done at the Wimpy in Cresta<br /><br /></span></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />The joys of living in ANC-run Joburg! Extended outrages in between load shedding. Last year in September we had a 66 hour power outrage. During <a href="https://cidclive.com/" target="_blank">CIDC2023</a> in September, I had to use a studio flat with solar power (normally R7,500 per month rental) to attend the conference because we were having load shedding several times a day. Fortunately for me, the flat was empty and the owners generously allowed me to use it for free, including the Wi-Fi. Wonderful neighbours.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />As I write this, we have just finished an ordeal of 113 hours without power, despite there being no national load shedding at all! The power went off unexpectedly on <b>Wednesday 18 September</b>, around 14h50. I logged a ticket (reference no CPWEB4032200) along with the rest of the suburb, and we waited for news. A cable had shorted out and caught fire at the Windsor substation, so naturally City Power had to wait for Eskom. And that's where the lying, cover-ups, PR speak and obfuscation began. At 01h30 on Thursday City Power closed the ticket. Very sneaky.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />By the time I woke up in the morning (<b>Thursday</b>) it was too late to "escalate" the ticket, so I got a new reference number: CPWEB4032870. I spent several hours (and R150) at <b><i>Bootleggers</i></b> in Cresta, using their WiFi and recharging my phone and laptop. It turned out that they didn't have any decaf coffee, so I had to settle for some lemon iced tea and a delicious chocolate brownie. I could catch up on emails and get some work done until 6pm.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />On <b>Friday</b> I decided to try the <b><i>Wild Falcon Spur</i></b> at Heathway (R300), in the hopes they would have decaf coffee. No such luck with the coffee, but the service was good, and the rooibos tea and hamburger was fine. My waiter had the politeness to leave me alone, and few interruptions.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZOX6oi_P55u905w5fij70kuJ16UHVXycBvnsFFp83BxN9hyvf8ZSfGi76rmb6jc_mZ6jXP2MwCECr1pDYY90K8DuirBbOSl94SxH-WQJNOJviWL6kfuE3_n5t9J0JVFVEL98PcwMguzgqqIbb5zY0cR_62RHTKlkXB-Y16buUQ6cidJOCS38w/s4000/2023-10-20%2012.15.53.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3000" data-original-width="4000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZOX6oi_P55u905w5fij70kuJ16UHVXycBvnsFFp83BxN9hyvf8ZSfGi76rmb6jc_mZ6jXP2MwCECr1pDYY90K8DuirBbOSl94SxH-WQJNOJviWL6kfuE3_n5t9J0JVFVEL98PcwMguzgqqIbb5zY0cR_62RHTKlkXB-Y16buUQ6cidJOCS38w/s600/2023-10-20%2012.15.53.jpg" width="580" /></a></div>
The power came back at 2pm, and so I went back home to carry on catching up with work. All was fine until 20h10 when the power went off again! This time Eskom and City Power were determined to ruin our entire weekend. CPWEB4033907.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />On <b>Saturday</b> I went to the gym for a shower and some sanity. Another neighbour offered anyone in the suburb the chance to use their solar power, so I made use of the opportunity for a few hours while my phone recharged and I could use my laptop. Excuses and various (inaccurate and misleading) ETR promises were made and broken by City Power, who naturally tried to shift the blame to Eskom. We listened to the <i>Rugby World Cup</i> semifinals <b>by candlelight on the radio</b>. Another win for the Bokke by a single point, and SA is in to the finals against the All Blacks.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />On <b>Sunday</b> I decided to try to take the day off, and went to the gym again, to get rid of my frustration as much as getting some exercise. Eskom were still busy cutting trees (you can't make this stuff up) and then all of a sudden we were given a 17h00 ETR that came and went, and still no power. By this stage four City of Joburg Wards were being affected by the outrage(s). Later we heard that Eskom had restored power to Windsor substattion, just in time for City Power to switch on the Cresta substation and cause another trip. Then City Power needed to wait until Monday for a testing team to come and see what the problem was at Cresta.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />On <b>Monday </b>City Power closed my ticket with "Repairs Completed" at 05h16, and I managed to "escalate" it at 07h19 when I woke up. After sleeping in late and making breakfast on a gas cooker, I decided to try out the decaf coffee at the Cresta <b><i>Wimpy</i></b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9Qg-Oi-QPsQfbRShyyc1clKvZn_hWBBkmppngTw-B9lrg2hSHW4lJQz25cv2EH3yzyk1ER6TYiGzcCoS1qJJB7WgCZaGW5Wgx1F0CHWsd10byJnXCXYj3WP7o7Yj534wle02QOCxfya480qr3LsS2eXWxVC-m7R0Is1sTuthqu3Yrt2hjyVJ/s4000/2023-10-23%2011.48.34.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3000" data-original-width="4000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ9Qg-Oi-QPsQfbRShyyc1clKvZn_hWBBkmppngTw-B9lrg2hSHW4lJQz25cv2EH3yzyk1ER6TYiGzcCoS1qJJB7WgCZaGW5Wgx1F0CHWsd10byJnXCXYj3WP7o7Yj534wle02QOCxfya480qr3LsS2eXWxVC-m7R0Is1sTuthqu3Yrt2hjyVJ/s600/2023-10-23%2011.48.34.jpg" width="580" /></a></div>
Finally! A <i>decent decaf cappuccino</i>, power, and Wi-Fi (but a bit slow). I could hardly believe my luck when I heard that the power had been restored at 1pm. Let's see how long it lasts.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />In the meantime, I have learnt a few things about <b>Eskom</b>: they hadn't done maintenance on an "oil cable" for over a year. The contractors they used dug through a live cable in the dark because they didn't bring any lights with them. A real professional outfit! They only inspect their overhead power lines for trees that cause shorting when a short actually happens, and on the weekend, so they have to pay extra for the trees to be cut back. Eskom has no guards for their urban substations, and they usually take 8 hours to show up when called by City Power.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Things I have learnt about <b>City Power</b>: their infrastructure is crumbling at such a rate that they deal with an average of 4000 tickets per day. They do little or no maintenance, and if they can "back feed" a substation or area instead of fixing it, they will do that. They lurch from one fiasco to the next, and never return to do proper repairs. Likewise, they don't have enough cable testing teams, even though most of their problems involve faulty cables. In our suburb they don't lock the substations, so we provide locks for them. In the neighbouring suburb, they insist on using their own padlocks, but they don't always lock them. Go figure. They don't seem to have any lights for working at night, other than the torch on their cell phones.
<blockquote>The ANC has succeeded in damaging and <b>sabotaging more infrastructure</b> since 1994 than they managed in the decades of "armed struggle" before 1994. They are a disgrace and a national embarassment.</blockquote>Both City Power and Eskom are "run" by ANC "cadre deployees", who are usually lazy, corrupt and clueless. Most ANC municipalities are bankrupt and dysfunctional, as are <i>all</i> State Owned Enterprises, of which Eskom, Transnet, PRASA and the SABC are prime examples.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The Joburg municipality is being systematically run into the ground by the ANC politicians and municipal employees for the last 3 decades, so none of this should come as a surprise, but still it is shocking to have experience it hitting you in the face for 5 days in a row. So I have decided to delay my rates payments by 5 days every month, in a quiet gesture of reciprocity.
<br /><br />
<b>Update Tuesday 24 October</b>: <i>Beeld</i> newspaper published this article:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIS04t2MRW0I3qhpgFWETZoJ_9PKqxhs3bumTSmRoFdr1k41gq-EhpiNq9oGqSzxWCQI-3_QTA2qcg-YcAAZbOP-7ghmuDDhnpNPMLbh9B2xCpUyVlEdZoHypcIK4OW6OYsOJupPHKW7jNpvwtwhCJ7lzRf_QUWn56apvnVKkWXNiL5Gt99_Tn/s949/WhatsApp%20Image%202023-10-24%20at%2010.01.12.jpeg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="949" data-original-width="907" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIS04t2MRW0I3qhpgFWETZoJ_9PKqxhs3bumTSmRoFdr1k41gq-EhpiNq9oGqSzxWCQI-3_QTA2qcg-YcAAZbOP-7ghmuDDhnpNPMLbh9B2xCpUyVlEdZoHypcIK4OW6OYsOJupPHKW7jNpvwtwhCJ7lzRf_QUWn56apvnVKkWXNiL5Gt99_Tn/s600/WhatsApp%20Image%202023-10-24%20at%2010.01.12.jpeg" width="580" /></a></div>
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYuvGhGvhhzcrveE0t6MWeSdGtdamioteerX2JUoqHZ1fHHyf3YyYRKCp4O6pOfIFnzBTDREqk0COV8g2V6z6tLcnvhR212gzWE0yi7j4H-3qF05s4_gJrXeOsKwE4OKB0_wvdiLG3QEFYmMiKO57_y9y-3lmz4tmAE6RhjaJF8Sgc_nDpoWeB/s1184/20231114_094436.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="888" data-original-width="1184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYuvGhGvhhzcrveE0t6MWeSdGtdamioteerX2JUoqHZ1fHHyf3YyYRKCp4O6pOfIFnzBTDREqk0COV8g2V6z6tLcnvhR212gzWE0yi7j4H-3qF05s4_gJrXeOsKwE4OKB0_wvdiLG3QEFYmMiKO57_y9y-3lmz4tmAE6RhjaJF8Sgc_nDpoWeB/s600/20231114_094436.jpg" width="580" /></a></div>
<b>Update Monday 13 November</b>: Yet another City Power blackout. Started at 13:10 on Monday. Still no power on Tuesday, so I enjoyed the Wi-Fi and coffee at <b>Bootleggers</b> in Cresta from 09:30 to 17:00. It finally came back after 30 hours, at 19:30.<br />
<br />
<h2>Unplanned outrages in Aldara Park for 2023</h2>
<i>excluding load shedding</i>:<br />
<br />
1. 12 Jan CPWEB3678171 1 hour<br />
2. 13 Jan CPWEB3682778 7 hours <br />
3. 23 Jan CPWEB3694706 3 hours<br />
4. 27-28 Jan CPWEB3698875 12 hours<br />
<br />
5. 04 Feb CPWEB3707256 11 hours <br />
6. 12 Feb CPWEB3718828 2 hours <br />
<br />
7. 03 Mar CPWEB3788482 2 hours <br />
<br />
8. 05 Apr CPWEB3783338 1 hour <br />
9. 08 Apr CPWEB3785526 2 hours <br />
10. 26 Apr CP2989110 9 hours <br />
11. 28 Apr CPWEB3810728 7 hours <br />
<br />
12. 02 May CPWEB3813314 5 hours <br />
<br />
13. 22 Jul CP3032305 8 hours <br />
<br />
14. 01-02 Sep CPWEB3982795 9 hours <br />
15. 03-04 Sep CPWEB3984580 12 hours <br />
16. 11-12 Sep CPWEB3997968 26 hours <br />
17. 29 Sep CPWEB4018162 13 hours<br />
<br />
18. 18-23 Oct CPWEB4032200 CPWEB4032870 CPWEB4033907 113 hours (<b>6 days</b>) <br />
<blockquote>6 Nov: City Power "successfully" takes over <i>load shedding switching duties</i> from Eskom.</blockquote>
19. 09 Nov CPWEB4057606 6 hours <br />
20. 13-14 Nov CPWEB4057606 30 hours<br />
21. 22 Nov CPWEB4076387 8 hours<br />
<blockquote>23 Nov: City Power modifies "successful" load shedding schedule after massive outcry from residents.<br /></blockquote>
22. 23 Nov CPWEB4078336 1 hour<br />
23. 26 Nov CPWEB4081778 8 hours<br />
<br />
24. 6-14 Dec CPWEB4097231 204 hours.<br />
25. 18-19 Dec CPWEB4110976 22 hours.<br>
<!---
21 Jan CPWEB4146168 3 hours<br>
-->
<br />
<b>Total 522 hours</b> (21 days, 18 hours). Outrages on 44 days. That's an average of nearly 12 hours per outrage. So my 5 day delay in paying my rates has escalated to a month.<br />
<br />
Editor's note: I have deliberately misspelt outage as out<b>r</b>age to make a point. Not that anyone at <a href="https://www.citypower.co.za/city-power/Pages/Senior_Management.aspx" target="_blank">City Power</a> or the <a href="https://joburg.org.za/departments_/Pages/City%20directorates%20including%20departmental%20sub-directorates/Environment-and-Infrastructure-Services.aspx" target="_blank">City of Joburg</a> will get it.<br />
<b>Update Friday 24 November</b>: Eskom has declared Stage 6 load shedding for the weekend and City Power can't switch everyone on or off on time because they <i>don't have enough qualified staff</i> to flick the switches without electrocuting themselves. So last night (CPWEB4078336 - cancelled) we came on 50 minutes late, and on Tuesday (CPWEB4075389 - cancelled) it was 25 minutes late off, and 50 minutes late back on.<br />
<b>Update Sunday 26 November</b>: The power "tripped" at 14h50 but since "load shedding" was supposed to be from 14h00 to 16h30 we only reported it at 16h45. It came back on after 8 hours at 22h40.<br />
<b>Update Wednesday 6 December</b>: Power went off at 7am on Wednesday. CPWEB4097231, CPWEB4097063, CPWEB4095858, CPWEB4095833, CPWEB4095843, CPWEB4097214, CP3099926, CPWEB4100022, CPWEB4095809, CPWEB4101046. Power still not back after 8 days, and no sign of anything being done anytime soon.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW2Xa4Rwi8r6n77yMD2Xmx4S11MfVzv64Q8GF1CJIrfeYBVIHwTSijeC8brFpS8khYs22ENnx6m8c9RwWdRwE4EvsOID_Y0fqhZd_hZNp6G3asQ3uaSZfgsyDp4oJO9PAL-D23x-If9qjSNhBMRErBXVe3ZUFRQV7ckLJDMCZMk-3N-DD4xCwv/s1600/IMG-20231209-WA0008.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1600" data-original-width="1200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW2Xa4Rwi8r6n77yMD2Xmx4S11MfVzv64Q8GF1CJIrfeYBVIHwTSijeC8brFpS8khYs22ENnx6m8c9RwWdRwE4EvsOID_Y0fqhZd_hZNp6G3asQ3uaSZfgsyDp4oJO9PAL-D23x-If9qjSNhBMRErBXVe3ZUFRQV7ckLJDMCZMk-3N-DD4xCwv/s600/IMG-20231209-WA0008.jpg" width="580" /></a></div>
On Thursday the "test team" disconnected one of the phases, and then left the substation unlocked. We haven't seen them since.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik7le9GSwau6farOUJCSjx5nkVWTWCGfEYJtlf_iYsbxk-KZcM7xgoKtbddn_vXVZFzxgs3UmdndCzIrSUjTLMcYo4rzhSLPAlbxA7Q9T6y5CKIVEccyNIVjwRPri9H4ko2DYczHXpfOk8gcTJ9n9xNHMxZusSCFeHHWnZ1UnQhNxppFFQTYAo/s1600/IMG-20231209-WA0013.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1600" data-original-width="1200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik7le9GSwau6farOUJCSjx5nkVWTWCGfEYJtlf_iYsbxk-KZcM7xgoKtbddn_vXVZFzxgs3UmdndCzIrSUjTLMcYo4rzhSLPAlbxA7Q9T6y5CKIVEccyNIVjwRPri9H4ko2DYczHXpfOk8gcTJ9n9xNHMxZusSCFeHHWnZ1UnQhNxppFFQTYAo/s600/IMG-20231209-WA0013.jpg" width="580" /></a></div>
On Saturday afternoon there was some brief excitement when this truck arrived and then left a few minutes later.<br />On Saturday evening the "test team" arrived, and determined exactly the same as the Thursday test team: the cable is faulty.
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8LdMlsstH1CD5OGmw-5jK3VFCek8E3I3DFpRFAcqY4ihOZz-bniRKay4nIcSwFPuHHWRXpEbkcIJ7szdNMFp1MlqOxH3zt3ItWbeTXvnVa_FkeiAsPz7hiE1CmUtpQy-lcfIMTGPd1vAItfMBqABUarYnfapilzvMxn7z8x0OzcNs1Fsg84kr/s3840/IMG-20231210-WA0001.jpeg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3840" data-original-width="2160" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8LdMlsstH1CD5OGmw-5jK3VFCek8E3I3DFpRFAcqY4ihOZz-bniRKay4nIcSwFPuHHWRXpEbkcIJ7szdNMFp1MlqOxH3zt3ItWbeTXvnVa_FkeiAsPz7hiE1CmUtpQy-lcfIMTGPd1vAItfMBqABUarYnfapilzvMxn7z8x0OzcNs1Fsg84kr/s600/IMG-20231210-WA0001.jpeg" width="580" /></a></div>
They left the cable in this condition: one phase running hot to supply some of the houses, The rest are still without power, and the generator for <i><a href="https://carvers.co.za/" target="_blank">Carvers Restaurant</a></i> is still running after being shut down when the restaurant closed on Sunday at 5pm. Finally at 7pm power was temporarily restored to all but one home: CPWEB4101046 and the restaurant CP3191075. Now we wait for a new cable, and pray the faulty one doesn't burn out with too much power on the yellow phase.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFQoe2lfzqpGoekcG27kF-q0DeJLVs2chrizYZnb6N5jihUH2k-rkW__kUp-Pf9RUtU0eht0z3bwR0_UKowWFPqgK8a-lua2IxKhvr16k2IklYIylD6U7sX9n2xJzeVwAckfnRq01b271SEInmZofEzPpCZpYoKEQ_Mgs2_OMjQggUYwM3CSdP/s4000/2023-12-12%2018.32.36.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3000" data-original-width="4000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFQoe2lfzqpGoekcG27kF-q0DeJLVs2chrizYZnb6N5jihUH2k-rkW__kUp-Pf9RUtU0eht0z3bwR0_UKowWFPqgK8a-lua2IxKhvr16k2IklYIylD6U7sX9n2xJzeVwAckfnRq01b271SEInmZofEzPpCZpYoKEQ_Mgs2_OMjQggUYwM3CSdP/s600/2023-12-12%2018.32.36.jpg" width="580" /></a></div>
On Tuesday a team arrived to start digging. A resident wrote: "They have no work permit. No excavation permit. No lock out permits. No diagram of how the wires are in the ground. ... Not sure what would happen if they hit a live wire." At some point the cable tripped, so Cheyne Road is without power again.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX_4ygdzpmRUwLLTq7OSHuy_Y9szwz6DHjN_n600-opINsfb6120p41ca65Axb6kwmkhFoLzwpYScNjjP6XNnWEu-fvIGjWFmMZYkTWHfpArvCh_-_9LF3U3crAHtpIIISRe0WdzcF8uQOH5s1dwcQAw-0eQaOb7IJADKGpidxdHLra_DP6rhp/s4000/2023-12-13%2009.42.26.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="4000" data-original-width="3000" height="600" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX_4ygdzpmRUwLLTq7OSHuy_Y9szwz6DHjN_n600-opINsfb6120p41ca65Axb6kwmkhFoLzwpYScNjjP6XNnWEu-fvIGjWFmMZYkTWHfpArvCh_-_9LF3U3crAHtpIIISRe0WdzcF8uQOH5s1dwcQAw-0eQaOb7IJADKGpidxdHLra_DP6rhp/s600/2023-12-13%2009.42.26.jpg" /></a></div>
On Wednesday they struck a Vumatel cable, so the restaurant now has no power and no fibre connection. I noticed that they seem to have damaged one of the cables:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgySvwIsIHvpPpTuwSW4O7RjKkfNLwlbWceTJFqYU5p4FSFybI-tlxgoA4SXR-AQ6f1Ujs2ULfuOUPcUAJtwvWfPirczx3V2Qhp76F22C_povYHHi2Yitfj-UVlMGsVyfmbqIz33xSNQn0FmSwEDkxd_pD1bpHOQ5msv-EuL6aPwqymHXOx5sLV/s3000/2023-12-13%2014.29.21%20-%20Copy.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="2575" data-original-width="3000" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgySvwIsIHvpPpTuwSW4O7RjKkfNLwlbWceTJFqYU5p4FSFybI-tlxgoA4SXR-AQ6f1Ujs2ULfuOUPcUAJtwvWfPirczx3V2Qhp76F22C_povYHHi2Yitfj-UVlMGsVyfmbqIz33xSNQn0FmSwEDkxd_pD1bpHOQ5msv-EuL6aPwqymHXOx5sLV/s600/2023-12-13%2014.29.21%20-%20Copy.jpg" width="580" /></a></div>
It's difficult to tell if the damage was done this time or when the cables were dug up in April 2020. I have sent the following email update to City Power:
<blockquote>From: Donn Edwards <br />
Sent: Wednesday, December 13, 2023 11:19 AM<br />
To: 'Tshililo Nefale'<br />
Cc: 'Sipho Gamede' <sgamede@citypower.co.za>; 'Charles Tlouane' <ctlouane@citypower.co.za>; 'Tshifularo Mashava' <tsmashava@citypower.co.za>; 'Nikki van Dyk' ; 'Beverley Jacobs' ; 'Nthabiseng Moloi' <NthabisengMol@joburg.org.za>; 'Jacob Gaongallwe Mashilwane' <jmashilwane@citypower.co.za>; 'Isaac Mangena' <imangena@citypower.co.za>; <br />
Subject: <b>7 days without power</b><br />
Importance: High<br />
<br />
Hi all<br />
Ignoring these emails will not make them go away. Now we have people digging outside the substation (and disconnecting the fibre link to 45 Cheyne Road) but no one is willing to explain what is going on or providing an ETR.<br />
<br />
Then there is this mess:<br />
CP3099926<br />
CP3191075 45 Cheyne Road<br />
CPWEB4094835 46 Cheyne Cancelled/Closed/Completed<br />
CPWEB4094843 44 Cheyne Canceled<br />
CPWEB4095809 49 Cheyne<br />
CPWEB4095821 46 Cheyne Cancelled/Closed/Completed<br />
CPWEB4095833 44 Cheyne Canceled <br />
CPWEB4095843<br />
CPWEB4095858<br />
CPWEB4097063 46 Cheyne Cancelled/Closed/Completed<br />
CPWEB4097214 47 Cheyne<br />
CPWEB4097231 44 Cheyne Job "Completed"<br />
CPWEB4100022 46 Cheyne Cancelled/Closed/Completed<br />
CPWEB4101046 40 Cheyne Road "Completed"<br />
CPWEB4101064 44 Cheyne Job "Completed"<br />
CPWEB4102459 46 Cheyne Cancelled/Closed/Completed<br />
CPWEB4103655 44 Cheyne Closed<br />
CPWEB4105636 44 Cheyne Allocated<br />
CPWEB4105763 46 Cheyne<br />
<br />
Some houses in Doring Close and Cheyne Road have been restored for a while, but a switch has tripped somewhere, and 40 and 45 Cheyne Road have been without power for 172 hours and counting.<br />
<br />
Please can we have some feedback?<br />
Thanks in advance<br />
Donn Edwards<br />
(City Power customer and ratepayer)</blockquote>
<b>Update 14 December 2023</b>: It turns out that two people did not ignore my emails. Tshilio Nefale (General Manager) and Beverley Jacobs (Ward 98 Councillor) showed up at the substation and started asking difficult questions. Suddenly things started getting fixed. What's more, Tshililo <i>actually listened</i> to her customers, particularly the ladies at 40 Cheyne Road, who have been having power cable issues for years. She got the testing team to show up for the third time, and diagnose the problems properly. By 7pm on Thursday everyone was reconnected, even if it was a "temporary" fix for some of the houses.<br />
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0Aldarapark, Randburg, 2194, South Africa-26.1338925 27.9812776-54.444126336178847 -7.1749724000000015 2.1763413361788437 63.1375276tag:blogger.com,1999:blog-19298483.post-50842166206287073662023-10-14T18:26:00.007+02:002023-10-24T21:32:45.819+02:00Clarion Fixer (Part 1): Using the App<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzzYrCr6WJaB46sCq4baoqwbX8TKZPcQQMMed9i-1FU6Wy-o5B0saLbH4hY8B6ScIESWmrag4lVa-ES0OXeObvP8hz1Z_dPs-NwEOoK8MWHB9KGJau2pvoUZHAuVhub12MLnLuVNTe9T9kOJGaBrIl5X7wISZjR_faWmspdilQ-wCmIusTlBs/s1600/clFixerLogo.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="161" data-original-width="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzzYrCr6WJaB46sCq4baoqwbX8TKZPcQQMMed9i-1FU6Wy-o5B0saLbH4hY8B6ScIESWmrag4lVa-ES0OXeObvP8hz1Z_dPs-NwEOoK8MWHB9KGJau2pvoUZHAuVhub12MLnLuVNTe9T9kOJGaBrIl5X7wISZjR_faWmspdilQ-wCmIusTlBs/s1600/clFixerLogo.PNG" /></a></div>
One of my pet peeves with <i>Clarion</i> is that the applications it generates by default look like they were written for <i>Windows 95</i>, and not for current versions of <i>Windows</i>. In modern versions of <i>Windows</i>, <i>Microsoft</i> has "fixed" the old look by making all the buttons and controls flat, but <i>Clarion</i> insists on using the "<a href="https://learn.microsoft.com/en-us/typography/font-list/microsoft-sans-serif" target="_blank"><i>Microsoft Sans Serif</i></a>" font that was introduced in 1997.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />It looks old, especially since I have already used and discarded <i><a href="https://learn.microsoft.com/en-us/typography/font-list/verdana" target="_blank">Verdana</a></i> and <i><a href="https://learn.microsoft.com/en-us/typography/font-list/tahoma" target="_blank">Tahoma</a></i>, for much the same reason. I never liked <i><a href="https://learn.microsoft.com/en-us/typography/font-list/arial" target="_blank">Arial</a></i> (1982): it shipped with <i>Windows 3.1</i> and has been severely over-used. "<i>MS Sans Serif</i>" is a bitmap font from a 1992 version of <i>Windows</i>. I want my programs to look like they were written recently, not 30 years ago.<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />My <a href="https://github.com/DonnEdwards/Fixer" target="_blank">first attempt</a> at fixing the fonts in my application didn't work. I was trying to fix things in the wrong place. But I later discovered that I could use a file utility called <a href="https://www.funduc.com/search_replace.htm" target="_blank"><i>Search and Replace</i></a> to fix the <i>Clarion</i> styles and templates. So when I create the app, I don't have to waste time fixing up fonts all over the place. This got me thinking: can't I automate this? Whenever I install new or updated accessories for <i>Clarion</i>, I don't want to have to fix up the fonts yet again.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Introducing <a href="https://www.mustang.co.za/file/clFixer.zip" target="_blank"><b>clFixer</b></a>, which is freeware. It's not signed, and some anti-virus engines on <a href="https://www.virustotal.com/" target="_blank">VirusTotal</a> think it's a trojan, but I think they are getting false positives. Naturally, it is written with <i>Clarion</i> 11.1, and uses the <i>CapeSoft</i> <a href="https://capesoft.com/accessories/StringTheorysp.htm" target="_blank"><i>StringTheory 3</i></a> ($97) and <a href="https://capesoft.com/accessories/Eventsp.htm" target="_blank"><i>WinEvent 5</i></a> ($169) accessories. If you have those, you can download and modify the code <a href="https://www.mustang.co.za/file/clFixer.rar" target="_blank">here</a>. The .rar file doesn't contain any exe or dll files. The zip file contains those. If not, you can read the code in the module files. Extract the <a href="https://www.mustang.co.za/file/clFixer.zip" target="_blank">zip</a> file into a suitable folder to try it out. The code is also available on <a href="https://github.com/DonnEdwards/clFixer" target="_blank"><i>GitHub</i></a>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The first thing you need to do is make a copy of your Clarion folder, so you can see what changes have been made, and how they work. I have copied mine to "d:\Clarion11.1pe".<br />
<br />
<h2>Exploring clFixer</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMW3-utSmCtH7lZdC4-tW5DNMtN6odTjaQl0cwq4UfbAjDg7XDe7QSuj83f5MRmMDh4B0BLrBQZ7RHS5NUyDWcZ9wDrM_1bMf5rVvXIvaRU5KB_TGJB2MQqrn2E4bPmGrJHpzNCHAefRT3tqjsnCgotJg_SIA6mGGpow-rq0KuoZ47wh6HFb1d/s796/clFixerMenu.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="182" data-original-width="796" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMW3-utSmCtH7lZdC4-tW5DNMtN6odTjaQl0cwq4UfbAjDg7XDe7QSuj83f5MRmMDh4B0BLrBQZ7RHS5NUyDWcZ9wDrM_1bMf5rVvXIvaRU5KB_TGJB2MQqrn2E4bPmGrJHpzNCHAefRT3tqjsnCgotJg_SIA6mGGpow-rq0KuoZ47wh6HFb1d/s600/clFixerMenu.PNG" width="580" /></a></div>
Run the <b>clFixer </b>app, and from the main menu choose "<b>Data</b>" -> "Application Settings".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1S1SfJ0cUjXWNd246w-54pcDUCtsbYFFbjxLYGcEsTCPyYsuB90iV8fAKrVtNU2mhmVKJUFbIR2qmE0Gk0DBQFvSGJPFSwWSV0Vu0P6114qOhE4jjjYx-3wzoUUYiGgGEA4JlmpdcYUYTSF7fncGZ1fGisy3-cLGlJhirCp1vtR7L6Oupissx/s557/clFixerSettings.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="486" data-original-width="557" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1S1SfJ0cUjXWNd246w-54pcDUCtsbYFFbjxLYGcEsTCPyYsuB90iV8fAKrVtNU2mhmVKJUFbIR2qmE0Gk0DBQFvSGJPFSwWSV0Vu0P6114qOhE4jjjYx-3wzoUUYiGgGEA4JlmpdcYUYTSF7fncGZ1fGisy3-cLGlJhirCp1vtR7L6Oupissx/s600/clFixerSettings.PNG" width="557" /></a></div>
Click on the ellipse to the right of the "Root Folder" field:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja_0YjRyG_ZAo_x_xCLL9prclagmoi1vxf_pDec_ArlRUxURI1y3ZR-Ays214ft-KgDnneJ4wdV7DwA-hKTQPLisRByfpj7phP9jSidrzJellpnxSue7M4PJ63LL7JLU_kmBS-OLd_k7bOXx_QUIZZgA4J4gyzjzLKf8lax4gHRaJ3Kt_mEtDR/s554/clFixerSettings2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="486" data-original-width="554" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja_0YjRyG_ZAo_x_xCLL9prclagmoi1vxf_pDec_ArlRUxURI1y3ZR-Ays214ft-KgDnneJ4wdV7DwA-hKTQPLisRByfpj7phP9jSidrzJellpnxSue7M4PJ63LL7JLU_kmBS-OLd_k7bOXx_QUIZZgA4J4gyzjzLKf8lax4gHRaJ3Kt_mEtDR/s600/clFixerSettings2.PNG" width="554" /></a></div>
Select the backup folder and click "OK". Note there is a list of "Exclude Files". Some changes, such as the "Courier New" change, will cause trouble in the PDF related files, so you can decide whether a particular action must avoid modifying these files. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBGAZmZYQuXJV5IXDjCZZUB57R3eatrfwSdRZ124XNFZly9wKLEfcF0JGWYhqbwpmY71yrDqWHq7cNSgjKJhfAuHGTPCI4CbsAu0vRpBanT9Z2jWkbNjrbEIfKPDv9yzTMN6tgHPpKo5y2cG1UzIGyrmSmEH3TdctX0JoFXAOhB4VjmcJZ4r6z/s768/clFixerActions.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="525" data-original-width="768" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBGAZmZYQuXJV5IXDjCZZUB57R3eatrfwSdRZ124XNFZly9wKLEfcF0JGWYhqbwpmY71yrDqWHq7cNSgjKJhfAuHGTPCI4CbsAu0vRpBanT9Z2jWkbNjrbEIfKPDv9yzTMN6tgHPpKo5y2cG1UzIGyrmSmEH3TdctX0JoFXAOhB4VjmcJZ4r6z/s600/clFixerActions.PNG" width="580" /></a></div>
From the "<b>Data</b>" menu, select "Replacement Actions". This is a list of actions to be performed on the files. All of these replacement actions are performed on files in the "Root Folder" and subfolders, matching the file name extensions <pre>*.inc;*.clw;*.txa;*.dctx;*.def;*.equ;*.tpl;*.tft;*.tpw;*.red;</pre>
If you add an action to modify "readme.txt" it will <b>not</b> be modified because "*.txt" is not one of the file name extensions listed.<br />
<br />
<h2>General Actions</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisnVYks2dSlgu5J2efOBRiq_k_Mf63W01jD4esyo3j6ryrFu-QZzNUxA1McAIwEVCZG9zdemGcRHWha_RItM7dpyT409XdH8Ffq46yaP90RMr3iUdUWlDz1gkvCqt8UMNU10qTviD3nSIhHSqH94PV0mPAX95YbKb41Q4dVCYnJeCcvF0NxxNG/s742/clFixerAction1.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="494" data-original-width="742" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisnVYks2dSlgu5J2efOBRiq_k_Mf63W01jD4esyo3j6ryrFu-QZzNUxA1McAIwEVCZG9zdemGcRHWha_RItM7dpyT409XdH8Ffq46yaP90RMr3iUdUWlDz1gkvCqt8UMNU10qTviD3nSIhHSqH94PV0mPAX95YbKb41Q4dVCYnJeCcvF0NxxNG/s600/clFixerAction1.PNG" width="580" /></a></div>
Here is the first and one of the most generic actions. It applies to all files, except a small number on the "Exclude Files" list.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPeTNSqlo5NDH0qoUjc_ruYZoeUq04SL1yR0V0dff5vD-P4OxManVNt1BUFHWhI24rHhdHU6IFbyyNc32aRL1RdoYF87P8JailBWgdZEE8J3n9apJ07XJqitx_hGViqPIpJdITkjn9MK2mZzYjzYfPMOsjMMld5sSX1pCmEMfY4Fs5GAkrK82K/s743/clFixerAction2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="494" data-original-width="743" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPeTNSqlo5NDH0qoUjc_ruYZoeUq04SL1yR0V0dff5vD-P4OxManVNt1BUFHWhI24rHhdHU6IFbyyNc32aRL1RdoYF87P8JailBWgdZEE8J3n9apJ07XJqitx_hGViqPIpJdITkjn9MK2mZzYjzYfPMOsjMMld5sSX1pCmEMfY4Fs5GAkrK82K/s600/clFixerAction2.PNG" width="580" /></a></div>
This is even more general because it applies to the excluded files as well as any other file that still mentions "MS Sans Serif".<br />
<br />
<h2>Specific Actions</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqmYphLI7bO1kywKNyQq6_T_uccU1BPdIMSPPR6baE-pTaynRa0wGZUpBfJPA8wQ96g3w1UNkwaw1Z2Gnz31PqX6G4nyF_3viLCELeVmULTe1jQCpMv9frfjXs_PMrz1pmXfGjmtdHALSZ36E9Xg06uvhNdV0WIio2aLw_LdUPSnrXwV4zfnAf/s743/clFixerAction3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="500" data-original-width="743" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqmYphLI7bO1kywKNyQq6_T_uccU1BPdIMSPPR6baE-pTaynRa0wGZUpBfJPA8wQ96g3w1UNkwaw1Z2Gnz31PqX6G4nyF_3viLCELeVmULTe1jQCpMv9frfjXs_PMrz1pmXfGjmtdHALSZ36E9Xg06uvhNdV0WIio2aLw_LdUPSnrXwV4zfnAf/s600/clFixerAction3.PNG" width="580" /></a></div>
This action is specific to one file, and fixes up a form where the font names wrapped around over 2 lines.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKk2AK3S9mwoVnOctOHTEwSiVQqvMnWX0NXx8nOQ7U9829cIPEnlWt0_Tb7iIz84TTEu0ZRxy-zw10VQx2lqy23PXy0Jax3-tzOL_Kg0X3nwQbIU26Sp2XhSX9h5oQWPOuc_VyOXQWBRQ3AaSY1Q2TfjUky0ldFO6FG9QsANV4IkZGvws1L6N2/s743/clFixerAction4.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="492" data-original-width="743" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKk2AK3S9mwoVnOctOHTEwSiVQqvMnWX0NXx8nOQ7U9829cIPEnlWt0_Tb7iIz84TTEu0ZRxy-zw10VQx2lqy23PXy0Jax3-tzOL_Kg0X3nwQbIU26Sp2XhSX9h5oQWPOuc_VyOXQWBRQ3AaSY1Q2TfjUky0ldFO6FG9QsANV4IkZGvws1L6N2/s600/clFixerAction4.PNG" width="580" /></a></div>
This action is specific to the TFT extension only. It fixes a general replacement from "<a href="https://learn.microsoft.com/en-us/typography/font-list/arial" target="_blank">Arial</a>" to "<a href="https://learn.microsoft.com/en-us/typography/font-list/segoe-ui" target="_blank">Segoe UI</a>" intended for forms, and changes the font to "<a href="https://learn.microsoft.com/en-us/typography/font-list/calibri" target="_blank">Calibri</a>" for a setting to do with reports. If you use a wild card like this in the file name, be sure to omit the ";" after the wild card, and use only one file name. The software isn't expecting multiple file names in this field.<br />
<br />
<h2>Line-Based actions</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfSPBk3i7OA2UkEI7kBkQAPZQpAMpOX8pm55Niemmgv7OvGKBh-CXoK54JN9WMzORispA6Zgd_CrP5drCNfJ4TrKk0bSmgxYFpe_ICg-MlWZkJweDz8Gpr_lGnxV3_LDBTyzYlytl5aKM7ygNt_HmUs2aQl3PkY3YEUflWGj9XvggECzLs0kf/s743/clFixerAction5.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="494" data-original-width="743" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDfSPBk3i7OA2UkEI7kBkQAPZQpAMpOX8pm55Niemmgv7OvGKBh-CXoK54JN9WMzORispA6Zgd_CrP5drCNfJ4TrKk0bSmgxYFpe_ICg-MlWZkJweDz8Gpr_lGnxV3_LDBTyzYlytl5aKM7ygNt_HmUs2aQl3PkY3YEUflWGj9XvggECzLs0kf/s600/clFixerAction5.PNG" width="580" /></a></div>
Sometimes a search and replace across an entire file is not what we had in mind, and can cause havoc. Here is an example. The term "#SHEET,HScroll" appears in multiple places, so I only want to change this specific one. Note that I have included the first part of the next line as well, to prevent the same replacement happening again if the file is scanned more than once.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVfu7QVNhgjpfG63DQs-l68iHhgtjo11AKWsAhKV7hSIg2CMmya47zq4pqIfuffuoOXvxJFKisDN66tL2FR_BODQJ3IzXVb1r_zqPfPeV4DC9PLdpv0spWNYa9TVu2ViwWCbtR9ycE1BkUGadA8329wi3Or9tK3skhnaRDGW-wR9xsTKWav6hH/s745/clFixerAction6.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="493" data-original-width="745" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVfu7QVNhgjpfG63DQs-l68iHhgtjo11AKWsAhKV7hSIg2CMmya47zq4pqIfuffuoOXvxJFKisDN66tL2FR_BODQJ3IzXVb1r_zqPfPeV4DC9PLdpv0spWNYa9TVu2ViwWCbtR9ycE1BkUGadA8329wi3Or9tK3skhnaRDGW-wR9xsTKWav6hH/s600/clFixerAction6.PNG" width="580" /></a></div>
Here is another example of a line-based replacement. You may wish to disable it altogether because your IDE font settings will specify the font anyway if you have them set as follows:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqlE4IhCGs8EM-kos7TI7OfZXWozJbwydz-odG8zidIhXmHNiT8j1sJIVZKCp65m-Vb_iL-BGQT0C__8YsbA-zucbyeLMYA9TZrSk2pkjvCPv9lPzy8zuB75Tr7FsFIi6GkGirCSVc3MEKpylxO8OX58mLctya7z0LneIAdEuPdEWFFl1J-oG8/s717/Options.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="528" data-original-width="717" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqlE4IhCGs8EM-kos7TI7OfZXWozJbwydz-odG8zidIhXmHNiT8j1sJIVZKCp65m-Vb_iL-BGQT0C__8YsbA-zucbyeLMYA9TZrSk2pkjvCPv9lPzy8zuB75Tr7FsFIi6GkGirCSVc3MEKpylxO8OX58mLctya7z0LneIAdEuPdEWFFl1J-oG8/s600/Options.PNG" width="580" /></a></div>
<br />
<h2>Running the Changes</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcYSOT4yFcuVuipR57_DK_19F6Yh80HPXt_RkNnbtmSiOoDxTthSxupHHUwt__o4m09rP87mSwx6xbhyAxE__AMDRJebv_GJ26bZEXv2wWHELEGquhBqpd5j1WcrLEhVE6NCCrWjiYbzjSvS7yeiMNpssTWnYh59_rC8vydFCS3LTmFh_aB_yr/s708/clFixerDashboard.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="464" data-original-width="708" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcYSOT4yFcuVuipR57_DK_19F6Yh80HPXt_RkNnbtmSiOoDxTthSxupHHUwt__o4m09rP87mSwx6xbhyAxE__AMDRJebv_GJ26bZEXv2wWHELEGquhBqpd5j1WcrLEhVE6NCCrWjiYbzjSvS7yeiMNpssTWnYh59_rC8vydFCS3LTmFh_aB_yr/s600/clFixerDashboard.PNG" width="580" /></a></div>
From the "<b>Data</b>" menu, select "<b>Main Dashboard</b>" to view all the settings. Then click on "Process the Files" to read the file structure and make the changes. Most of the work is now being done by <i>StringTheory </i>and the process is pretty fast. When done, there is a file canned "clFixer.txt" in the root folder, which is automatically opened for you. This lists all the files affected by changes.<br />
<br />
<h2>Checking the Changes</h2>
It's important to check the changes, especially if you have added in new ones. before clFixer saves a changed file it checks to see if a "<b>before</b>" file exists. This is a file with the ".bf" added to the end. It's the original file that was renamed, and will still have the original date on it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXmN4wv_VbvJep8Ez9QHex8HEHp8GB9cA4Ij3TrhTAWH1XVJrfCS5R-_xEeNQftMO5YcOdBMr_oO4_5Qs9yxm2ioDnhzxfzef-sTZk4voHPVnn_BUEd_-hBjn_W-mCiUfwzaPcvI8WlkGVr3O7jDjVsGmp7_y-9LnDEfHVxufXhEmDdl0H5VdV/s1029/clFixerChanges.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="564" data-original-width="1029" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXmN4wv_VbvJep8Ez9QHex8HEHp8GB9cA4Ij3TrhTAWH1XVJrfCS5R-_xEeNQftMO5YcOdBMr_oO4_5Qs9yxm2ioDnhzxfzef-sTZk4voHPVnn_BUEd_-hBjn_W-mCiUfwzaPcvI8WlkGVr3O7jDjVsGmp7_y-9LnDEfHVxufXhEmDdl0H5VdV/s600/clFixerChanges.PNG" width="580" /></a></div>
Here is a file comparison using the <a href="https://www.prestosoft.com/edp_examdiffpro.asp" target="_blank">ExamDiff Pro</a> utility, but there are others you may prefer. The original file is at the bottom, and the new file is at the top. It's important to do this because you don't want to screw up your actual working environment and have to reinstall things.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Once you apply the changes to your working environment, remember that <b>none of your existing apps' forms and reports</b> will have changed. Only <b>new</b> forms, reports and apps, and template-generated items will be affected by these changes.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Why not just pay <i>CapeSoft</i> $97 for their <i><a href="https://www.capesoft.com/accessories/anyfontsp.htm" target="_blank">AnyFont</a></i> product? My main objection is that this product allows the user to make bad font choices, and select something horrible like "<a href="https://learn.microsoft.com/en-us/typography/font-list/comic-sans-ms" target="_blank"><i>Comic Sans</i></a>". Horrors! Also, fonts have different widths and spacing, and I don't want text in <i>Verdana</i> to be truncated because someone is trying to fit it into the space intended for <i>Arial Narrow</i>. Legibility is more important than style.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />In the <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">next part</a>, we will take a look at some of the programming techniques (good and bad) used in this application.<br>
<br>
<b>Update 20 October 2023:</b> Following feedback and further insignts from Geoff Robinson and <i>ClarionHub</i>, the <a href="https://www.mustang.co.za/file/clFixer.zip" target="_blank">download</a> is updated to version 0.2
<br /><br />
<div align="center">[ <a hr.ef="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-1-using-app.html">Clarion Fixer (Part 1): Using the App</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">Clarion Fixer (Part 2): The Code</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html">Change Mode vs View Mode</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Introducing Clarion FileManager (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br />
</div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
<br /><div style="text-align: center;"><span style="font-size: small;">Logo credits: <a href="https://www.flaticon.com/free-icons/toolbox" title="toolbox icons">Toolbox icons created by Roundicons Premium - Flaticon</a></span></div>
<br />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-48597101476212029912023-10-14T18:13:00.012+02:002023-10-20T18:41:32.271+02:00Clarion Fixer (Part 2): The Code<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzzYrCr6WJaB46sCq4baoqwbX8TKZPcQQMMed9i-1FU6Wy-o5B0saLbH4hY8B6ScIESWmrag4lVa-ES0OXeObvP8hz1Z_dPs-NwEOoK8MWHB9KGJau2pvoUZHAuVhub12MLnLuVNTe9T9kOJGaBrIl5X7wISZjR_faWmspdilQ-wCmIusTlBs/s1600/clFixerLogo.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="161" data-original-width="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXzzYrCr6WJaB46sCq4baoqwbX8TKZPcQQMMed9i-1FU6Wy-o5B0saLbH4hY8B6ScIESWmrag4lVa-ES0OXeObvP8hz1Z_dPs-NwEOoK8MWHB9KGJau2pvoUZHAuVhub12MLnLuVNTe9T9kOJGaBrIl5X7wISZjR_faWmspdilQ-wCmIusTlBs/s1600/clFixerLogo.PNG" /></a></div>
Let's have a look at the data structure. This is a one-pass program, so you can only process one root folder at once. So there is no relationship between the tables.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6X9U-itRv6UObkMCMf3DdX3-PVwml38U49cjSBUEJQPbuT4wrEgcefAI1R6vTFqdcA70-l0gROHeS0C2CdTuqwUwdwR2a3hYWbT1q7JMGW9w3NCf8OSDVh3bq_QaggO4thod4l46uV095AJknIkQybHTraZDUS84X4qnh_ZTcl92zhEKQEoN/s764/clDictionary.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="764" data-original-width="681" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6X9U-itRv6UObkMCMf3DdX3-PVwml38U49cjSBUEJQPbuT4wrEgcefAI1R6vTFqdcA70-l0gROHeS0C2CdTuqwUwdwR2a3hYWbT1q7JMGW9w3NCf8OSDVh3bq_QaggO4thod4l46uV095AJknIkQybHTraZDUS84X4qnh_ZTcl92zhEKQEoN/s600/clDictionary.PNG" width="580" /></a></div>
We need an <i>alias</i> of the "Action" table to be able to reorder and renumber the Actions. There is a hidden "ReorderNo" field that is used for this purpose, with a reverse order index to assist too. More on that later.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd55HsiU2vbvohUjjVjaUCW0GOL50JiDB1inNMnMsNT9EMDF_hAJErzI6ordYWKQw3sAi00RwdAlDBwSqMn8sS6FyWKQIGsWRxq-uyl0bgSolMT0If8TNsk3DqPPATeczpld_a7Gk_ktKNuzinsBRT4YRrRlu5jPl2BTELu4gHm9R1TONsPi9V/s740/clCategory.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="622" data-original-width="740" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd55HsiU2vbvohUjjVjaUCW0GOL50JiDB1inNMnMsNT9EMDF_hAJErzI6ordYWKQw3sAi00RwdAlDBwSqMn8sS6FyWKQIGsWRxq-uyl0bgSolMT0If8TNsk3DqPPATeczpld_a7Gk_ktKNuzinsBRT4YRrRlu5jPl2BTELu4gHm9R1TONsPi9V/s600/clCategory.PNG" width="580" /></a></div>
There is only a browse form for the "Action" table, since the "Setting" table has only one record. The "MainDashboard" form doesn't link to any particular table. The values displayed on the form are mostly global variables, so they can be updated from any of the source procedures ("business rules") that have been written for this application.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiynlgjO_AtheY0NNfpZESYmgmAl92ybQXdVLzOj-YZwyYHY20hhDTDVludhxmn_lb09EHgiqWAviSnvgTJAPXxkLGqA_N0d4pLptjLMMUnJrEPSnfLULFNAEE8-Z5HsGc1tZJ6z2TMafC5v0h-B8w49ybro3oq7gF0Ur__ijxkWZy7ajVpdDK/s686/clExtensions.PNG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="580" data-original-height="301" data-original-width="686" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiynlgjO_AtheY0NNfpZESYmgmAl92ybQXdVLzOj-YZwyYHY20hhDTDVludhxmn_lb09EHgiqWAviSnvgTJAPXxkLGqA_N0d4pLptjLMMUnJrEPSnfLULFNAEE8-Z5HsGc1tZJ6z2TMafC5v0h-B8w49ybro3oq7gF0Ur__ijxkWZy7ajVpdDK/s600/clExtensions.PNG"/></a></div>
Since I like to use the <i>CapeSoft WinEvents</i> Global Extension to display the program version number and other information, I added in the System Information form by modifying a demonstration form from <i>WinEvents because</i> I was curious to see how much RAM would be used by the program.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtELU9E3CcKsGeFWcVZj8nvPR1hmArLjanTf4UQOR5cXVlJQ1Wca0-hfLdCs7Cdg8-KZdSZgzZnYagW1yu79GTpncIBgw9BT4ANTGXBRiiTE8z3-IFEn2Ot1xPpKqe7nEgGvTbe7-m7rzW0KGWmLO-xUuBoaYlAfbIXRUfFOC84bvRUh7m4-Eq/s827/clVersion.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="348" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtELU9E3CcKsGeFWcVZj8nvPR1hmArLjanTf4UQOR5cXVlJQ1Wca0-hfLdCs7Cdg8-KZdSZgzZnYagW1yu79GTpncIBgw9BT4ANTGXBRiiTE8z3-IFEn2Ot1xPpKqe7nEgGvTbe7-m7rzW0KGWmLO-xUuBoaYlAfbIXRUfFOC84bvRUh7m4-Eq/s600/clVersion.PNG" width="580" /></a></div>
One of the templates that are modified is "versionres.tpl", shown here while it is in use. It's always one of the first Global Extensions I select. The modification was to make the text a bit bigger. As you can see from this screenshot, it is working. The global templates in use are listed here:<ul>
<li><i><a href="https://www.capesoft.com/accessories/abcdefaultssp.htm" target="_blank">ABC Defaults</a></i> ($10) is a simple template which allows you to set the default value for some ABC class properties. Set it and forget it.</li>
<li><i>dpiAware Fix</i> (<a href="https://www.mustang.co.za/file/dpiAwareFix.tpl" target="_blank" rel="nofollow">download</a>) freeware written by Mike Duglas to correct an error in the generated manifest file.</li>
<li><i><a href="https://www.capesoft.com/accessories/StringTheorysp.htm" target="_blank">StringTheory 3</a></i> ($97) is a string object on steroids. Over 200 methods for parsing, manipulating, creating, compressing and encoding strings. Makes you extremely productive.</li>
<li><i><a href="https://www.capesoft.com/accessories/Eventsp.htm" target="_blank">WinEvent 5</a></i> ($169) is a wrapper around the <i>Windows </i>API. This library provides just about everything: Taskbar, AutoApp Shutdown, GSM, Force windows on desktop, Comms 232 and a host of other functions.</li>
<li><i><a href="https://developerteam.com.ar/FormProductos?Pro__Guid=N70B4BCS8WVU74Cx" target="_blank">AJE Backup</a></i> ($99) is an Automatic Backup Template for <i>Clarion</i>. Configure it for your application, and it will make a numbered <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup of key files</a> every time you do a successful build. You don't need it to run the application, but you need it while developing the application.</li>
<li><i>UltimateDebug</i> is the <i><a href="https://www.clarionlive.com/Utilities.Htm" target="_blank">ClarionLive</a></i> debug template, part of the <i><a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html" target="_blank">Ultimate Utilities</a></i> pack. More on this later in the article.</li>
<li><i>cwVersion</i> is <i>Clarion</i>'s built-in version template.</li></ul>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoAX1pprCPSJIROtkrK3xC9dtFVD5pDDhNI3H4ZUAWc8IJGBI2gZekAMwEYREngMz_EoybT2sWLRjgFNZNKzS4EwHWG2z_KzVry3DyCT6iw3xLvfJTG9ieSymSrZ-QRWQJfElE69_gHPqktWHAnqqn76X9Hh3QnJDOmFqu3BPnkMV-ODq26jx2/s829/clWinEvent.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="493" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoAX1pprCPSJIROtkrK3xC9dtFVD5pDDhNI3H4ZUAWc8IJGBI2gZekAMwEYREngMz_EoybT2sWLRjgFNZNKzS4EwHWG2z_KzVry3DyCT6iw3xLvfJTG9ieSymSrZ-QRWQJfElE69_gHPqktWHAnqqn76X9Hh3QnJDOmFqu3BPnkMV-ODq26jx2/s600/clWinEvent.PNG" width="580" /></a></div>
In <i>WinEvents</i>, this is how you get the EXE version and put it into a global variable.<br />
<br />
<h2>Global Variables and Properties</h2>
A number of global variables are defined in the dictionary. I prefer to do them there than in the application itself, just to keep things organised. In the Global Embeds section, take a look at the "Global Data" section. I have defined two queues:<pre>!// This is a (risky) global queue, partially based on the queue
! structure needed by DIRECTORY function
<b>clFiles</b> QUEUE,PRE(CLF),THREAD
name STRING(FILE:MAXFILENAME)
path STRING(FILE:MAXFILEPATH)
uname STRING(FILE:MAXFILENAME) ! UPPER(name)
attrib BYTE
scanned BYTE
excluded BYTE
END
!// This is a (risky) list of excluded file names
<b>clExclude</b> QUEUE,PRE(CLE),THREAD
name STRING(FILE:MAXFILENAME)
uname STRING(FILE:MAXFILENAME) ! UPPER(name)
wild BYTE ! Contains wild cards
END</pre>
Why risky? In a normal application with multiple things going on, it is possible for the queue buffer to be changed by different threads at the same time. This has been covered by Bruce Johnson in <a href="https://www.youtube.com/live/RJRSqq8JpHs?si=BETwmxq5eEdqJRb5&t=1815" target="_blank">ClarionLive #600</a>. In this application, only one thing can happen at a time, so it made sense to make the queue definitions global, so they could be manipulated from various procedures as needed.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If you go to the Project Options page, here are the settings:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHgjcJ-JevEqE4ciw5CRFcxvtDQVKoSjB0RSKKFoAxks24AVN_b6TtiL17_eIKgwo173VOpCCVTu9glPavEaxdBcum_efYuPWCaWpbTjVT-WKPdcB7hhyrkG-WeNZslE75dMFDLBBUBYZTafNAo4FRl6bdZQCeb7dXrucLCtJ2LFRTfUtPW19b/s907/clProjectOptions.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="628" data-original-width="907" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHgjcJ-JevEqE4ciw5CRFcxvtDQVKoSjB0RSKKFoAxks24AVN_b6TtiL17_eIKgwo173VOpCCVTu9glPavEaxdBcum_efYuPWCaWpbTjVT-WKPdcB7hhyrkG-WeNZslE75dMFDLBBUBYZTafNAo4FRl6bdZQCeb7dXrucLCtJ2LFRTfUtPW19b/s600/clProjectOptions.PNG" width="580" /></a></div>
Don't leave the icon field blank. Put the icon for your application there. With websites like <a href="https://www.flaticon.com/" target="_blank">flaticon.com</a> there are plenty of icons to choose from.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyYEgq0FmZaX-YrvYrQyHPcIajxmKpqIKcV_tWAZNHYrug7CmuWHf0UrXPKuB0MlBq9JsjCDgLY7HGxaZczRFZLfgRCHmSMtvloJGZm1HCoJrmDVWjuu2o8M_DBusgFOq6U_iIZMqLrhTwVIK_qLb5WpY_zOZnoKhEWyxhmwIDDO8BkqkgRKTU/s769/clProjectOptions2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="769" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyYEgq0FmZaX-YrvYrQyHPcIajxmKpqIKcV_tWAZNHYrug7CmuWHf0UrXPKuB0MlBq9JsjCDgLY7HGxaZczRFZLfgRCHmSMtvloJGZm1HCoJrmDVWjuu2o8M_DBusgFOq6U_iIZMqLrhTwVIK_qLb5WpY_zOZnoKhEWyxhmwIDDO8BkqkgRKTU/s600/clProjectOptions2.PNG" width="580" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxqK9fK6pG78swa7W7LmeksTdim08FNog4to5moGIumDmpiQNJ7nGSHtTNnTkAl6OQMC0Hi_XkSXZil5kXZB-Zsr3cZ3km7zN9tiWd8DogxDa813e9MkoHUBVoHxF0C4r-4yrw79YCn6e1B9BLD7ehSaTsgGcDEkW1E3V0jIflX8_poreISTPG/s904/clProjectOptions3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="374" data-original-width="904" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxqK9fK6pG78swa7W7LmeksTdim08FNog4to5moGIumDmpiQNJ7nGSHtTNnTkAl6OQMC0Hi_XkSXZil5kXZB-Zsr3cZ3km7zN9tiWd8DogxDa813e9MkoHUBVoHxF0C4r-4yrw79YCn6e1B9BLD7ehSaTsgGcDEkW1E3V0jIflX8_poreISTPG/s600/clProjectOptions3.PNG" width="580" /></a></div>
Some of these options are explained in the recent <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html" target="_blank">Clarion Build Events</a> post, and the older <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">Backing up your Clarion projects</a> article.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvppA6ffw0wFbWBjXH4fq79zBCKE08t1PEaJVrbJsrd1vLdZBfbo-eI3IOD7Q701kkyq5zjHaOpo7VebiDlVxb6PuVxV7gKUHv_ixgFcQ76K-7vFsP_DbiDSAtxD75Yc8MZ8OaQKxjAT-75Yco_s8utrXe3ZTBGp-0KpX30x8Odo4IP2AK57iN/s833/clGlobal1.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvppA6ffw0wFbWBjXH4fq79zBCKE08t1PEaJVrbJsrd1vLdZBfbo-eI3IOD7Q701kkyq5zjHaOpo7VebiDlVxb6PuVxV7gKUHv_ixgFcQ76K-7vFsP_DbiDSAtxD75Yc8MZ8OaQKxjAT-75Yco_s8utrXe3ZTBGp-0KpX30x8Odo4IP2AK57iN/s600/clGlobal1.PNG" width="580" /></a></div>
When you go to the "Global Properties" tab and click on the "Actions" button, don't forget to put your name (or the company name) as the author, and choose the application icon instead of leaving it blank. Leaving the icon blank will default to the "waframe.ico" icon on all forms where no other icon is explicitly set.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJZB8knkAB1OrQTwwyEwLxCO7SASwmI1seBa3qFF6D2MerheOSEe2D2dk4YU-BiXaW5mRE7lm1F2zgjEEHMl77i9h3-2Nv-WaXYwM1Bza2LUjfGqOdBJNNBAvoVmoN0icaz_xEGeZIfIuGexQ4OX9FHIzXOqVt3_ZReLVDnk2bPrpu4IuUj5Ri/s1600/waframe.PNG" style="clear: left; display: block; float: left; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="44" data-original-width="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJZB8knkAB1OrQTwwyEwLxCO7SASwmI1seBa3qFF6D2MerheOSEe2D2dk4YU-BiXaW5mRE7lm1F2zgjEEHMl77i9h3-2Nv-WaXYwM1Bza2LUjfGqOdBJNNBAvoVmoN0icaz_xEGeZIfIuGexQ4OX9FHIzXOqVt3_ZReLVDnk2bPrpu4IuUj5Ri/s1600/waframe.PNG" /></a></div><br clear="left" />
Personally I think your application should be professional enough to warrant its own icon, especially when it is so easy to do.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeXEOC7Be8ocIcgYXjW46M5SqqrKlQb5nRUPcbYeOM4maaap5JLOeFJzw4BXfk6xBSgYaPpRI-ql0OCe6l5Bmg549xrAzbIlHruBwHA9dzC2SCiGnhep6sis_tPf2QLUtqQ7OJVR7oMeKeeF-fCq-F9Wiu9fbzBZSbwaK7OPprHPyH7oqDVbLF/s829/clGlobal2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="470" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeXEOC7Be8ocIcgYXjW46M5SqqrKlQb5nRUPcbYeOM4maaap5JLOeFJzw4BXfk6xBSgYaPpRI-ql0OCe6l5Bmg549xrAzbIlHruBwHA9dzC2SCiGnhep6sis_tPf2QLUtqQ7OJVR7oMeKeeF-fCq-F9Wiu9fbzBZSbwaK7OPprHPyH7oqDVbLF/s600/clGlobal2.PNG" width="580" /></a></div>
Go to the second tab ("App Settings") and click on the "Application Manifest" button. The settings shown will help with <a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html" target="_blank">making the user interface more helpful</a>, and disable the unwanted UAC prompt every time you run the app.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-4G3bHTQGu6oKPMUJVV4mNaySRudog-w_gJAF58wpg6nDOoweBq-eQbBNzycVB-U1_jOdmDsTbmMXs2xkZlDZO3FZ2-jB8ED4TrgKn1KyWm1ePuBV1hFM6r8_44_NpNfpEflhGLTtwuzI7GJZM-jezsKDTPg1GuCO0mXr5t5ypTvvpVaALfP/s831/clGlobal3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="654" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh-4G3bHTQGu6oKPMUJVV4mNaySRudog-w_gJAF58wpg6nDOoweBq-eQbBNzycVB-U1_jOdmDsTbmMXs2xkZlDZO3FZ2-jB8ED4TrgKn1KyWm1ePuBV1hFM6r8_44_NpNfpEflhGLTtwuzI7GJZM-jezsKDTPg1GuCO0mXr5t5ypTvvpVaALfP/s600/clGlobal3.PNG" width="580" /></a></div>
The "Set Visual Indicators" window has some useful settings too. You can see these in action when you are running the application, providing cues for adding or modifying fields in change mode. See the "<a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html" target="_blank">Change Mode vs View Mode</a>" article.
<blockquote>Remember: <b>good layout is invisible</b>, it just draws you in to the important parts of the screen. <b>Bad layout is immediately obvious</b>, and confusing.</blockquote><br />
<br />
<h2>The Main Frame</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbn9Y-zix9ATrZTvRfQEmvnE9vl8NnSupRz0VAIyfeqaNmAFQ5obApNTIrqnJnJcM32tNjvnKGUHvgLh4VaFk1nSabv26GdExNB9Z91nld6AUGMF6525MYozZhVVhUVqm94pBw_mHRdVOt3yQaVqFno3GUxjF9F6GPKmtzQqd0yPgO3EOaCTsU/s795/clMainFrame.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="661" data-original-width="795" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbn9Y-zix9ATrZTvRfQEmvnE9vl8NnSupRz0VAIyfeqaNmAFQ5obApNTIrqnJnJcM32tNjvnKGUHvgLh4VaFk1nSabv26GdExNB9Z91nld6AUGMF6525MYozZhVVhUVqm94pBw_mHRdVOt3yQaVqFno3GUxjF9F6GPKmtzQqd0yPgO3EOaCTsU/s600/clMainFrame.PNG" width="580" /></a></div>
The "Main" frame is the first thing the user sees, so try to make it look professional and pleasing to the eye. Make sure it has a meaningful title, usually the full name of the application. Put the customer's logo in the background, or the application logo, depending on the circumstances. Don't make it too "busy" or too "cute". I am showing the version number and the name of the workstation running it. I changed the "Browse" menu to "Data" and made it bold, indicating its importance.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUxEfUqiomPNCliTklEF3DET4XYFR8Z1Gaj5hdh2X3dBBAULyjiy23KnG-PVJ37xVaiwGRpvvks2-m2FOMdGS19bsrGCDgcCelq8EXFXjTZcHTpYI57ZCWeyJfU0DTomYpHz0D7nESLqVMRzuWy760IlqGk-bBzAtx8n9UgEwyzzpeW1oYi56/s918/clMainEmbeds.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="623" data-original-width="918" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrUxEfUqiomPNCliTklEF3DET4XYFR8Z1Gaj5hdh2X3dBBAULyjiy23KnG-PVJ37xVaiwGRpvvks2-m2FOMdGS19bsrGCDgcCelq8EXFXjTZcHTpYI57ZCWeyJfU0DTomYpHz0D7nESLqVMRzuWy760IlqGk-bBzAtx8n9UgEwyzzpeW1oYi56/s600/clMainEmbeds.PNG" width="580" /></a></div>
Select the "Main" frame and click on the "Embeds" button on the right-hand side.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrpduEwyqFoh0MDfG5MFSHKCvJBih_VTINvxJb7fwEn4SXKXIRrY5zUlwSDF6tHApuocgSdAKpr1kESUzA60ka5ZwBnBHjsuRZ2VL2MVCBnbDYKESiIE_0FvpJKf8XGQoZnQjj6AbFsxHk9oGRtk7FQIgLetEj0YSIEk5-hG7rlaiQunfSqvD/s729/clMainEmbeds2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="616" data-original-width="729" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrpduEwyqFoh0MDfG5MFSHKCvJBih_VTINvxJb7fwEn4SXKXIRrY5zUlwSDF6tHApuocgSdAKpr1kESUzA60ka5ZwBnBHjsuRZ2VL2MVCBnbDYKESiIE_0FvpJKf8XGQoZnQjj6AbFsxHk9oGRtk7FQIgLetEj0YSIEk5-hG7rlaiQunfSqvD/s600/clMainEmbeds2.PNG" width="580" /></a></div>
Click on the "Expand Filled Nodes" button and find the "OpenWindow" embed point. Click on the "Filled Source" button to view the code in the Embeditor.<pre> ! Get the EXE version number and global values
! (c) 2022-2023 Black and White Inc
!dbg('COMMAND: ' & COMMAND(''))
glo:dbugoff = FALSE ! Do not suppress debug messages
glo:AppVersion = 'Version ' & CLIP(ds_GetFileVersionInfo())
glo:MachineName = clip(ds_GetWorkstationName())
0{PROP:StatusText,3} = clip(glo:AppVersion)
! Display the version number in the main status bar
0{PROP:StatusText,2} = clip(glo:MachineName)
! Display the workstation name in the main status bar
!// Get the setting data
Access:Setting.Open()
Access:Setting.UseFile()
If Records(Setting) < 1
Access:Setting.PrimeRecord()
set:GUID = glo:st.MakeGuid()
Access:Setting.Insert()
else
set(set:SettingPK)
Access:Setting.Next()
End
glo:AppDescription = set:stDescription
glo:RootPath = set:RootPath
glo:FileExtensions = set:FileExtensions
glo:ExcludeFiles = set:ExcludeFiles
!dbg(set:GUID)</pre>
Notice anything wrong with this code? No error checking! I broke my own rules!<br>
<br>
This code uses <i>WinEvents </i>to set the global values of glo:AppVersion and glo:MachineName, and then displays the results on the main status bar. Next, it inspects the contents of the "Setting" table and creates a record if it doesn't have any. Then it loads four of the fields into corresponding global variables so they can be displayed on the Main Dashboard later.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwVzkCOL80-JEHxdeFzXAbSNERht56YIiM6PCHJdSCUsX0lR4zsnayez2FtS-FwSP_V7Dl9Ce7thxNMKYE95897G5oF9hDW9rbGsWQmy1Nl5kYgTP_9UZ1-tlQRU5GuL4AUCWgTXCVGQGYXbWZGWjZpp73iZZwtYvDZgANW4pn3vwsm7So-ofP/s904/clMainEmbeds3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="635" data-original-width="904" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwVzkCOL80-JEHxdeFzXAbSNERht56YIiM6PCHJdSCUsX0lR4zsnayez2FtS-FwSP_V7Dl9Ce7thxNMKYE95897G5oF9hDW9rbGsWQmy1Nl5kYgTP_9UZ1-tlQRU5GuL4AUCWgTXCVGQGYXbWZGWjZpp73iZZwtYvDZgANW4pn3vwsm7So-ofP/s600/clMainEmbeds3.PNG" width="580" /></a></div>
Click on the "Previous Filled Embed" button to go to the top of the Embeditor code. I always include Dan Read's <a href="http://www.developerdotstar.com/mag/articles/read_princprog.html" target="_blank">Principled Programming</a> summary as a reminder to write decent code and professional quality applications. Take a moment to read it, and then click on the green "Save and Close" button.<br />
<br />
<h2>UltimateDebug and dbg Messages</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiElS_iRpSaFVuhDzHX_gq7zhQjf_s9s_qZnL3YT508_DYjY5z69b7la7TFtksn_2zjI2em66RxNUyEmzw9VCsHMI3AMwP5Z63Ldh3BRiwjhgmNJe6qhaqpRr_ocjTopd0crMb0HeBZprWkHCotJE0V3MBC_n-dwzHL0-bZHWxqyz0qaVZbUwVe/s905/dbg1.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="617" data-original-width="905" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiElS_iRpSaFVuhDzHX_gq7zhQjf_s9s_qZnL3YT508_DYjY5z69b7la7TFtksn_2zjI2em66RxNUyEmzw9VCsHMI3AMwP5Z63Ldh3BRiwjhgmNJe6qhaqpRr_ocjTopd0crMb0HeBZprWkHCotJE0V3MBC_n-dwzHL0-bZHWxqyz0qaVZbUwVe/s600/dbg1.PNG" width="580" /></a></div>
Find the "dbg" source procedure and open it using the Embeditor. This is a small but very useful procedure during development, because it allows you to send messages to <i>DebugView++</i> to see what is going on.<pre>!// The purpose of this procedure is to display debug messages
! This means you can enable/disable the UltimateDebug messages
! without having to comment out a bunch of ud.debug lines
! in your code
if glo:dbugoff = false then ! Display messages
std.setvalue('--- ' & clip(pstrDebugMessage) )
std.trace()
end ! Display message</pre>
That's all folks! It uses the <i>StringTheory</i> Trace method to send information to the debugger. Why not use "<i><b>UltimateDebug</b></i>" instead? Actually, I use both when I'm starting a project, so I can see how the procedures and forms are interacting with one another. See "<a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html" target="_blank">Adding Extensions to Clarion</a>". At some point in the process, these messages start getting in the way and I just want to see my own messages. I used to write my own messages using "UD.Debug" but if you disable or remove the "<i>UltimateDebug</i>" global extension you then have the tedious task of finding and commenting out all of these statements. So instead of using "UD.Debug" I use "dbg" instead. It displays the messages whether "<i>UltimateDebug</i>" is in use or not.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpC0DBuhzb_I7c02-kVaWPtiH-tvXOxf9RtnLqNpvLMsgZLRFdbUZzi04j4MbMO1Hrdt2LLZyINBvdLAfMyvug_tcToEaBlesAx8_qEqZg1x9dEzNcdkcr4mjM5JrRnNHOJmNZCGffmYnm-SAruMvbR1QSPQpNR62RrsaOXBh6fnStTWfUM-vq/s675/dbg2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="319" data-original-width="675" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpC0DBuhzb_I7c02-kVaWPtiH-tvXOxf9RtnLqNpvLMsgZLRFdbUZzi04j4MbMO1Hrdt2LLZyINBvdLAfMyvug_tcToEaBlesAx8_qEqZg1x9dEzNcdkcr4mjM5JrRnNHOJmNZCGffmYnm-SAruMvbR1QSPQpNR62RrsaOXBh6fnStTWfUM-vq/s600/dbg2.PNG" width="580" /></a></div>
When "<i>UltimateDebug</i>" is in use, notice the extra <pre>if false then</pre> statement, and its corresponding "end" statement. This stops "<i>UltimateDebug</i>" from adding in a redundant message every time you use "dbg".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0qtBC9y2Ctzs5BWnxFciSkm5Z23Wcw8ohV4xw_1l3l3ToHcyIQsBj_gvdBkZH1yP74aJLwzp-gvOZXgeJ2gyymhnCORNM0RmobADMsmmb4xeQ5fNcpZAk6vL_WFXz6hQSYVRlpdtOz7P2P6jSuTyck01J_F32ziQMIkx_NT4jhrZaB2Qgk40Y/s834/dbg3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="675" data-original-width="834" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0qtBC9y2Ctzs5BWnxFciSkm5Z23Wcw8ohV4xw_1l3l3ToHcyIQsBj_gvdBkZH1yP74aJLwzp-gvOZXgeJ2gyymhnCORNM0RmobADMsmmb4xeQ5fNcpZAk6vL_WFXz6hQSYVRlpdtOz7P2P6jSuTyck01J_F32ziQMIkx_NT4jhrZaB2Qgk40Y/s600/dbg3.PNG" width="580" /></a></div>
To remove the "<i>UltimateDebug</i>" stuff, first open the template and click on "Disable UltimateDebug template". Click "OK" and do a build. You will probably get a compile error or two. Now "Delete" the extension completely and do another build. This time there should be no further errors. If you want to turn off all the messages, just go the the "Main" OpenWindows code and change the value from <pre>glo:dbugoff = FALSE</pre> to <pre>glo:dbugoff = TRUE</pre><br />
<br />
<h2>UpdateSetting</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUHXjn5O8pza_xiwOPCAXMHcE3UYIZuEC0QAbu4kHXM2huAcz4pYfgYKJAjcUVpynCjxh_P1S0PwsUFuTyw7ReV7S9S_pXqCZ-gINTmFckf3dI9j_Md9tE6Y-yiSiLgm8d1igrDP0lXsdLXDgvPIud1C6qFhgqoWiAjjZNXnHY-Bren1Er4bUq/s870/clUpdateSetting.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="633" data-original-width="870" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUHXjn5O8pza_xiwOPCAXMHcE3UYIZuEC0QAbu4kHXM2huAcz4pYfgYKJAjcUVpynCjxh_P1S0PwsUFuTyw7ReV7S9S_pXqCZ-gINTmFckf3dI9j_Md9tE6Y-yiSiLgm8d1igrDP0lXsdLXDgvPIud1C6qFhgqoWiAjjZNXnHY-Bren1Er4bUq/s600/clUpdateSetting.PNG" width="580" /></a></div>
I don't like the way <i>Clarion</i> makes the <i>primary key</i> fields <b>editable by default</b>. It's just asking for trouble. Ideally, primary key values should be generated before the form opens in insert mode, or at least only be editable during insert mode. After that they should be locked down.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Here is an example. The "GUID" value was generated automatically, so the field ENTRY control is disabled, flattened, made read-only, and is no longer the 1st field in the tabindex order. Give it a high number like 100 and the Window Designer will assign a more realistic number. The gap between "GUID" and "Description" is used to accentuate this.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Also, the "Description" control and prompt have the TabIndex values of 2 and 1 respectively, so the cursor will land in the "Description" field when you open the form. The "Description" field is the same width as the "Root Path" field, even through the former can't accept as many characters as the latter. Be careful not to make the controls much bigger than the amount of data it can support, because the user's input will be truncated without warning.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBOJPDG-0JF-ly-ulmLzlW6AWA3lGeD-UlX1gXvxIWNBUE2tlvzma3HzjGdWbcoJk7Rnh_I-R1g-LwP9kL12OQiCm4haMkUN8mUksxL-gghHb_kYdDT0g1HR8FosuAYvGFYyTfNGED5iauolx62xAWzJPyTZDpWQIJq1oIeZ3SgbFGMhm_ndj1/s857/clUpdateSetting2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="610" data-original-width="857" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBOJPDG-0JF-ly-ulmLzlW6AWA3lGeD-UlX1gXvxIWNBUE2tlvzma3HzjGdWbcoJk7Rnh_I-R1g-LwP9kL12OQiCm4haMkUN8mUksxL-gghHb_kYdDT0g1HR8FosuAYvGFYyTfNGED5iauolx62xAWzJPyTZDpWQIJq1oIeZ3SgbFGMhm_ndj1/s600/clUpdateSetting2.PNG" width="580" /></a></div>
In the Window Designer you can drag fields onto the form, but when you drag a memo field (in this case set:ExcludeFiles) it comes across as an ENTRY control, not a TEXT control. So you can resize it as required, and then close the Window Designer and go to the Window Properties screen. Here I have changed the highlighted (set:ExcludeFiles) control from "ENTRY(@s255),AT" to "TEXT,AT" to get a more useful input control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoqiEihsW7ZWOVP-8bzWiKKXcAIqbHPeVsXsX7jPviQ6sXLGkFYcaEWpYPOa5wKYYMXt8RSmiwOkdDZl5ytpCOlfVz4z9XyP8Nv4lyJ1d3N4mm82adqm9oza-KTOMMTxYNfpoCSb4er5OIitKvoCZRZdSWOT36exH3DsuYzTvyCSB4dWXS8wXv/s782/clFixerSettings3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="556" data-original-width="782" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoqiEihsW7ZWOVP-8bzWiKKXcAIqbHPeVsXsX7jPviQ6sXLGkFYcaEWpYPOa5wKYYMXt8RSmiwOkdDZl5ytpCOlfVz4z9XyP8Nv4lyJ1d3N4mm82adqm9oza-KTOMMTxYNfpoCSb4er5OIitKvoCZRZdSWOT36exH3DsuYzTvyCSB4dWXS8wXv/s600/clFixerSettings3.PNG" width="580" /></a></div>
Please take a look at my post "<a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html" target="_blank">Change Mode vs View Mode</a>" for an explanation of the additional code in the Window.Init embed points of WindowManager, both on this form and on the next one.
<br />
<br />
<h2>UpdateAction</h2>
This form has a number of interesting features. There are "Paste" buttons to take the text from the Windows Clipboard and paste it into the "stBefore" and "stAfter" fields. If you look at the "Accepted" embed points for these buttons you will see the code that does it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtgsgE50vBZuK3x6y85Jsdw28HT0xFHZ9y7WZXW1RNpZDjX3KVP3I1c0HlS9BRAC1zYCtgrnIx5St00IRD96aLORTCwBZQy61-cxcsIh1pCTPJrh7dJY-kTrFg0rYvENl3Qo-9PhTpfgP1UBMqpiyZwV5245fBjJzJrNHfVkrCne9_XL_lgDO/s675/clUpdateAction.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="675" data-original-width="588" height="580" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtgsgE50vBZuK3x6y85Jsdw28HT0xFHZ9y7WZXW1RNpZDjX3KVP3I1c0HlS9BRAC1zYCtgrnIx5St00IRD96aLORTCwBZQy61-cxcsIh1pCTPJrh7dJY-kTrFg0rYvENl3Qo-9PhTpfgP1UBMqpiyZwV5245fBjJzJrNHfVkrCne9_XL_lgDO/s600/clUpdateAction.PNG" /></a></div>
The "act:FileName" and "act:DisableYN" fields needed some special attention on this form. When the user sets the "act:DisableYN" check box to TRUE, I wanted to grey out the "act:stDescription" field and change the highlighting of the "act:StepId" field. When the "act:FileName" field is empty, I want to disable and empty the "act:LineNo" field because you <i>can't have a <b>global </b>line number</i>, only one for an <i>individual </i>file. The code to do this is kept in two routines, and they are called from the relevant control's "All Events" embed point, and the "OpenWindow" embed point for when you open an existing record.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The other item of interest is the "<b>Next Step No</b>" button. For this table, I could have had the primary key as a GUID, and "StepId" as an indexed field, but it seemed over-complicated for a simple table with not many records.<blockquote>So I broke my own rule about <i>not changing the primary key</i>.</blockquote> I want the step numbers to start at 100 and go up in steps of 10, with the flexibility of being able to add in steps in between other ones. So this is how I calculate the next step, using the <i>alias</i> to the "Action" table, since we are busy inserting/editing an "Action" table record:<pre>CalcNextStep ROUTINE
! Find the largest step number, add 10
loc:StepId = act:StepId ! Save the current step number
lngStepIdmax = 0 ! Start
!// Open an alias of the table so as not to screw things up
Access:ActionAlias.Open()
Access:ActionAlias.ClearKey(act1:ActionStepPK)
SET(act1:ActionStepPK)
LOOP UNTIL Access:ActionAlias.Next() <> Level:Benign ! Next
if lngStepIdmax < act1:StepId then ! lngStepIdmax
lngStepIdmax = act1:StepId ! The new max
end ! lngStepIdmax
END ! Next
Access:ActionAlias.Close()
if loc:stepId <> lngStepIdmax then
! Add to the most recent step to get the new one
act:stepId = lngStepIdmax + 10
! unless we already have the largest number
end</pre>
Notice the lack of error checking? What was I thinking?<br>
<br />
<h2>BrowseAction</h2>
Calculating a new primary key value is one thing. Renumbering an entire table is something else entirely. Firstly, it's dangerous and difficult. Secondly, <i>primary key values aren't supposed to be changed</i> without a good reason and careful consideration, if at all. But I did it anyway. Why?
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />I want to be able to insert steps because the order in which the replacements are done is important. so let's assume we have a StepId sequence like<pre>100, 110, <b>112, 113,</b> 120, 130, 140, 150</pre> and I would like to add in another step between 112 and 113. I could change 113 to 114 and then insert a new 113, but if I'm going to change the primary key value of one record, I might as well go the whole 9 yards and renumber all of them.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If I start renumbering from the lowest number, it won't be long before I am trying to change 120 to 140, but there is already a step number 140, which will result in an error. What I need is an <b>intermediate field</b>. In this case it is "act1:ReorderNo".<pre>RenumberRecords ROUTINE
!// <b>First pass</b>: update all the act:ReorderNo fields
Access:ActionAlias.Open()
Access:ActionAlias.ClearKey(act1:ActionStepPK)
SET(act1:ActionStepPK)
loc:StepId = 90
LOOP UNTIL Access:ActionAlias.Next() <> Level:Benign ! Next
loc:StepId += 10
act1:ReorderNo = 1000000 + loc:StepId
Access:ActionAlias.Update()
END ! Next
Access:ActionAlias.Close()
!// <b>Second pass</b>: update all the act1:StepId fields with
! big numbers
Access:ActionAlias.Open()
Access:ActionAlias.ClearKey(act1:ActionStepPK)
SET(act1:ActionReorder)
LOOP UNTIL Access:ActionAlias.Next() <> Level:Benign ! Next
act1:StepId = act1:ReorderNo
Access:ActionAlias.Update()
END ! Next
Access:ActionAlias.Close()
!// <b>Third pass</b>: update all the act1:StepId fields with
! correct step numbers
Access:ActionAlias.Open()
Access:ActionAlias.ClearKey(act1:ActionStepPK)
SET(act1:ActionReorder)
LOOP UNTIL Access:ActionAlias.Next() <> Level:Benign ! Next
act1:StepId = act1:ReorderNo - 1000000
Access:ActionAlias.Update()
END ! Next
Access:ActionAlias.Close()</pre>
Again, no error checking! This is just wrong.<br>
<br>
In the <b>first pass</b> through the table, using the <i>primary key</i> sort order, I can calculate a new sort value and place it in the "act1:ReorderNo" field. To prevent the renumbering clashes, I am adding one million to each new step number. In the <b>second pass</b> I am using the <i>reverse</i> order of "act1:ReorderNo", so the biggest StepId is replaced first, with a much higher number. In the <b>third pass</b> we return to the primary key sort order, and deduct the million from each StepId value, so we get step numbers starting at 100.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlk3aRCZtmn_acbqFTIhu_wxxKzAEke-5P0-XcGorXrya-xkgAPY_2UXJnlojEjJWl10qNM0Bj-UHrcp8keXnlnMIL1xsFXFicQm7QcQbHY9PFEgmoDDrwz9BaKORkQMg-8wNfKSOvIWk5wh1BQcbOEHNU9G7cHV0Umv9MLkppdo2rLPhVd_N1/s560/clBrowseActionListBox.PNG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="560" data-original-height="549" data-original-width="560" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlk3aRCZtmn_acbqFTIhu_wxxKzAEke-5P0-XcGorXrya-xkgAPY_2UXJnlojEjJWl10qNM0Bj-UHrcp8keXnlnMIL1xsFXFicQm7QcQbHY9PFEgmoDDrwz9BaKORkQMg-8wNfKSOvIWk5wh1BQcbOEHNU9G7cHV0Umv9MLkppdo2rLPhVd_N1/s600/clBrowseActionListBox.PNG"/></a></div>
If you inspect the List Box Formatter, you will see the use of a picture <pre>@n~Y~1B</pre>which is a hack to display a "Y" if the value is true, and a blank of the value is false. This is discussed on <a href="https://clarionhub.com/t/displaying-bool-values-in-a-browse-list-as-y/5668" target="_blank">ClarionHub</a> in great detail, including the "proper" way to do it.<br>
<br />
<h2>Processing the Files</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9gl3veC8DHGgaC0rKL8mfmIAmMev7Y2ojPEm1q3vHF8b073_c2fRa5lVZ3AcMpM_1gru_ahpGFNvJ6Unt6BW4FGB6nevbGittAfp4WJzJoFXUY26buPTE0M_kVWXKNCe4IDZL0TbYdjAZgGKF5ssEaDTXDzajGN9PiXINDMlssas39tc0eOYM/s578/clSource.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="178" data-original-width="578" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9gl3veC8DHGgaC0rKL8mfmIAmMev7Y2ojPEm1q3vHF8b073_c2fRa5lVZ3AcMpM_1gru_ahpGFNvJ6Unt6BW4FGB6nevbGittAfp4WJzJoFXUY26buPTE0M_kVWXKNCe4IDZL0TbYdjAZgGKF5ssEaDTXDzajGN9PiXINDMlssas39tc0eOYM/s600/clSource.PNG" width="600" /></a></div>
This is where the file processig gets done. First, we create a queue of file and folder names in the global "clFiles" queue. To achieve this, we scan the root folder and add in all folder names found using "DirectoriesOnly" procedure. Next, we parse the extensions list and get each extension wild card, using "DirFilesMask". Then we run "DirFilesOnly" for each mask. In this way, the queue grows with file and folder names. This is all co-ordinated by "DirAllFilesAndFolders" until all folder names have been scanned. Once all the folders have been scanned, these folder names are removed from the queue, leaving only the file names.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Another procedure creates a smaller queue, "clExclude", with just a list of the excluded files. As each file name gets added to the "clFiles" queue, a boolean field is set if the file is one of the excluded files. The final stage in the process involves looking at each file in the queue and applying all the Actions in the "Action" table, except those which are disabled. This is done by the "ProcessFile" procedure.<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If the file is marked as an excluded file, then the excluded actions are also ignored. If the file mask for the action is empty, or the file mask matches the file name in "clFiles", then the Action is performed. Once all the actions have been tried, the new file contents are compared with the original file contents (both stored in <i>StringTheory </i>objects) and if they differ, the old file is renamed with a .bf extension, and the new file is saved under the original name. The file path is also added to a list of changed files, which is eventually saved in the root folder as "clFiles.txt".<br />
<br />
<h2>The Main Dashboard</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJRp0QVTtr64IftgJDiKPqDKaCQAFCAHUzX6AMosSPBBRECaHwxFTTDC86diUpejIDEOCGLBfw1bob7NB2tnUJqzllWfa7cm7qKyeUWlQahhPSk5Go-lMu5NMC12kEWX0wS_r_ErGqMKyYHYd3kFfAWwnBnFojEsSrUUlR0M3v_JS79Ebyr2zj/s707/clMainDashboard.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="462" data-original-width="707" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJRp0QVTtr64IftgJDiKPqDKaCQAFCAHUzX6AMosSPBBRECaHwxFTTDC86diUpejIDEOCGLBfw1bob7NB2tnUJqzllWfa7cm7qKyeUWlQahhPSk5Go-lMu5NMC12kEWX0wS_r_ErGqMKyYHYd3kFfAWwnBnFojEsSrUUlR0M3v_JS79Ebyr2zj/s600/clMainDashboard.PNG" width="600" /></a></div>
Here is the "Main Dashboard". Clicking on the "Process the Files" button will cause the "DirAllFilesAndFolders" procedure to process the files according to the values shown on the form. The line of text near the bottom of the form is based on the "glo:ProgressMessage" global variable, so it can be updated by any of the procedures mentioned above.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />I'm pretty sure I have broken all kinds of "good programming" rules by relying so much on global variables, especially the global queues. I also don't have enough knowledge of CLASS definitions to modify the supplied classes, particularly the PRIVATE class elements, to offer any change actions in this version of clFixer. Please leave comments below or contact me directly to help me improve this code and make it more professional.<br>
<br>
<h2>Feedback</h2>
<b>Monday 16 October</b>: Well, this is embarassing. I didn't put <b>any error checking code</b> in the app! Didn't even follow my own advice. So now I'm working on version 0.2 that includes error checking. So much for professional code! Thanks to Geoff Robinson for pointing this out privately, and for several other improvements, espcially in the way I have been using StringTheory.<br>
<b>Friday 20 October 2023</b>: Following feedback and further insignts from Geoff Robinson and <i>ClarionHub</i>, the <a href="https://www.mustang.co.za/file/clFixer.zip" target="_blank">download</a> is updated to version 0.2
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-1-using-app.html">Clarion Fixer (Part 1): Using the App</a> ]<br />
[ <a h.ref="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">Clarion Fixer (Part 2): The Code</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html">Change Mode vs View Mode</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Introducing Clarion FileManager (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br />
</div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
<br /><div style="text-align: center;"><span style="font-size: small;">Logo credits: <a href="https://www.flaticon.com/free-icons/toolbox" title="toolbox icons">Toolbox icons created by Roundicons Premium - Flaticon</a></span></div>
<br />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-63582378915883157722023-10-03T14:24:00.006+02:002023-10-14T18:35:21.993+02:00Change Mode vs View Mode<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
One of the things that drove many of us mad with <i>Microsoft Access</i> was the way (by default!) that all data was editable. It still is in their many examples. But it's dangerous! A user could accidentally change something without realising it and all kinds of havoc could ensue. So the late Russell Westwood promoted the idea of <b>view mode</b> (flat) and <b>change mode</b> (sunken).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKUr-P43em4iAUI1uTQObVjtwpe247_IsTFJ5nXBpFONgLoHrXz6T9LnA1K_iUR1HYjRixkJLNHq9NFy2HVXXpsQb4NTU6NvSBa_4x9i3JKQuqoVFM9pqMjCgzAbDVsoYlS0nnXnEAg1my9BMb1fL5iiQPDxK5rzRMkvMsiFEVKLW2e7sXSLn5/s552/ViewMode.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="424" data-original-width="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKUr-P43em4iAUI1uTQObVjtwpe247_IsTFJ5nXBpFONgLoHrXz6T9LnA1K_iUR1HYjRixkJLNHq9NFy2HVXXpsQb4NTU6NvSBa_4x9i3JKQuqoVFM9pqMjCgzAbDVsoYlS0nnXnEAg1my9BMb1fL5iiQPDxK5rzRMkvMsiFEVKLW2e7sXSLn5/s400/ViewMode.PNG" width="400" /></a></div>
This is <b>view mode</b>. Nothing can be changed here. This is a good visual cue that the user will understand. They will have to click the "Change" button to modify the data.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-L7CYhdZ3HDi9IotikKQkSR-HVzZxnQlUyuk6TNRKByhm4NM1FFcTM0ahLl9dQ7XUx4UnTRYdEosuDshEfKA8fagAv05v0vadkHMp1V4ZuRJwd12VRBGVm6DX6lFVaumbKsxbzIzhdLtwBKxWqOsSs-YXGwFznwRZPNjLQDGozKA1v0OPlrv/s548/ChangeMode.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="425" data-original-width="548" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo-L7CYhdZ3HDi9IotikKQkSR-HVzZxnQlUyuk6TNRKByhm4NM1FFcTM0ahLl9dQ7XUx4UnTRYdEosuDshEfKA8fagAv05v0vadkHMp1V4ZuRJwd12VRBGVm6DX6lFVaumbKsxbzIzhdLtwBKxWqOsSs-YXGwFznwRZPNjLQDGozKA1v0OPlrv/s400/ChangeMode.PNG" width="400" /></a></div>
Here is <b>change mode</b>. Notice how some fields are sunken so they can be edited, and other fields are still flat, so you can't change them for whatever reason. Notice, also, that in addition to the small cursor in the "Path" field which can be difficult to spot on a busy screen, the entire "Path" field is in focus and is therefore shown with a light yellow background. (Thanks to Chris Meares for that improvement.) Easy to spot, and still easy for the user to read the field contents.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Simple, elegant and almost obvious. Except that not everyone does it. So let's see how we can do this in <i>Clarion</i>. Firstly, in the "Global Properties" tab, click on the "Actions" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBM6RIi0bNnLNpOOZujDhq_4ZUHunwRAliHvckD4H7vGspacINgMifuGGmVT643s8HAepvG6o9oaLCGirAQWZr-GulWpNlZQTOsXdhC7abg2mfanUKb9sUaY4qYybtBOVTOxYRhxy3d80HTATYYIhbqiC0o9eXsNikoH0VJ772ANb2bvi6Nrf/s897/AppManifest.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="897" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIBM6RIi0bNnLNpOOZujDhq_4ZUHunwRAliHvckD4H7vGspacINgMifuGGmVT643s8HAepvG6o9oaLCGirAQWZr-GulWpNlZQTOsXdhC7abg2mfanUKb9sUaY4qYybtBOVTOxYRhxy3d80HTATYYIhbqiC0o9eXsNikoH0VJ772ANb2bvi6Nrf/s400/AppManifest.PNG" width="400" /></a></div>
Go to the "App Settings" tab and click on the "Application Manifest" button. The settings shown here are the ones I am experimenting with. In particular, the one labelled "** Do not use Themed Controls **". That prevents <i>Windows</i> from flattening all my buttons and fields. Highly annoying, even if they think it is "cool" or something. Creating the manifest and using the "asInvoker" execution level will also avoid the <i>Windows User Account Control</i> dialog box from appearing every time you try to run the program. Less annoying and more secure. Click "OK" to save these changes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-AZnlR7i1JMnbw7c43owBYA5LbZB3e-q5JZGzHuDvArkmOrcW55jft1l8Aa4qL9jpnBw0Vx3fLzpp8UD9QLdVOzZgHOknIYXsajok1aWR6cLxFVwQk_BGwq1gWVkxpwaD8hB1xbBhEHKjVa54OHZVYsmCJKOidxADUFMEt62JK5umvf5S1vS/s891/Visual%20Indicators.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="664" data-original-width="891" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ-AZnlR7i1JMnbw7c43owBYA5LbZB3e-q5JZGzHuDvArkmOrcW55jft1l8Aa4qL9jpnBw0Vx3fLzpp8UD9QLdVOzZgHOknIYXsajok1aWR6cLxFVwQk_BGwq1gWVkxpwaD8hB1xbBhEHKjVa54OHZVYsmCJKOidxADUFMEt62JK5umvf5S1vS/s400/Visual%20Indicators.PNG" width="400" /></a></div>
Check the "Provide visual indicators on control with focus" checkbox, and click on the "Set visual indicators" button. You can disable the "Box indicator" and "Visual indicator" because the box indicator is horrible and the visual indicator is hardly visible at all.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />So let's look at the options for the "Control Color Indicator". The default yellow background is too bright, so I toned it down to the lightest yellow on the "Basic Colors" tab. And I switched off the bold option because it looks silly. For the "Required Fields" option I chose a very light sky blue. You have to remember to set the field control on the form to required, but it is worth it, particularly for the primary key fields and description fields that follow the primary key.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglkhWJUGlGkbOlpLHYsOBZhxJA6GYGGfTFhM0FWfrodl9z81gUroSjVs5PYgi8BmY1Po9ZNr8Ir5FPpBlJjZdexmqUExUgs5NnoO9MHrdAtc7A8F8_okyCPG4CD0hM5UK0wzx0ZY_Khxm64E75F9HePzYsIKTpryfqUgd7jNvkcpiKq5aHf2NF/s553/Basic%20Edit%20Screen.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="314" data-original-width="553" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglkhWJUGlGkbOlpLHYsOBZhxJA6GYGGfTFhM0FWfrodl9z81gUroSjVs5PYgi8BmY1Po9ZNr8Ir5FPpBlJjZdexmqUExUgs5NnoO9MHrdAtc7A8F8_okyCPG4CD0hM5UK0wzx0ZY_Khxm64E75F9HePzYsIKTpryfqUgd7jNvkcpiKq5aHf2NF/s400/Basic%20Edit%20Screen.PNG" width="400" /></a></div>
Here is a form I am working on. Because the GUID is generated by default, I have flattened and disabled the field altogether. The description field is required, which is why it is in light blue. I think it is dangerous to highlight the entire field like that, but I will put up with it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ZR_LomYPebY0hWFCEi9P4WC3_U6Ve71jghGOI9TFdA12qOoZm3aq8Wf2uVsCFpWVACR87mp1wOUyAM68NXb2TpbO8t8xb_XHXOznH-CSqEvv2xOMoYWAnASGOoux1cSSVFe9JaUftNsgkEh_C9Xz4SPSJeawL_JXT4U5t1pA_sX2K5cV8m5P/s559/Basic%20Edit%20Screen%202.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="320" data-original-width="559" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ZR_LomYPebY0hWFCEi9P4WC3_U6Ve71jghGOI9TFdA12qOoZm3aq8Wf2uVsCFpWVACR87mp1wOUyAM68NXb2TpbO8t8xb_XHXOznH-CSqEvv2xOMoYWAnASGOoux1cSSVFe9JaUftNsgkEh_C9Xz4SPSJeawL_JXT4U5t1pA_sX2K5cV8m5P/s400/Basic%20Edit%20Screen%202.PNG" width="400" /></a></div>
Notice the "sight line" that I have drawn on the screenshot in orange. It lines up the left edges of the fields, and makes the form look neat. But the labels to the left of the sight line are (by default) left justified to the edge of the form, so they start to lose their "connection" with the fields they are supposed to label. Let's fix that.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Select all the labels, and change their justification to "RIGHT". Make them the same width and adjust if necessary if the width is too small. Click on the "Align Rights" button to line them up. Move the group of labels to the right until the window designer indicates you are the correct distance from the fields. Much neater, easier to read, and will work better on different screens because of the right alignment of the labels. Close the window designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOk5QMw0lTilHXE3cEet4ze6SykllyErRkiWdg3Ceu4z5zCXx7RBL6Eg9IvfDzTsbSCsODPfiewmbPyfWfgDDZDfIa6M7qafLg5Kgzio3m1OwX8ymZ_J2taAl7UZRddTPGJ2V2RIOb0TU9AjkGOTtZ4RZ3BsxPm6YDKgpM0ApuLIX6LQrF7vbe/s906/ViewOnly1.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="541" data-original-width="906" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOk5QMw0lTilHXE3cEet4ze6SykllyErRkiWdg3Ceu4z5zCXx7RBL6Eg9IvfDzTsbSCsODPfiewmbPyfWfgDDZDfIa6M7qafLg5Kgzio3m1OwX8ymZ_J2taAl7UZRddTPGJ2V2RIOb0TU9AjkGOTtZ4RZ3BsxPm6YDKgpM0ApuLIX6LQrF7vbe/s400/ViewOnly1.PNG" width="400" /></a></div>
Go to the extensions tab for the form, and find the extension called "Configure View Only form mode". (If it's not there, you can insert it. It's called "ViewFormActions".) Click on "Properties" to see all the relevant controls listed. In this case, we are going to hide the "OK" button, to make it clear that you can't save any changes. Click on "?OK" and choose "properties".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGete1HhXY2nH112XhZHHct3wDIbcDxV2s086vbcCcmNhZ9ivdTvrZigx5LXG9Q5QXAjUhFBEqc06PUsqZmxm3pkkCoETKN98fj7jokY9VneUlKGpggcxT3ocgqW3S79mTO98GToagyQ__Iif-FOtqJNgV66_OHg3BqgIkvILhDrHv-PmU__3g/s826/ViewOnly3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="161" data-original-width="826" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGete1HhXY2nH112XhZHHct3wDIbcDxV2s086vbcCcmNhZ9ivdTvrZigx5LXG9Q5QXAjUhFBEqc06PUsqZmxm3pkkCoETKN98fj7jokY9VneUlKGpggcxT3ocgqW3S79mTO98GToagyQ__Iif-FOtqJNgV66_OHg3BqgIkvILhDrHv-PmU__3g/s400/ViewOnly3.PNG" width="400" /></a></div>
Choose "Hide" from the drop-down list and click "OK". For reasons known only to this extension, the prompt control "set:ExcludeFiles" hasn't been made read only, so please change it to "Read Only", and then click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhdYKEAQ0d8tymO8Db053LlMJtSYRth3uAeLKD-f6p0qTmJXBkmFD5b_tUFY0xiWg2UktaefjRaYF4XCThTlmQDv-rpw48NcNTCKwt8eLdQdi3ntfHFvVdYKkA6TLFflDOQujvLuXz_mHHthD92oIEBA7WTRc1EFwNV7mxiWUxG8fd-XN8V-7c/s704/ViewOnly4.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="596" data-original-width="704" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhdYKEAQ0d8tymO8Db053LlMJtSYRth3uAeLKD-f6p0qTmJXBkmFD5b_tUFY0xiWg2UktaefjRaYF4XCThTlmQDv-rpw48NcNTCKwt8eLdQdi3ntfHFvVdYKkA6TLFflDOQujvLuXz_mHHthD92oIEBA7WTRc1EFwNV7mxiWUxG8fd-XN8V-7c/s400/ViewOnly4.PNG" width="400" /></a></div>
Go to the "Embeds" tab for the form and search for "view only" until you find the section in the "Init" procedure in the "Window Manager". Click on the "Filled Source" button to open the Embeditor at the right place.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRBVZg4wuwgyUJZkxkOo7FPuWxtQrl2bmpxddmZGTk48yO4ehtZ_fs-Luwl_hMTLdfcpxD-lMhfjknCa9wOoAwwkVKyxgjeBkjYFp33zBRopG0hyIGqHqI2I3lUJf6jgOyyB1czMnzOgx930nBtb8tSceayi9OoHSrRY9iqh7ZchwFQ0Q7ZaXp/s543/ViewOnly2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="329" data-original-width="543" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRBVZg4wuwgyUJZkxkOo7FPuWxtQrl2bmpxddmZGTk48yO4ehtZ_fs-Luwl_hMTLdfcpxD-lMhfjknCa9wOoAwwkVKyxgjeBkjYFp33zBRopG0hyIGqHqI2I3lUJf6jgOyyB1czMnzOgx930nBtb8tSceayi9OoHSrRY9iqh7ZchwFQ0Q7ZaXp/s400/ViewOnly2.PNG" width="400" /></a></div>
Here we copy the generated part (highlighted) and paste it into the open section to change it. Comment out any references to check boxes, and then replace all "{PROP:ReadOnly}" parts to "{PROP:Flat}" in the open section. Remove any duplicate lines. Check boxes cannot be made flat, which is why we comment those references out.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTApomE8q01yy_iAc3G_ffYqV1rKi7oSGeRQR71ijCIaablWWt8xTdNwLwB3TpDhjCtHpdpKf6SoRpvXrg6lGogMUr4PNm11r14NMcju8GWZOhQVa2OwZwugfXTbjzllMfTYoUKWsqP0ldfZ8oqKoWYagO3CdOzWK8kCgQlcA1vHEHWkywr76B/s559/ViewOnly5.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="319" data-original-width="559" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTApomE8q01yy_iAc3G_ffYqV1rKi7oSGeRQR71ijCIaablWWt8xTdNwLwB3TpDhjCtHpdpKf6SoRpvXrg6lGogMUr4PNm11r14NMcju8GWZOhQVa2OwZwugfXTbjzllMfTYoUKWsqP0ldfZ8oqKoWYagO3CdOzWK8kCgQlcA1vHEHWkywr76B/s400/ViewOnly5.PNG" width="400" /></a></div>
So we have this in <b>view mode</b><br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrIUuE3U5rNfmzs03hXMiyQqdQ_dXGlEMTONEiuEIedsJmMv1a_22MakZctG6FKL3JDfQNwP98tAZ8-aFBm1PnRflWTQnEjqgv2hMuKC-ZJmuJos3jAPEvlL7GoJFdASwiIK3bKG6ihR00TgglxIgD2XT68aE-8b9PkZriZjHQxOHXbox6uOj/s556/ViewOnly6.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="316" data-original-width="556" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizrIUuE3U5rNfmzs03hXMiyQqdQ_dXGlEMTONEiuEIedsJmMv1a_22MakZctG6FKL3JDfQNwP98tAZ8-aFBm1PnRflWTQnEjqgv2hMuKC-ZJmuJos3jAPEvlL7GoJFdASwiIK3bKG6ihR00TgglxIgD2XT68aE-8b9PkZriZjHQxOHXbox6uOj/s400/ViewOnly6.PNG" width="400" /></a></div>
and the same form in <b>change mode</b>. Personally, I think the improved layout and additional visual cues are worth the effort.
<blockquote>Remember: <b>good layout is invisible</b>, it just draws you in to the important parts of the screen. <b>Bad layout is immediately obvious</b>, and confusing.</blockquote>
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-1-using-app.html">Clarion Fixer (Part 1): Using the App</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">Clarion Fixer (Part 2): The Code</a> ]<br />
[ <a h.ref="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html">Change Mode vs View Mode</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Introducing Clarion FileManager (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br />
</div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-85121044518804862162023-09-25T12:19:00.010+02:002023-10-14T18:35:00.152+02:00Clarion Build Events<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
Often when I am busy on a <i>Clarion</i> project, I notice something I want to fix or change, and dive straight into the code, forgetting to close the application that is still running. This causes a problem when I try to do a new build, because it can't create the new .exe file while the old one is still in use.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><i>Clarion</i> Enterprise Edition (EE) users have an option to deal with this (see update below), but I have the Professional Edition (PE) and the option isn't available. <i>Microsoft SysInternals</i> to the rescue! In particular, their <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/pskill" target="_blank">PsKill</a> and <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/pslist" target="_blank">PSList</a> utilities. I made a batch file with the following commands:
<pre>@echo off
pskill -t project.exe
pskill -t Debug++.exe
pslist > nul</pre>
Replace "project.exe" with the name of the actual exe you are working on. Save the file as <b>project-old.bat</b> or something similar. Theoretically, only <i>PsKill</i> would be required, but if the project.exe isn't running, <i>PsKill</i> will return an error message and the build will fail. <i>PsList</i> solves this by listing the running tasks, and doesn't return an error, so the build will continue.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHEa1bn_enVb_vWuf9Iqy_PhFLpwpYnjM1ZykkH8Wk84s1PGE0z4KZwTJfC32rgqrO9klMeCVNLoIeNfwR2QzPESBS-zCq1mcCVauiTCg2OSTAZ8kXdllkrLgQKLNAUo3qF-wzXg1uu3Iq4mM7P5nPQN75vrhfwWX9YR4fc0qDmRv8mzAr92r/s693/Build%20Events%201.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="432" data-original-width="693" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvHEa1bn_enVb_vWuf9Iqy_PhFLpwpYnjM1ZykkH8Wk84s1PGE0z4KZwTJfC32rgqrO9klMeCVNLoIeNfwR2QzPESBS-zCq1mcCVauiTCg2OSTAZ8kXdllkrLgQKLNAUo3qF-wzXg1uu3Iq4mM7P5nPQN75vrhfwWX9YR4fc0qDmRv8mzAr92r/s400/Build%20Events%201.png" width="400" /></a></div>
From the menu, choose "Project", then "Project Options", "Build Events" and type in the name of your <b>project-old.bat</b> file.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Wondering what the Post-build event command line is all about? It's explained in the article: "<a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">Backing up your Clarion projects</a>".<br>
<br /><b>Update</b>: The EE option is "Tools" -> "Options" -> "IDE" -> "Projects and Solutions" -> "Kill running process before build".<br>
<br>
<b>Update Tesday 2 Otcober 2023:</b> I have updated Zippy.exe to be able to automatically launch the DebugView++.exe program, and project-old.bat now includes a line to close DebugView++.exe if it is running. So you get a fresh <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html" target="_blank">debug window</a> when you build a new app.<br>
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-1-using-app.html">Clarion Fixer (Part 1): Using the App</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">Clarion Fixer (Part 2): The Code</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html">Change Mode vs View Mode</a> ]<br />
[ <a h.ref="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Introducing Clarion FileManager (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br />
</div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-76810833053036383042022-12-17T21:30:00.029+02:002023-10-20T13:27:22.671+02:00Introducing Clarion FileManager (Part 1)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
<i>Clarion</i> can generate the forms you need to add, change and delete data manually, but what do you do when you want to manipulate records using code? We have briefly looked at <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html" target="_blank">importing CSV data</a>, but that isn't all we need to do. Introducing <b>FileManager</b>: look in the help file. It's under "ABC Library Reference" and it has numerous useful properties and methods.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPvYe9GaG6AML9RrUhVijXW5IgdfP6ugqfLVRFhspPkpx3Btdc_cNudAwaSehg95y2lniDdyVVkJHxNqkt8sBpKaqRUlzkhZ2xtksT0j3iAclFo1lTXDMOSvMp15rvuZ64vG0YzNRerModwa2KIbgAWFfaVU5pDppVm5RXlz60iquy9c9qoQ/s939/FileManager%20Help.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="285" data-original-width="939" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPvYe9GaG6AML9RrUhVijXW5IgdfP6ugqfLVRFhspPkpx3Btdc_cNudAwaSehg95y2lniDdyVVkJHxNqkt8sBpKaqRUlzkhZ2xtksT0j3iAclFo1lTXDMOSvMp15rvuZ64vG0YzNRerModwa2KIbgAWFfaVU5pDppVm5RXlz60iquy9c9qoQ/s400/FileManager%20Help.PNG" width="400" /></a></div>
First, the <b>naming convention</b>. Say we want to work with the table called "Customer". The we use "Access:Customer.Method()" to refer to the table and its records, and CUS:FieldName to refer to individual fields in the current record. Because <i>Clarion</i> documentation often refers to "files" when it means "tables", "FileManager" should really be named "TableManager", but this is an historical artefact from DOS days, where tables were stored in separate files.<br />
<b>Note</b>: This article has been updated to leave out the .Init and .Kill methods, and to simplify the SET command. If you first read the article in 2022 then you should see the changes now. The .Init and .Kill methods are only useful in standalone handwrittten programs, and are handled automatically in a Wizard-generated program like the <i>Learning Clarion</i> application. Thanks to Carl Barnes at <a href="https://clarionhub.com/t/introducing-clarion-filemanager/5760" target="_blank"><i>ClarionHub</i></a> for pointing out my (newbie) mistakes.<br>
<br />
<h2>Common Table Methods</h2>
<ul>
<li><b>UseFile</b> notifies other ABC objects that a file is getting ready to be used. Do this before you use Open.</li>
<li><b>*Open</b> tells the FileManager the calling procedure is using the file, then OPENs the file if it is not already open. The Open method handles any errors that occur while opening the file, including creating the file and rebuilding keys if necessary.</li>
<li><b>ClearKey</b> clears or (re)initializes the specified range of key component fields.</li>
<li><b>SET</b> initializes sequential processing of a FILE or VIEW.</li>
<li><b>*Next</b> gets the next record in sequence. The Next method handles any errors, except end of file, that occur while getting the record.</li>
<li><b>*Fetch</b> Gets a specific record by its key value and handles any errors.</li>
<li><b>PrimeRecord</b> prepares a record for adding to the managed table.</li>
<li><b>*Insert</b> adds a new record to the file, making sure the record is valid, and automatically incrementing key values as required.</li>
<li><b>*Update</b> changes (rewrites) the current record.</li>
<li><b>DeleteRecord</b> deletes a record from the table.</li>
<li><b>Close</b> tells the FileManager the calling procedure is done with the table, then closes the table if no other procedure is using it.</li>
</ul>We will use some examples to make this a bit less overwhelming. Methods marked with an asterisk have a (better) version, by preceding the method name with "Try" to get TryOpen instead of Open, etc.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifIKl1NDnPjZALoyJCkjUCdg-2kLQW60jqGNtUFoA65L95LZvnbghgmHcMALRwJzt0K7bMiIi3RiIC7lGQ6jFaOeF1yFzo4ajkYVyzzpgp7jFlglfh5eUG3NLvmvJ58P_f4t2M4DORJ3FF0WYQUkVorQE0gvjIoWINJemmszYzvAydIetqg/s646/FileManager01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="248" data-original-width="646" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiifIKl1NDnPjZALoyJCkjUCdg-2kLQW60jqGNtUFoA65L95LZvnbghgmHcMALRwJzt0K7bMiIi3RiIC7lGQ6jFaOeF1yFzo4ajkYVyzzpgp7jFlglfh5eUG3NLvmvJ58P_f4t2M4DORJ3FF0WYQUkVorQE0gvjIoWINJemmszYzvAydIetqg/s400/FileManager01.png" width="400" /></a></div>
One thing I have noticed with .TPS files is they never seem to have a record number 1. The lowest record number is always 2. Clearly this is not the case with <i>all</i> table structures in <i>all</i> database types, but it's a useful conceptual point to bear in mind when we loop through records using FileManager's .Next method. It's why the loop always starts with .Next, even if we have already moved to the correct record.<br />
<br />
<h1>Exercise 1: Some Test Code</h1>
First, let's return to the "LCLesson" application. If you don't have one, you can <a href="https://mustang.co.za/file/LearningClarion%202022-12-28.zip" rel="nofollow">download</a> it and extract the files.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBzKMmaQXYQnNSrBUym7LKP9DGaRpWTi4Q3AdBTJbYdAe8hsNSzPcznOEEyIyaSdWIT-rR1R5hV_z0NaZKmq5gPzDam9bd2wvL4WsMyEHtZfTa9GNydsZCLWdrgyGbEP84U-DRvmPx6JQh19gElWgrA6q-UieO9JxAMr00aX5BYNbO2LM4ww/s817/Lesson01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="482" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBzKMmaQXYQnNSrBUym7LKP9DGaRpWTi4Q3AdBTJbYdAe8hsNSzPcznOEEyIyaSdWIT-rR1R5hV_z0NaZKmq5gPzDam9bd2wvL4WsMyEHtZfTa9GNydsZCLWdrgyGbEP84U-DRvmPx6JQh19gElWgrA6q-UieO9JxAMr00aX5BYNbO2LM4ww/s400/Lesson01.png" width="400" /></a></div>
Click on the "Application" menu, and choose "New Procedure".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivp56fxxo-ZlpIB_amI-M5yoh5d1GxyNoPbF85Sjc9dn3thcuAf0XbPi9j_DlDVMrZzH-vtsp5FCVdagcxtYhkp9d3ZoW9vo2hlhLU-RQw-vqI8r726WBX_vwKUOiVZnqezLnZy9qk-pLvMNndaMmaiM6tmnSNd0RicS2zF-XFMG_BcvU8kQ/s616/Lesson02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="616" data-original-width="542" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivp56fxxo-ZlpIB_amI-M5yoh5d1GxyNoPbF85Sjc9dn3thcuAf0XbPi9j_DlDVMrZzH-vtsp5FCVdagcxtYhkp9d3ZoW9vo2hlhLU-RQw-vqI8r726WBX_vwKUOiVZnqezLnZy9qk-pLvMNndaMmaiM6tmnSNd0RicS2zF-XFMG_BcvU8kQ/s400/Lesson02.png" /></a></div>
Type in the Procedure Name, "MyTestCode".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOLHNM3VQqCgc7jLX3x0ppmg54PcIygpX1vs2pxJjoZBdQkfC_USyyHGlOHl_uHLrVWabJTIEUfzxnqQtKWmLaflq_B7BcbcJ9t6n8-OVizC3E_SFeiA0oorygszONoJeINTOPtX7NhrxCkzovkPkPywoYEYM1XBQMRxxMYH1rAxFBw4jtZw/s639/Lesson03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="403" data-original-width="639" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOLHNM3VQqCgc7jLX3x0ppmg54PcIygpX1vs2pxJjoZBdQkfC_USyyHGlOHl_uHLrVWabJTIEUfzxnqQtKWmLaflq_B7BcbcJ9t6n8-OVizC3E_SFeiA0oorygszONoJeINTOPtX7NhrxCkzovkPkPywoYEYM1XBQMRxxMYH1rAxFBw4jtZw/s400/Lesson03.png" width="400" /></a></div>
From the "Defaults" tab, select "Source Procedure". This will create a standalone procedure in its own module.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8QVVtBfcA8oN9w-fSOc5CNUNPOr8YUQQRbqpuiXdIrMS2P9hUa683LpklO-XAcjO_0efxm5-VB_SDSIFq2IYN8WiioqUei331JLAsPKL-dCPkUknWv1GIY5_Ja3Tu_BsNqueAvDyB9vWc4VOxo3rjfE9duXhkGChmJCIaPI9lqGRNlJSE0g/s572/Lesson04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="424" data-original-width="572" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8QVVtBfcA8oN9w-fSOc5CNUNPOr8YUQQRbqpuiXdIrMS2P9hUa683LpklO-XAcjO_0efxm5-VB_SDSIFq2IYN8WiioqUei331JLAsPKL-dCPkUknWv1GIY5_Ja3Tu_BsNqueAvDyB9vWc4VOxo3rjfE9duXhkGChmJCIaPI9lqGRNlJSE0g/s400/Lesson04.png" width="400" /></a></div>
Give the procedure a Description, and click on the "Declare Globally" box. Then click on the green check box ("Save and Close") and <b>Save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP-f2RIFK4IGwnl12ER-HC6J9IJFxt_cxc4U7vtTrGtU5e5Ik3gnPIAli25CtnPLR3Xr6HTCYPMiLj4EMos61nDOfnK6AKX33_z_MgCp4-cnKY-VChKtjS04E0weyaOXwnadmcMxG6B1WifFSaja07kVTT28zawqQO3KzWhH6ZD5MgsmpYVA/s996/Lesson05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="543" data-original-width="996" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP-f2RIFK4IGwnl12ER-HC6J9IJFxt_cxc4U7vtTrGtU5e5Ik3gnPIAli25CtnPLR3Xr6HTCYPMiLj4EMos61nDOfnK6AKX33_z_MgCp4-cnKY-VChKtjS04E0weyaOXwnadmcMxG6B1WifFSaja07kVTT28zawqQO3KzWhH6ZD5MgsmpYVA/s400/Lesson05.png" width="400" /></a></div>
Notice how the procedure is not "connected" to anything yet. That means that no other code or form calls the procedure. To fix this, we are going to add the procedure to the application menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtojErbubZXF14MoUcWSxdJ9bxr-RpGwQZnT10kR_iMSJbUwpMKxYNR3Q3iVFbouEq244jjzd6zrFpxQKldoNUh3QlcWhReIT3x_RPx_TFzdrN_W_dePTT3hqX256t6iYyaN_eb0_F0n7u6o8b-xZiPT4dQpqBSlbMkln03rLnamqNES-WUg/s1001/Lesson06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="528" data-original-width="1001" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtojErbubZXF14MoUcWSxdJ9bxr-RpGwQZnT10kR_iMSJbUwpMKxYNR3Q3iVFbouEq244jjzd6zrFpxQKldoNUh3QlcWhReIT3x_RPx_TFzdrN_W_dePTT3hqX256t6iYyaN_eb0_F0n7u6o8b-xZiPT4dQpqBSlbMkln03rLnamqNES-WUg/s400/Lesson06.png" width="400" /></a></div>
Click on the "Main (Frame)" procedure and then click on the "Window" button to go into the window designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEJnUwzDTO1kQrrEohbLh0yeZNYAw5XsdtL1arfsfIBp1JabuSpYmuvTo2RH0LN_2AtHXIGWfyGuE6D7fjMRliuHet1fcRBvMEZQWt8ZV3nn9D8KjpKtnT2hMwhqPVT0l-A02iHFdvhJP1NBiXIqF3d6H4toncIE7X-L3X7p6bt8lngwVM9Q/s618/Lesson07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="563" data-original-width="618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEJnUwzDTO1kQrrEohbLh0yeZNYAw5XsdtL1arfsfIBp1JabuSpYmuvTo2RH0LN_2AtHXIGWfyGuE6D7fjMRliuHet1fcRBvMEZQWt8ZV3nn9D8KjpKtnT2hMwhqPVT0l-A02iHFdvhJP1NBiXIqF3d6H4toncIE7X-L3X7p6bt8lngwVM9Q/s400/Lesson07.png" width="400" /></a></div>
Right-click on the menu control, and choose "Edit menu" from the drop-down menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoz_0LLg3baN76wVVMqgzT2p7xAfXbraMVqa4u8MrRj8vTwrttyHIe6KiW2kKXusuYbop5unYG6rDke-03SfTNAaAIZz3Tc1BIP9WEC34FFFhZDOMsjPIbfW_pUFJ5iKL76-bOxXPs9Vw9-uh2CGgIaaCIqru7mhMgzb_Uzq3M6B2QJ0hqaQ/s996/Lesson08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="559" data-original-width="996" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoz_0LLg3baN76wVVMqgzT2p7xAfXbraMVqa4u8MrRj8vTwrttyHIe6KiW2kKXusuYbop5unYG6rDke-03SfTNAaAIZz3Tc1BIP9WEC34FFFhZDOMsjPIbfW_pUFJ5iKL76-bOxXPs9Vw9-uh2CGgIaaCIqru7mhMgzb_Uzq3M6B2QJ0hqaQ/s400/Lesson08.png" width="400" /></a></div>
Click on the "&Browse" menu item (MENU3) and change it to " &Data ", with a space before the ampersand and another after the word data. I think it looks nicer this way, but it's only a personal preference.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmRiHHZA4ux__z7JdI0u_snP6sojprG0ddNYAqEpKn8LYc2OtC4uDUea7ilWMVlImmvUKvbb9peDNXv7YdjPQoGS2yHsB097GXsgpYmhUN6vXERhKn6icLS9aSrD_W7A2hGuwT3l8Fl7mQb5f0lvgypfxv5gZMZr5Gvr8vvTL8OUkU1YeDVA/s993/Lesson09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="616" data-original-width="993" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmRiHHZA4ux__z7JdI0u_snP6sojprG0ddNYAqEpKn8LYc2OtC4uDUea7ilWMVlImmvUKvbb9peDNXv7YdjPQoGS2yHsB097GXsgpYmhUN6vXERhKn6icLS9aSrD_W7A2hGuwT3l8Fl7mQb5f0lvgypfxv5gZMZr5Gvr8vvTL8OUkU1YeDVA/s400/Lesson09.png" width="400" /></a></div>
Click on the "BrowseOrders" line, and add a Separator. Then add a New Item. The text for this item is "&Test Code" and the message is "Run my test code". Then click on the "Actions ..." link.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJ_XOLBruKS_xZq4MChEsX56Y2OLWNTQRyLNPNIljGe8VZ6l4sDZ55tO2TItfdX5HBCCCOX56ctizXzrj6yikaiqCIpmbNxO07V_yjEfk_AnTAgTO6g4plu3qpbqDYqGyCcHbyEkpPYemGL612bFLwD-U42ldQljx_x-KCz3NKYh5nMRv6g/s827/Lesson10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="344" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlJ_XOLBruKS_xZq4MChEsX56Y2OLWNTQRyLNPNIljGe8VZ6l4sDZ55tO2TItfdX5HBCCCOX56ctizXzrj6yikaiqCIpmbNxO07V_yjEfk_AnTAgTO6g4plu3qpbqDYqGyCcHbyEkpPYemGL612bFLwD-U42ldQljx_x-KCz3NKYh5nMRv6g/s400/Lesson10.png" width="400" /></a></div>
Change the action to "Call a Procedure" and choose the "MyTestCode" procedure from the drop-down list. Check the "Initiate Thread" box, click "OK", click on the green "Save and Close" buttons (twice) to return to the main procedure screen. Notice how the "MyTestCode" is linked to the "Main (Frame)" window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9YareoCugokks5gBnRzikMhkRiy8cUTcYrgCakI7LO-TDS5b4C95U7jbrmE6Bv2wRjU12Iu_nE3qN2lDdrJWiufZk6bYH_oW33GybFG456Iky-Dj0Bomw_6yZCpKJvu0LZAbNKhXQ32K9Y1_jjntU3CDDSgnWtcU-n4X-t8XbhbYAbZNeMw/s997/Lesson11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="564" data-original-width="997" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9YareoCugokks5gBnRzikMhkRiy8cUTcYrgCakI7LO-TDS5b4C95U7jbrmE6Bv2wRjU12Iu_nE3qN2lDdrJWiufZk6bYH_oW33GybFG456Iky-Dj0Bomw_6yZCpKJvu0LZAbNKhXQ32K9Y1_jjntU3CDDSgnWtcU-n4X-t8XbhbYAbZNeMw/s400/Lesson11.png" width="400" /></a></div>
Click on "MyTestCode" and then on the "Embeditor" button. Now we can get the procedure to do something.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXnfhwKTnhbryH93PJmVs_V1suKSwNwkg9suSnyuoaI8S8jSygqnn_5kmI6KjQCp1TaNO2ndPMqbXfTpkCzA_upp16qdOnrueuOnzhblSPf3yII3fmZJnwKKugexBN_YZpS5txLT0t8YmRANgfAtigF6RcheiSwHaaHlAjoh0k_BnhOmw_SQ/s743/Lesson12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="624" data-original-width="743" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXnfhwKTnhbryH93PJmVs_V1suKSwNwkg9suSnyuoaI8S8jSygqnn_5kmI6KjQCp1TaNO2ndPMqbXfTpkCzA_upp16qdOnrueuOnzhblSPf3yII3fmZJnwKKugexBN_YZpS5txLT0t8YmRANgfAtigF6RcheiSwHaaHlAjoh0k_BnhOmw_SQ/s400/Lesson12.png" width="400" /></a></div>
Scroll down a bit and type in "MESSAGE('My Test Code')" as shown. Click on the green "Save and Close" button and <b>save your work</b>.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT_xlhPz9ppI9leVzzROjJJaMuS9pFfyiQCNMr4CxKOTo4I3c-ss_jA72JzaJ3dd5f4c3Uzc6ZUmGXPIoS9C-fBUd_DdNeGh0aSD79huCNVBQ9QwkRxmG_ojH0t15QpCg_29cpwWAL4ij_XRGUu_ZTwvafZwVciG7ev7BRAS4oo3Bbfeh5zA/s1029/Lesson13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="836" data-original-width="1029" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT_xlhPz9ppI9leVzzROjJJaMuS9pFfyiQCNMr4CxKOTo4I3c-ss_jA72JzaJ3dd5f4c3Uzc6ZUmGXPIoS9C-fBUd_DdNeGh0aSD79huCNVBQ9QwkRxmG_ojH0t15QpCg_29cpwWAL4ij_XRGUu_ZTwvafZwVciG7ev7BRAS4oo3Bbfeh5zA/s400/Lesson13.png" width="400" /></a></div>
Go to "Global Extensions" and make sure that the "UltimateDebug" extension is showing. Click on it and click on "Ultimate Debug Generation Options" and check that the two global information options are selected. Then click OK (twice) and save your work. Click on the shortcut on the taskbar to run <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html" target="_blank"><i>DebugView++</i></a>, and then on Clarion's "Start without Debugger (Builds Application)" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHFmJ8oZCVwHTOybN90VyhEFnY7sj3c6fO_LoispdKCxpakd7srzxXfWyFqkJP9gGVUji27gKblKXiQpOhxMvT36r1kG567VZogcyu-JW-B_L_te1yplVQ3iqnhTB7mTQd0qQzt_mn_vghLkAmyUs1D26ZJMOSco54dBoLkcMj6g7zDh7LrA/s1109/Lesson14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="422" data-original-width="1109" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHFmJ8oZCVwHTOybN90VyhEFnY7sj3c6fO_LoispdKCxpakd7srzxXfWyFqkJP9gGVUji27gKblKXiQpOhxMvT36r1kG567VZogcyu-JW-B_L_te1yplVQ3iqnhTB7mTQd0qQzt_mn_vghLkAmyUs1D26ZJMOSco54dBoLkcMj6g7zDh7LrA/s400/Lesson14.png" width="400" /></a></div>
The <i>DebugView++</i> capture window will probably show something like this. Now go to the "Data" menu item and choose "Test Code".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiErYpw4m4gcuBKGpkZ7RDrFeJnyOonSwWxMdph8VpTOIPGS75x_NB3o_wXsNLohSReI5uBExVN3thio2Ete41JMt2L2Kkuu1PVYzFtYOyjU4OWywVBlUlDNOjr0f297_oVXvp7UOR8ZQd2AsdkKOK_1jGSQVmUYC6q5LeH93l3S-KULL-ugw/s1125/Lesson15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="713" data-original-width="1125" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiErYpw4m4gcuBKGpkZ7RDrFeJnyOonSwWxMdph8VpTOIPGS75x_NB3o_wXsNLohSReI5uBExVN3thio2Ete41JMt2L2Kkuu1PVYzFtYOyjU4OWywVBlUlDNOjr0f297_oVXvp7UOR8ZQd2AsdkKOK_1jGSQVmUYC6q5LeH93l3S-KULL-ugw/s400/Lesson15.png" width="400" /></a></div>
So in addition to the application displaying the message, the DebugView++ window is showing the fact that we entered ("[OpenClose]") the "MyTestCode" procedure. Click on the "OK" button and close the LCLesson application. Let's return to the "MyTestCode" procedure in the Embeditor.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfyGBD1EzhLqEHdvwVGgS3zla4HUYpLqk1TKlY_uMQWIRkPGeOncFAiTBqV1yov16RUlw3_oussY7zIurIKln7iVLPerSwcnafQC_JsZm3HwbtaSCMJRT2b7Ph65-e8KFRPd09HNKqvldEppiqgH3-mMloxCZDXy0WIB5ycE36BGQf_5W_YQ/s847/Lesson12a.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="609" data-original-width="847" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfyGBD1EzhLqEHdvwVGgS3zla4HUYpLqk1TKlY_uMQWIRkPGeOncFAiTBqV1yov16RUlw3_oussY7zIurIKln7iVLPerSwcnafQC_JsZm3HwbtaSCMJRT2b7Ph65-e8KFRPd09HNKqvldEppiqgH3-mMloxCZDXy0WIB5ycE36BGQf_5W_YQ/s400/Lesson12a.png"/></a></div>
Change the "MESSAGE" command to the two lines shown here:
<pre> 0{PROP:StatusText,1} = 'My Test Code'
ud.Debug('---- My Test Code runs here ----')</pre>
Now, when you run the application and choose the "Test Code" menu item, "My Test Code" will display in the application's status bar, and you will get a message in DebugView++. Something like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP1vOnnuMiBElFnhYC0SG-BaWTMqg84qcwY5ocJhtYxAqqcEDQfqUa_n9RwAM9EaYoV9sf36IhrU0O8tGXfYmWInO3qfcTFARk8OQRxbhZm21eMk_jtJiYhCcnO1mfzQmj8qNb-aH9F6FJBehcTwk54f6cNvdSZZPChI5sqtCe0Q_6Eyp2OA/s1109/Lesson17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="422" data-original-width="1109" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP1vOnnuMiBElFnhYC0SG-BaWTMqg84qcwY5ocJhtYxAqqcEDQfqUa_n9RwAM9EaYoV9sf36IhrU0O8tGXfYmWInO3qfcTFARk8OQRxbhZm21eMk_jtJiYhCcnO1mfzQmj8qNb-aH9F6FJBehcTwk54f6cNvdSZZPChI5sqtCe0Q_6Eyp2OA/s400/Lesson17.png" width="400" /></a></div><br />
<br />
<h1>Exercise 2: Reading The Customer Table Records</h1>
Open LCLesson and use the Embeditor to edit "MyTestCode".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjan-uHB2tArtIM3Yffyw8T9XoDbEVtBlEYxourQn3DZLBNWQXsPgTvz08iRRLuk-BBVKmSRBEpUYANcB1uqBWK1rpVTSAgdSX3-E6SWUMusJMUA9oJW0VrD4Rc3jrhaeIONC3K0jQkUzcNfNjfoOj3_8W7kfMZVLP_G4MYHsgNDPpawcC76g/s912/Lesson2-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="708" data-original-width="912" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjan-uHB2tArtIM3Yffyw8T9XoDbEVtBlEYxourQn3DZLBNWQXsPgTvz08iRRLuk-BBVKmSRBEpUYANcB1uqBWK1rpVTSAgdSX3-E6SWUMusJMUA9oJW0VrD4Rc3jrhaeIONC3K0jQkUzcNfNjfoOj3_8W7kfMZVLP_G4MYHsgNDPpawcC76g/s400/Lesson2-01.png" width="400" /></a></div>
Define a variable "i" of type "long" at the top of the procedure as shown. Then click on the "Data/Tables" tab, followed by the "Other Files" folder, and click on the "Add" button (shown in the blue circle above). Choose the "Customer" table and click "Select".<br />
Copy and paste the following code to replace the original two lines of code:<br />
<pre> Access:Customer.UseFile()
Access:Customer.Open()
ud.Debug(' Access:Customer.Open()')
i = 0 ! Record counter
LOOP UNTIL Access:Customer.Next() <> Level:Benign ! CUS loop
!// Process each customer record
i += 1 ! Count the records
ud.Debug(' Customer record ' & i)
0{PROP:StatusText,1} = 'Customer record ' & i
END ! CUS loop
ud.Debug(' Loop ends. There are ' & i & ' records')
0{PROP:StatusText,1} = 'There are ' & i & ' records'
Access:Customer.Close()
ud.Debug(' Access:Customer.Close()')</pre>
Once you have pasted the code, highlight it and press Ctrl-i to get the indenting to work properly. Warning! This code has no error checking. It is not production quality yet.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtxCKHeqF_l4h1Rh500gO10-8raD3d8wqVpAzXka8pVHwsHscTkh8MNpn59FhNJ8AZ64OeXjzf2RhQHi_AOavFwbkJWbq1lrBuxMCygkcpSho7QOZm2F01dZ3ykR36453KQW2iKSw9cMxSjjtP3aHvcRslbGBP_0-E4QymgO90mBChfwxHOQ/s873/Lesson2-02.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="579" data-original-width="873" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtxCKHeqF_l4h1Rh500gO10-8raD3d8wqVpAzXka8pVHwsHscTkh8MNpn59FhNJ8AZ64OeXjzf2RhQHi_AOavFwbkJWbq1lrBuxMCygkcpSho7QOZm2F01dZ3ykR36453KQW2iKSw9cMxSjjtP3aHvcRslbGBP_0-E4QymgO90mBChfwxHOQ/s400/Lesson2-02.png"/></a></div>
Will this code do anything? Let's run it to find out. Click on the green "Save and Close" button, and <b>save your work</b>. Click on the "Start without Debugger (Builds Application)" button to build the application and then try running the test code.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDsneFe-IaOyVS1hyz-4-8nIzrKTBAa-UowoJkwiDj7lkDIHPqiDemI3LAF131monmiqA35BT2UNWoDww5oR_2fiPgm8LtdMwCZo-9PbvQTJhelWBD57EBt_95tw1xr5A_kHzt01oGJYyfycMarbqyAUJb73M38Rmur_Rag4o379SA1r9h4g/s1051/Lesson2-03.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="221" data-original-width="1051" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDsneFe-IaOyVS1hyz-4-8nIzrKTBAa-UowoJkwiDj7lkDIHPqiDemI3LAF131monmiqA35BT2UNWoDww5oR_2fiPgm8LtdMwCZo-9PbvQTJhelWBD57EBt_95tw1xr5A_kHzt01oGJYyfycMarbqyAUJb73M38Rmur_Rag4o379SA1r9h4g/s400/Lesson2-03.png"/></a></div>
It didn't work as expected. Why? Because opening the table isn't enough. We have to navigate to the correct record before the loop begins. We need an index to do that, preferably the primary key.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHnrPUhCo6uWjh4awow1SwAAjzhFyOzsu4Pch6pgr5wr1kwv0tTMm6qFYO2r0TvqhiQsYM5ia4zoE60EZHg_-Y65sRiBIvk_bJP9jmt6xSH-d6zlmwbaOo5gjqR54ia6H7LfGf-6LKXhn9uQzoakmrPF0FGyYtHm9P3BhZn3QwRnX9ettykQ/s969/Lesson2-04.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="569" data-original-width="969" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHnrPUhCo6uWjh4awow1SwAAjzhFyOzsu4Pch6pgr5wr1kwv0tTMm6qFYO2r0TvqhiQsYM5ia4zoE60EZHg_-Y65sRiBIvk_bJP9jmt6xSH-d6zlmwbaOo5gjqR54ia6H7LfGf-6LKXhn9uQzoakmrPF0FGyYtHm9P3BhZn3QwRnX9ettykQ/s400/Lesson2-04.png"/></a></div>
Make a few blank lines above the "i = 0 ! Counter" line, and type in "Access:Customer.ClearKey()". Then drag the name of the primary key ("KEYCUSTNUMBER") from the Data/Tables pad on the left, and drop it between the two brackets after "ClearKey". Add in a comment "! Go to the top of the primary key" after the ClearKey statement. Put a "ud.Debug" line as shown below.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBnOrXei0CIeCrNM1FuQDIyo6Ydm1wHfquwB8vlAIUtDQoFiERjKMwn4seqUJNr5uR1kg7plFBqiJu0x2TpW3hoiwpi38PUzPfb9wCZ28Yz2x_DmV3abKOsT_yS5r37PneJwRmwunCm_C2sHfEG2xn0Izvg9lFRPeAXxSCSa3TF67xqRVBQw/s912/Lesson2-05.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="599" data-original-width="912" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBnOrXei0CIeCrNM1FuQDIyo6Ydm1wHfquwB8vlAIUtDQoFiERjKMwn4seqUJNr5uR1kg7plFBqiJu0x2TpW3hoiwpi38PUzPfb9wCZ28Yz2x_DmV3abKOsT_yS5r37PneJwRmwunCm_C2sHfEG2xn0Izvg9lFRPeAXxSCSa3TF67xqRVBQw/s400/Lesson2-05.png"/></a></div>
Type in SET() on a new line. Drag the primary key name to the brackets after SET(). Or you can copy/paste it in instead of dragging. The SET command says which index we will search/fetch on, and the sort order in which we will access the records. Usually, these are both the same. Follow this with a comment "! Sets the processing order" and put a "ud.Debug" statement on the next line. Your code should look like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjueGOF6rIFjgSxCnSowroPc3ztHVT9tKGvzpwfDrQhr18N9pOpfV6iHkLtezdWy6qS0AWDAUfl9OxWQILFv6TbpscziWrf3fea7eoOHdysvnRnAv0XPuD1F5tQf3786Y5js2Hud1gR8LdzrZJ0mSR5NxSIQFN4zfUxHrhssjBZzTxX-FM9Rw/s582/Lesson2-06.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="517" data-original-width="582" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjueGOF6rIFjgSxCnSowroPc3ztHVT9tKGvzpwfDrQhr18N9pOpfV6iHkLtezdWy6qS0AWDAUfl9OxWQILFv6TbpscziWrf3fea7eoOHdysvnRnAv0XPuD1F5tQf3786Y5js2Hud1gR8LdzrZJ0mSR5NxSIQFN4zfUxHrhssjBZzTxX-FM9Rw/s400/Lesson2-06.png"/></a></div>
Use the green "Save and Close" button, <b>save your work</b>, and start the application as usual.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTu0bp9lKzhfaOJn0v1GJ4RAbpNf6acdEX87kSMv8M0nsjDl6Fe1pOfAiq6iW6sHGZ4lvjcFjXpmINIOwAePw53CThGGj16-dKNCvacyni-kzXL4btha2x5Qcd9fBPWVKoT84l0iDHQ4h2YkE_ZSswErhhjUif8XIOQZl2avRlePrgqG8DiQ/s853/Lesson2-07.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="634" data-original-width="853" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTu0bp9lKzhfaOJn0v1GJ4RAbpNf6acdEX87kSMv8M0nsjDl6Fe1pOfAiq6iW6sHGZ4lvjcFjXpmINIOwAePw53CThGGj16-dKNCvacyni-kzXL4btha2x5Qcd9fBPWVKoT84l0iDHQ4h2YkE_ZSswErhhjUif8XIOQZl2avRlePrgqG8DiQ/s400/Lesson2-07.png"/></a></div>
This time it did what we expected it to: it looped through all 8 customer records. So let's read and show the data.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkdmVs-4XiI7Vtb2YMIGHiXt7pJNgBnH7nl8ghgyBPlEMlkFmBgDbqkrTSN1gQ177k9A-pFk7XwE-bbG5ZaC1q8fPm9HE5u-x4hHMYQMTcU5XpHsuOROn6ibaXhZilEErZIvmafejrVr2GFgDKIJec6mcCeSRb4XlGecYWkuo3sqSBYl4tqQ/s795/Lesson2-08.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="597" data-original-width="795" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkdmVs-4XiI7Vtb2YMIGHiXt7pJNgBnH7nl8ghgyBPlEMlkFmBgDbqkrTSN1gQ177k9A-pFk7XwE-bbG5ZaC1q8fPm9HE5u-x4hHMYQMTcU5XpHsuOROn6ibaXhZilEErZIvmafejrVr2GFgDKIJec6mcCeSRb4XlGecYWkuo3sqSBYl4tqQ/s400/Lesson2-08.png"/></a></div>
Change the code as shown. Use the green "Save and Close" button, save your work, and start the application again.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijqX7K7opJSND2XGhibM9yKyOt3ze9Vo3ZB_R9BqfzZG9eClVCA1QVIw9ACvSTHfMDo0IX2GEivhwI9tEbxVCiY42zRwwoYCWUn0tRfn2domfyPBeDl4LU8w44-pbtqlfJGxUihI3nsrpTcqL6BwxDSP4FF20fQZyVlRSry9KMMtd0F6ltew/s1108/Lesson2-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="1108" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijqX7K7opJSND2XGhibM9yKyOt3ze9Vo3ZB_R9BqfzZG9eClVCA1QVIw9ACvSTHfMDo0IX2GEivhwI9tEbxVCiY42zRwwoYCWUn0tRfn2domfyPBeDl4LU8w44-pbtqlfJGxUihI3nsrpTcqL6BwxDSP4FF20fQZyVlRSry9KMMtd0F6ltew/s400/Lesson2-09.png" width="400" /></a></div>
This time it is showing the customer number and name. Close the application and close <i>Clarion</i>.<br>
<br />
<h1>Exercise 3: Adding New Records</h1>
Before you continue, go to the LCLesson folder and make a copy of the Customer.tps file because we are going to add in some rubbish data to the current one. Then open the LCLesson application, and use the Embeditor to open MyTestCode.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2IP0_t1qy8BzahDRCJgqQzoL-kCYPty4xbIX2HzHDcg1Dgd_3cJO98HnTcNS2QayLVtbZZiKrXsIf5Y0ngVl_W33IXJrwRpwaCuns91Zeb_Yg__ipcVWbztj9T-c6dZE3WsGrMiERw1-h4Eq1poIQOBOjGoZWDoSLcHhJjC562IRR2ks59A/s655/Lesson3-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="444" data-original-width="655" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2IP0_t1qy8BzahDRCJgqQzoL-kCYPty4xbIX2HzHDcg1Dgd_3cJO98HnTcNS2QayLVtbZZiKrXsIf5Y0ngVl_W33IXJrwRpwaCuns91Zeb_Yg__ipcVWbztj9T-c6dZE3WsGrMiERw1-h4Eq1poIQOBOjGoZWDoSLcHhJjC562IRR2ks59A/s400/Lesson3-01.png" width="400" /></a></div>
Add in two new variable definitions in the data section as shown here. Next, replace the existing code with this new code (using copy and paste).<br />
<pre> Access:Customer.UseFile()
Access:Customer.Open()
Access:Customer.ClearKey(CUS:KEYCUSTNUMBER) ! Go to the top of PK
SET(CUS:KEYCUSTNUMBER) ! sets the processing order
i = 0 ! Record counter
LOOP UNTIL Access:Customer.Next() <> Level:Benign ! CUS loop
!// Process each customer record
i += 1 ! Count the records
ud.Debug(' Customer: ' & CUS:CustNumber |
& ' Company: ' & clip(CUS:Company))
0{PROP:StatusText,1} = 'Customer record ' & i
END ! CUS loop
ud.Debug(' Loop ends. There are ' & i & ' records')
!// List of US state codes, including Guam and Puerto Rico
strStates = '..AK.AL.AR.AZ.CA.CO.CT.DE.FL.GA.GM.HI.IA.ID.IL.' |
& 'IN.KS.KY.LA.MA.MD.ME.MI.MN.MO.MS.MT.NC.ND.NE.NH.NJ.NM.' |
& 'NV.NY.OH.OK.OR.PA.PR.RI.SC.SD.TN.TX.UT.VA.VT.WA.WI.WV.WY.'
!// Add in some more records
LOOP i = 9 TO RANDOM(150,250) ! i
CUS:CustNumber = i
IF Access:Customer.Fetch(CUS:KEYCUSTNUMBER) = Level:Benign THEN ! Fetch
ud.Debug(' Fetched Customer: ' & CUS:CustNumber |
& ' Company: ' & clip(CUS:Company))
0{PROP:StatusText,1} = 'Found customer ' & CUS:CustNumber
ELSE ! Fetch
!// Record not found, so add it in
Access:Customer.PrimeRecord() ! Customer no is autonumber
CUS:Company = 'Company ' & i
CUS:FirstName = 'First ' & i
CUS:LastName = 'Last ' & i
n = RANDOM(1,52) ! Get a random state number
CUS:State = SUB(strStates,n*3,2) ! State Code
CUS:City = SUB(strStates,n*3,2) & ' City'
CUS:ZIPcode = n * 1000 + i ! Made up "Zip" code
Access:Customer.Insert() ! Add in the customer record
ud.Debug(' Added Customer: ' & CUS:CustNumber |
& ' Company: ' & clip(CUS:Company))
0{PROP:StatusText,1} = 'Added customer ' & CUS:CustNumber
END ! Fetch
END ! i
0{PROP:StatusText,1} = 'Test code completed.'
Access:Customer.Close()</pre>
Once you have pasted it, highlight it and press Ctrl-i to get the indenting correct. It should look like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr9IomwcbbRVD9d0Vr2LjO2XaGo2pfS4EZaxH5LzavNw2dNiBAicN8tGXeD9gTh8QCDShXbXP-aDFZSwnCmTCeydxGuiQTad9cwhwwYr6Zp2l4n9Yz8BkZUQ1CrOvSCCG_ScPhya6uy-eJISNYCO4ep6Ky1Qlgq8z2i5lzf4Y3VsRkWbJBRQ/s841/Lesson3-02.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="400" data-original-height="841" data-original-width="665" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr9IomwcbbRVD9d0Vr2LjO2XaGo2pfS4EZaxH5LzavNw2dNiBAicN8tGXeD9gTh8QCDShXbXP-aDFZSwnCmTCeydxGuiQTad9cwhwwYr6Zp2l4n9Yz8BkZUQ1CrOvSCCG_ScPhya6uy-eJISNYCO4ep6Ky1Qlgq8z2i5lzf4Y3VsRkWbJBRQ/s400/Lesson3-02.png"/></a></div>
Use the green "Save and Close" button, save your work, and start the application.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9inf9tOG5ZaMsKafuVzlVzYSTM9fwWVXn_p0fcBiOG8fBJ856e9NIlEg7HXzlWwEBVOh87NZQoXxAh0RU4iVBeJairpuwKK_klhHWwSXt1528rH6fV5tdDinau97BvphG40hbWxGjxrLFyltyQfX-6xViRZTL_eXvIY-uvdzQZ9azKwZmg/s603/Lesson3-03.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="188" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB9inf9tOG5ZaMsKafuVzlVzYSTM9fwWVXn_p0fcBiOG8fBJ856e9NIlEg7HXzlWwEBVOh87NZQoXxAh0RU4iVBeJairpuwKK_klhHWwSXt1528rH6fV5tdDinau97BvphG40hbWxGjxrLFyltyQfX-6xViRZTL_eXvIY-uvdzQZ9azKwZmg/s400/Lesson3-03.png"/></a></div>
Run the test code, and look at the debug messages. Run it again and note how the first loop shows the newly added records, before attempting to add more. Then look at the data in the Customer browse screen. Notice that the address is missing. Close the application and return to the MyTestCode procedure.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcijt8dmdn0nKrUBZcZKnSjbIRcUzR_HLeTVQG3GkrDETORW7kEvhKzvcsu0m2zH3tPAugE29RWg87Vyh3FR8jSxKW0NwDux11oux0kRC377lPZINL3U8MT0YOF0aHztVwM-UHveJSIyN6fTa4R_qBVXSXH5hF3C9tv8aA9HQ3WzckoQCBaA/s607/Lesson3-03.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="187" data-original-width="607" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcijt8dmdn0nKrUBZcZKnSjbIRcUzR_HLeTVQG3GkrDETORW7kEvhKzvcsu0m2zH3tPAugE29RWg87Vyh3FR8jSxKW0NwDux11oux0kRC377lPZINL3U8MT0YOF0aHztVwM-UHveJSIyN6fTa4R_qBVXSXH5hF3C9tv8aA9HQ3WzckoQCBaA/s400/Lesson3-03.png"/></a></div>
Let's add in a few extra lines of code as shown, so you can see how the Update method is used. Save your work, and run the test code to see what it does. Close the application when done.<br />
<br />
<h1>Exercise 4: Performing Lookups</h1>
Now we are going to introduce a second table: State. Go back into the Embeditor and add in the State table, so you have "Customer" and "State" listed in "Other Files". Below the "strState = " assignment lines, add in the following code:<br />
<pre> !// State table lookups
Access:State.UseFile()
Access:State.Open()
Access:State.ClearKey(STA:KEYSTATE) ! Top of the primary key
SET(STA:KEYSTATE) ! sets the search order
!// Add in and update some more records</pre>
At the bottom of the code, remember to add the method to close the state table again:<br />
<pre> Access:State.Close()</pre>
Now we need to add in the code to perform a lookup, based on the State code of each customer:<br />
<pre> IF Access:Customer.Fetch(CUS:KEYCUSTNUMBER) = Level:Benign THEN ! Fetch
ud.Debug(' Fetched Customer: ' & CUS:CustNumber |
& ' State ' & clip(CUS:State))
STA:State = CUS:State ! This is the state code we want to fetch
IF Access:State.Fetch(STA:KEYSTATE) = Level:Benign THEN ! STA
CUS:Address = 'Here in ' & clip(STA:StateName)
ELSE ! STA
CUS:Address = 'Not Supplied'
END ! STA
Access:Customer.Update() ! Update changes to the customer record
ud.Debug(' Updated Customer: ' & CUS:CustNumber)
ELSE ! Fetch</pre>
The total code should now look something like this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdmUXpQTzHH57LRuB_3_fOrEnkzhVg7C3WDhIVbxVx7loJgTLldpD6i1rRdDgV2O0CmXk47tWUqx_tHgucBz7XUf3I6KzksD3miOnKClluH2v8fSzioVTNsj-p9wxEP6YefhntxSWcSCl5lS85z3bKq92Ly9CBwbIxBrhvVw-2P-K8v7pMOA/s796/Lesson4-01.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="400" data-original-height="796" data-original-width="654" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdmUXpQTzHH57LRuB_3_fOrEnkzhVg7C3WDhIVbxVx7loJgTLldpD6i1rRdDgV2O0CmXk47tWUqx_tHgucBz7XUf3I6KzksD3miOnKClluH2v8fSzioVTNsj-p9wxEP6YefhntxSWcSCl5lS85z3bKq92Ly9CBwbIxBrhvVw-2P-K8v7pMOA/s400/Lesson4-01.png"/></a></div>
Save your work, start the application and try the test code. You should get a result similar to this:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIz2PCH02wEMvJzNP5Bp4ZeQhhskM8K0EimrrJMOtPv7iSq0eFNeCG4lIS_qHtAncRVEXH6B0RpIAW6A1Tt_dnf7eXhqJdIiXvXMDcOIHnRpEGPl2wkeSqNUYL5-FIVE2bmcIPVm2FKEDFt0yRWN3fkoxjDs-Hl9zQ3LG_n1gJDep92PVbOw/s621/Lesson4-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="380" data-original-width="621" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIz2PCH02wEMvJzNP5Bp4ZeQhhskM8K0EimrrJMOtPv7iSq0eFNeCG4lIS_qHtAncRVEXH6B0RpIAW6A1Tt_dnf7eXhqJdIiXvXMDcOIHnRpEGPl2wkeSqNUYL5-FIVE2bmcIPVm2FKEDFt0yRWN3fkoxjDs-Hl9zQ3LG_n1gJDep92PVbOw/s400/Lesson4-02.png" width="400" /></a></div>
Because there is no "Access:State.Update()" command, none of the records in the "State" table have been altered, even though we did an assignment "STA:State = CUS:State" to prime the key value for the Fetch.<br />
<b>Note</b>: There is no reason why we can't do the same kind of lookup in the "Insert" part of the code, but we would need to assign the value of "CUS:State" (and also "STA:State") or the fetch will not work as intended. Remember: this code doesn't have any error checking yet!<br />
<br />
Let's continue with <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Exercise 5</a> in the next post (below).<br />
<br /><br /><div align="center">[ <a h.ref="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html"><b>Introducing Clarion FileManager (Part 2)</b></a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-1-using-app.html">Clarion Fixer (Part 1): Using the App</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/clarion-fixer-part-2-code.html">Clarion Fixer (Part 2): The Code</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/10/change-mode-vs-view-mode.html">Change Mode vs View Mode</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br />
<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
</div>Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-50128362264785050562022-12-17T20:57:00.033+02:002023-10-20T13:40:22.295+02:00Introducing Clarion FileManager (Part 2)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This is a continuation from <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Part 1</a>.<br />
<h1>Exercise 5: Try Some Error Checking</h1>
So far we have simply assumed everything is working, but we haven't tested for any error conditions. You shouldn't do that in <i>real</i> programs. In particular, we should use <b>Try</b>Open, <b>Try</b>Next, <b>Try</b>Next, <b>Try</b>Insert and <b>Try</b>Update.<br />
<br />
<h2>Work with pairs</h2>
One way to make this easier is to work with method pairs while you are writing the code. The first is the <b>TryOpen</b> and <b>Close</b> pair:<br />
<pre><span style="color: red;">if</span><span style="color: #073763;"> Access:Table.<b>TryOpen</b>() = Level:Benign </span><span style="color: red;">then</span> <span style="color: #38761d;">! Open Table</span><span style="color: #073763;">
!// Table has been opened
</span><span style="color: red;">else</span><span style="color: #073763;"> </span><span style="color: #38761d;">! Open Table</span><span style="color: #073763;">
ud.Debug(' Open Table failed')
</span><span style="color: red;">end</span><span style="color: #073763;"> </span><span style="color: #38761d;">! Open Table</span><span style="color: #073763;">
Access:Table.<b>Close</b>()</span></pre>
Next, add the <b>ClearKey</b> and <b>SET</b> pairs.<br />
<pre>if Access:Table.TryOpen() = Level:Benign then ! Open Table
!// Table has been opened
<span style="color: #073763;">Access:Table.<b>ClearKey</b>(TBL:KeyName) ! Top of the primary key
<b>SET</b>(TBL:KeyName) ! Set the processing order</span>
else ! Open Table
ud.Debug(' Open Table failed')
end ! Open Table
Access:Table.Close()</pre>
After that, you will probably want a loop to read several records. So add in the <b>LOOP UNTIL TryNext</b> and <b>END</b> pair.
<pre>if Access:Table.TryOpen() = Level:Benign then ! Open Table
!// Table has been opened
Access:Table.ClearKey(TBL:KeyName) ! Top of the primary key
SET(TBL:KeyName) ! Set the processing order
<span><span style="color: red;">LOOP UNTIL</span><span style="color: #073763;"> Access:Table.</span><b style="color: #073763;">TryNext</b><span style="color: #073763;">() <> Level:Benign </span></span><span style="color: #38761d;">! Loop Table</span><span><span style="color: #073763;">
</span><span style="color: red;">END</span><span style="color: #073763;"> </span></span><span style="color: #38761d;">! Loop Table</span>
else ! Open Table
ud.Debug(' Open Table failed')
end ! Open Table
Access:Table.Close()</pre>
Notice how we <b>comment</b> the "if ... then", "else" and "end" statements to keep track of which "end" statement belongs to which "if" statement. Also, the same applies to the "LOOP" and "END" statements. Don't only rely on Ctrl-i to do the indenting for you. Use it to check your own comments and see if they line up properly. If not, <i>check your code</i>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Also, you can avoid unforeseen bugs by ensuring that you put an "else" whenever you have an "if". Get into the habit of writing the "else" and the "end" whenever you write the "if", <i>and put the comments at the end of each line, <b>before</b></i> you worry about what happens immediately after the "if".
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />With all of this in mind, open "MyTestCode" in the Embeditor and fix up the code. Note I have also copied the CUS:Address code into the insert block. It should end up something like this:<br />
<pre> Access:Customer.UseFile()
if Access:Customer.<b>TryOpen</b>() = Level:Benign then ! Customer Open
Access:Customer.Clearkey(CUS:KEYCUSTNUMBER) ! Top of the primary key
SET(CUS:KEYCUSTNUMBER) ! sets the processing order
i = 0 ! Record counter
LOOP UNTIL Access:Customer.<b>TryNext</b>() <> Level:Benign ! CUS loop
!// Process each customer record
i += 1 ! Count the records
ud.Debug(' Customer: ' & CUS:CustNumber |
& ' Company: ' & clip(CUS:Company))
0{PROP:StatusText,1} = 'Customer record ' & i
END ! CUS loop
ud.Debug(' Loop ends. There are ' & i & ' records')
0{PROP:StatusText,1} = 'There are ' & i & ' records'
!// List of US state codes, including Guam and Puerto Rico
strStates = '..AK.AL.AR.AZ.CA.CO.CT.DE.FL.GA.GM.HI.IA.ID.IL.' |
& 'IN.KS.KY.LA.MA.MD.ME.MI.MN.MO.MS.MT.NC.ND.NE.NH.NJ.NM.' |
& 'NV.NY.OH.OK.OR.PA.PR.RI.SC.SD.TN.TX.UT.VA.VT.WA.WI.WV.WY.'
!// State table lookups
Access:State.UseFile()
if Access:State.<b>TryOpen</b>() = Level:Benign then ! State Open
Access:State.Clearkey(STA:KEYSTATE) ! Top of the primary key
SET(STA:KEYSTATE) ! sets the search order
!
!// Add in and update some more records
LOOP i = 9 TO RANDOM(150,250) ! i
CUS:CustNumber = i
IF Access:Customer.<b>TryFetch</b>(CUS:KEYCUSTNUMBER) |
= Level:Benign THEN ! Fetch
ud.Debug(' Fetched Customer: ' & CUS:CustNumber |
& ' State ' & clip(CUS:State))
STA:State = CUS:State ! This is the state code we want
IF Access:State.<b>TryFetch</b>(STA:KEYSTATE)|
= Level:Benign THEN ! STA
CUS:Address = 'Here in ' & clip(STA:StateName)
ELSE ! STA
CUS:Address = 'Not Supplied'
END ! STA
if Access:Customer.<b>TryUpdate</b>() = Level:Benign then
! Update changes to the customer record
ud.Debug(' Updated Customer: ' & CUS:CustNumber)
0{PROP:StatusText,1} = 'Updated customer ' |
& CUS:CustNumber
else ! Update
ud.Debug(' Failed to update Customer: ' |
& CUS:CustNumber)
0{PROP:StatusText,1} = 'Failed to update customer ' |
& CUS:CustNumber
end ! Update
ELSE ! Fetch
!// Record not found, so add it in
Access:Customer.PrimeRecord() ! Cust number is autonumber
CUS:Company = 'Company ' & i
CUS:FirstName = 'First ' & i
CUS:LastName = 'Last ' & i
n = RANDOM(1,52) ! Get a random state number
CUS:State = SUB(strStates,n*3,2) ! State Code
CUS:City = SUB(strStates,n*3,2) & ' City'
CUS:ZIPcode = n * 1000 + i ! Made up "Zip" code
STA:State = CUS:State ! This is the state code we want
IF Access:State.<b>TryFetch</b>(STA:KEYSTATE)|
= Level:Benign THEN ! STA
CUS:Address = 'Here in ' & clip(STA:StateName)
ELSE ! STA
CUS:Address = 'Not Supplied'
END ! STA
if Access:Customer.<b>TryInsert</b>() = Level:Benign then
! Add in the customer record
ud.Debug(' Added Customer: ' & CUS:CustNumber |
& ' Company: ' & clip(CUS:Company))
0{PROP:StatusText,1} = 'Added customer ' |
& CUS:CustNumber
else ! Insert
ud.Debug(' Failed to add Customer: ' |
& CUS:CustNumber & ' Company: ' |
& clip(CUS:Company))
0{PROP:StatusText,1} = 'Failed to add customer ' |
& CUS:CustNumber
end ! Insert
END ! Fetch
END ! i
else ! State Open
ud.Debug(' Unable to open the State table')
end ! State Open
else ! Customer Open
ud.Debug(' Unable to open the Customer table')
end ! Customer Open
0{PROP:StatusText,1} = 'Test code completed.'
Access:Customer.Close()
Access:State.Close()</pre>
Now run the application and see if the debug messages match what you expected to see.<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQdsGYrZYovLoryQiSYRwMkM5XmVsGBrC_1nJVNVD0f91CeUXwXmD081MrEckcdaLBz8d29QLHmIyVsE2_joGXGkpAPb5cxHxMPdTefeqtNJe98WU_Bmf-vmfrcTrmBqVii9gZu2eVk1GAckzHPGRx0vGg2zAO8Zd5r0Iind6N97gGJXylqw/s853/Lesson5-01.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="634" data-original-width="853" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQdsGYrZYovLoryQiSYRwMkM5XmVsGBrC_1nJVNVD0f91CeUXwXmD081MrEckcdaLBz8d29QLHmIyVsE2_joGXGkpAPb5cxHxMPdTefeqtNJe98WU_Bmf-vmfrcTrmBqVii9gZu2eVk1GAckzHPGRx0vGg2zAO8Zd5r0Iind6N97gGJXylqw/s400/Lesson5-01.png"/></a></div>
You may decide that it is important to notify the user of some error conditions. I have only used debug messages in this example for consistency, not for any other reason.<br />
<b>Warning:</b> If you write <pre>if Access:Customer.TryUpdate() then</pre> and omit the <pre>= level:Benign</pre> part you will tear your hair out for days trying to figure out why the update "isn't working" when in fact it is working correctly but the IF statement is the wrong way around. I speak from personal experience.<br />
<br />
<h1>Exercise 6: Making Changes Across Multiple Records</h1>
In SQL it takes a single UPDATE command with some WHERE clauses to update a bunch of records. With FileManager we don't always have that luxury. Say, for example, we want to delete all customers in the state of California. One way to do it is simply to loop through all the records and every time we find a California state code, delete the record and move on. It's not particularly efficient, but it will get the job done.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrOWufQCO-yrEzE6AhE5YkixBLXUMTlw0A-ziYhhoZejSNRT1oFXqnHkxtp2-goXsXRy127RtTmEg2jDloCJAChxAEveEM34N1M2ErWXBmQe5-VDYvuXuq0TRK0EF3KE6f5ODvIWPNm1ctB0XWC0SGYAjhl0z94WDXUO9DrdHBQUeNG2vnvA/s843/Lesson6-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="561" data-original-width="843" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrOWufQCO-yrEzE6AhE5YkixBLXUMTlw0A-ziYhhoZejSNRT1oFXqnHkxtp2-goXsXRy127RtTmEg2jDloCJAChxAEveEM34N1M2ErWXBmQe5-VDYvuXuq0TRK0EF3KE6f5ODvIWPNm1ctB0XWC0SGYAjhl0z94WDXUO9DrdHBQUeNG2vnvA/s400/Lesson6-01.png" width="400" /></a></div>
Open LCLesson, select the "BrowseCustomers" form and open it with the Window designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnLHi3ZeRvgoKPBaquwCsRVs2NfXq1PG-Am3bTZsDI82qKYxAxHo-sfPPqxLbl_rWS9r8_MMGKAl5BFj5HfSGLmp34IWELxvp2CXNzCpO8TSSmqnGWPo90f_N4FguQLrwXeSR1jkdv2_5dKfXB3Gyo7ieqTDIlQoA3vm13R-25U7hEasa2wA/s938/Lesson6-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="591" data-original-width="938" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnLHi3ZeRvgoKPBaquwCsRVs2NfXq1PG-Am3bTZsDI82qKYxAxHo-sfPPqxLbl_rWS9r8_MMGKAl5BFj5HfSGLmp34IWELxvp2CXNzCpO8TSSmqnGWPo90f_N4FguQLrwXeSR1jkdv2_5dKfXB3Gyo7ieqTDIlQoA3vm13R-25U7hEasa2wA/s400/Lesson6-02.png" width="400" /></a></div>
Drag a button control from the Toolbox and place it on the form as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwVbenioUv-z4jJcVJv7NdBIDD-IcgXXiiWmNDo_deMH6xAKu-ErBv2qZNDqbxkhBkyaqRFCXQ-yw65Vc38QejEAfNfNqMDrsQ7-QwRMd2ZB8ZNTBiLaL9e-W5QxLSmqlHOIk2o9290Pz1GZEFNyw0ScOQXLHnwKIUdR1VuxV5JE1vd7YPsg/s877/Lesson6-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="801" data-original-width="877" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwVbenioUv-z4jJcVJv7NdBIDD-IcgXXiiWmNDo_deMH6xAKu-ErBv2qZNDqbxkhBkyaqRFCXQ-yw65Vc38QejEAfNfNqMDrsQ7-QwRMd2ZB8ZNTBiLaL9e-W5QxLSmqlHOIk2o9290Pz1GZEFNyw0ScOQXLHnwKIUdR1VuxV5JE1vd7YPsg/s400/Lesson6-03.png" width="400" /></a></div>
Change the Text to "Delete CA", the Use property to "?btnDeleteCA", the TextColour to Red, and the Message property to "Delete CA Customers". Then select the button, and double-click it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSLTLjLEKIG9AOyuB6vRy415-w7BB15HFtn6vx4PO7-A4249SEexHJzP4Zyfs-Vn1iVkuTt_jfMOFAh79zRR7uujI8fgq6Zia-7jrDKiAD4gi0Xp-nyLwS_zOWyePJhtKl5_zWjt8SLLsbRsv8mJ_zk6wnHeFdOXWDva8i2Ot4MZNqZNkivw/s738/Lesson6-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="717" data-original-width="738" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSLTLjLEKIG9AOyuB6vRy415-w7BB15HFtn6vx4PO7-A4249SEexHJzP4Zyfs-Vn1iVkuTt_jfMOFAh79zRR7uujI8fgq6Zia-7jrDKiAD4gi0Xp-nyLwS_zOWyePJhtKl5_zWjt8SLLsbRsv8mJ_zk6wnHeFdOXWDva8i2Ot4MZNqZNkivw/s400/Lesson6-04.png" width="400" /></a></div>
This should open the Embed points for the button. Click on "Accepted", press the "Insert" button, choose "Source" and "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuvloS1g-SIUlG1kyMAnBzrI4gvPxz4nvBNVSIua8baq7_sTHtrIuzRePX4bO2hqTABf837zKN9Cxm1deZkEPcpLc1_cKYFKT8qbb8_0iR--hxqxIDprwQx9fbsDuH6I82yGscNcUAKhWXuOOuv4jfkczkggEacQi0t4WPw3Lfupld1NGnZA/s575/Lesson6-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="172" data-original-width="575" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuvloS1g-SIUlG1kyMAnBzrI4gvPxz4nvBNVSIua8baq7_sTHtrIuzRePX4bO2hqTABf837zKN9Cxm1deZkEPcpLc1_cKYFKT8qbb8_0iR--hxqxIDprwQx9fbsDuH6I82yGscNcUAKhWXuOOuv4jfkczkggEacQi0t4WPw3Lfupld1NGnZA/s400/Lesson6-05.png" width="400" /></a></div>
Type in "ud.Debug(' Delete CA')" and press the green "Save and Close" button three times. <b>Save your work</b>. Now click on the "Embeditor" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKfahRbff0xPPLZBN_dpAzHwcTiplMRF_FIzdhUh_GcxeJX6o3XE0jfGLFrx_yDKFEZCSXFmyAaznwFNr7NKLR54vDJVWx3xOyRA9mDJOCbMsBcofZRfxrImROiFWRDwAvmny8Najy2A_Pf2kmRsFZrrx-IKl-eVQwgtlxkb9mY2gc3UW1TA/s665/Lesson6-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="505" data-original-width="665" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKfahRbff0xPPLZBN_dpAzHwcTiplMRF_FIzdhUh_GcxeJX6o3XE0jfGLFrx_yDKFEZCSXFmyAaznwFNr7NKLR54vDJVWx3xOyRA9mDJOCbMsBcofZRfxrImROiFWRDwAvmny8Najy2A_Pf2kmRsFZrrx-IKl-eVQwgtlxkb9mY2gc3UW1TA/s400/Lesson6-06.png" width="400" /></a></div>
Click on the "Next Filled Embed" button until you find the "ud.Debug" statement. Now we can add some suitable code:<br />
<pre> ud.Debug(' >Delete CA')
Access:Customer.UseFile()
if Access:Customer.<b>TryOpen</b>() = Level:Benign then ! Customer Open
Access:Customer.<b>ClearKey</b>(CUS:KEYCUSTNUMBER)
<b>SET</b>(CUS:KEYCUSTNUMBER)
LOOP UNTIL Access:Customer.<b>TryNext</b>() <> Level:Benign ! Cust Loop
?btnDeleteCA{PROP:Text} = clip(CUS:CustNumber) ! Display Cust No
DISPLAY() ! Update the screen display
!// Delete stuff goes here
END ! Customer Loop
end ! Customer Open
Access:Customer.<b>Close</b>()
ud.Debug(' <Delete CA')</pre>
Use the green "Save and Close" button to exit the Embeditor. Save your work. Start the application and test the button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDcPAq89dhMgKFRP3QTMIhBfiwYJ5O5AxB8VmzrVr96inXAEh6-HbuCmk6wJ74PJwEX7wB0zPR52W447_ydvu86Rv96wuW4KpKZlSvxWmmiI6OMk7-Zf8aREizuk6mrDW9A1lyK04saKwPs0TdqZ0SzIklDCqkEdwFvZwnN48J4a2IjE2CUA/s656/Lesson6-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="601" data-original-width="656" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDcPAq89dhMgKFRP3QTMIhBfiwYJ5O5AxB8VmzrVr96inXAEh6-HbuCmk6wJ74PJwEX7wB0zPR52W447_ydvu86Rv96wuW4KpKZlSvxWmmiI6OMk7-Zf8aREizuk6mrDW9A1lyK04saKwPs0TdqZ0SzIklDCqkEdwFvZwnN48J4a2IjE2CUA/s400/Lesson6-07.png" width="400" /></a></div>
We haven't actually deleted anything, but we have made sure that the looping works. Use the "Fast Forward" button to go to the last record and check that the record number matches the number on the button text.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />So let's return to the code and make it a bit faster, and to count how many records were deleted. The variable i# is an "implicit LONG" variable used here.<br />
<pre> ud.Debug(' >Delete CA')
Access:Customer.UseFile()
if Access:Customer.<b>TryOpen</b>() = Level:Benign then ! Customer Open
Access:Customer.<b>ClearKey</b>(CUS:KEYCUSTNUMBER)
<b>SET</b>(CUS:KEYCUSTNUMBER)
i# = 0
<b>LOOP UNTIL</b> Access:Customer.<b>TryNext</b>() <> Level:Benign ! Cust Loop
<span style="color: #800180;">if clip(CUS:State) <> 'CA' then <b>CYCLE</b> .</span> ! Try next record
?btnDeleteCA{PROP:Text} = clip(CUS:CustNumber) ! Display Cust #
DISPLAY() ! Update the screen display
<span style="color: #073763;"> !// Delete without asking
if Access:Customer.<b>DeleteRecord</b>(False) |
= Level:Benign then ! Delete
ud.Debug(' Record deleted ' & CUS:CustNumber)
i# += 1 ! Count the deleted record
else ! Delete
ud.Debug(' Record NOT deleted: ' & CUS:CustNumber)
end ! Delete</span>
END ! Cust Loop
end ! Customer Open
Access:Customer.<b>Close</b>()
?btnDeleteCA{PROP:Text} = 'Deleted ' & i# ! No of records deleted
ThisWindow.Reset(1) ! Update display to remove the deleted records
ud.Debug(' <Delete CA')</pre>
Some lines need further explanation: the purple line is a one-line if statement because it ends with a dot. The CYCLE command forces execution to go to the top of the LOOP, so everything below the purple line is ignored, down to the END of the loop. It prevents non-'CA' records from being deleted.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxsvi88-G4t8a7ZavQF79rnPqZo6LJBvISVrI8DYGhnUtSfw6lI86nh0AYhesaeDCMepFb5NEt6pG1hq4C60u3Dnph_uiL4BPVY5I9k5veahf_JHsH8dLvUFP-7MPpmLI6jwzW8aY6WM8wZpimf3AmMRtu_u0CfybNPwo4AMnL8-dhglDeaw/s643/Lesson6-09.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="478" data-original-width="643" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxsvi88-G4t8a7ZavQF79rnPqZo6LJBvISVrI8DYGhnUtSfw6lI86nh0AYhesaeDCMepFb5NEt6pG1hq4C60u3Dnph_uiL4BPVY5I9k5veahf_JHsH8dLvUFP-7MPpmLI6jwzW8aY6WM8wZpimf3AmMRtu_u0CfybNPwo4AMnL8-dhglDeaw/s400/Lesson6-09.png"/></a></div>
This is another way to write the test: look for the qualifying record and process it inside the "if" block. It's a matter of preference and legibility. You choose.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Click on the green "Save and Close" button, <b>save your work</b> and start the application. Let's see if the new code actually works as intended.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjwJ0lN-EFataLIPNPizZJ-PWX9EUQWVcGke8bh_7hEHY85oWvGCFjTS-jYbFYFhw9NuPjiQw380jlVOL0Puj8VDpjtaHcVj0w0S9RpirHZkc3O1npP-gH3RvR3_4kl-L9KiEKPXUIRKlZcuVsrsfXSkVSzLo9RpnUIYqmjX1ofKcZnGvQ-Q/s626/Lesson6-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="474" data-original-width="626" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjwJ0lN-EFataLIPNPizZJ-PWX9EUQWVcGke8bh_7hEHY85oWvGCFjTS-jYbFYFhw9NuPjiQw380jlVOL0Puj8VDpjtaHcVj0w0S9RpirHZkc3O1npP-gH3RvR3_4kl-L9KiEKPXUIRKlZcuVsrsfXSkVSzLo9RpnUIYqmjX1ofKcZnGvQ-Q/s400/Lesson6-08.png" width="400" /></a></div>
How to check? Click on the "by ZIP Code" tab and see if you can see any California addresses.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqm2SLQ-2uB1EI1Cvr0Oi7jODSzjvb3g2GqAb9fXZbBZec1e6eYEwwhy4vuPGMw0H7EnXO31rdnX-Udvb0e9-cxskcmTkeDMz2GHe1yP0Xb1Lr43Nlc6Qpy4DDswmdG_mBmOKwv9d6ESJkdI4mCHIgk8TpE6kon_8yiwcMeuG04GRFNm2rAw/s619/Lesson6-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="378" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqm2SLQ-2uB1EI1Cvr0Oi7jODSzjvb3g2GqAb9fXZbBZec1e6eYEwwhy4vuPGMw0H7EnXO31rdnX-Udvb0e9-cxskcmTkeDMz2GHe1yP0Xb1Lr43Nlc6Qpy4DDswmdG_mBmOKwv9d6ESJkdI4mCHIgk8TpE6kon_8yiwcMeuG04GRFNm2rAw/s400/Lesson6-10.png" width="400" /></a></div>
Did you notice these lines?
<pre> if Access:Customer.<b>DeleteRecord</b>(False) = Level:Benign then ! Delete
ud.Debug(' Record deleted ' & CUS:CustNumber)
i# += 1 ! Count the deleted record
else ! Delete
ud.Debug(' Record NOT deleted: ' & CUS:CustNumber)
end ! Delete</pre>
How could we display the Customer number from a deleted record? (Line 2) Because the <i>record buffer</i> did not disappear when the physical record was deleted. It only changes once we move to the next record.<br />
<br />
<h1>Exercise 7: Indexes Make Record Access Easier</h1>
Close the LCLesson <i>application</i> and open the LCLesson <i>dictionary</i> instead. Consider the Customer table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlABxl26ZEmPSuFrd7yLI9AXdL5YrQMRmC7bMNyNPX6GRqqw4UiYmIshk5iv6unWVUxhGi2AxUKutcZGrsedjXgMqZ2wP48Rxyqx1VePMNXXt7vmq0gAJToxiFoVr86ra-6wqjBATYsdtU1EIXUx3Ls6cPd74eLj6hR9BoM8C7-8D4J2NOKw/s853/Lesson7-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="692" data-original-width="853" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlABxl26ZEmPSuFrd7yLI9AXdL5YrQMRmC7bMNyNPX6GRqqw4UiYmIshk5iv6unWVUxhGi2AxUKutcZGrsedjXgMqZ2wP48Rxyqx1VePMNXXt7vmq0gAJToxiFoVr86ra-6wqjBATYsdtU1EIXUx3Ls6cPd74eLj6hR9BoM8C7-8D4J2NOKw/s400/Lesson7-01.png" width="400" /></a></div>
Notice that the "State" code is not part of an index. So let's add an index for it. This will enable us to jump to any record based on its state code.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDE6y3mVH0qNAqTxdLhyUfbzfVCxZK5ScJntsnymgwKoxRTwu4MxM6M-WUqV4JrGbt5dawDGzKbznk3_NadDIUxIxfFx2tLkWH7GGh6eXax6vByfP_NG-h5DwlkgpTJ3k1TFr2rsk7ZdYzWaIYLNV1KQL6ztWfy0a9arD-ES_Eo2xDFkpTQw/s574/Lesson7-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="574" data-original-width="541" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDE6y3mVH0qNAqTxdLhyUfbzfVCxZK5ScJntsnymgwKoxRTwu4MxM6M-WUqV4JrGbt5dawDGzKbznk3_NadDIUxIxfFx2tLkWH7GGh6eXax6vByfP_NG-h5DwlkgpTJ3k1TFr2rsk7ZdYzWaIYLNV1KQL6ztWfy0a9arD-ES_Eo2xDFkpTQw/s400/Lesson7-02.png" /></a></div>
Right-click on the "Keys" folder and choose "Add Key"<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzbmaY8CSNZLQQ1TaZMTOdzCEnVz3-T5Xg6tEtS-5RhPSahNwix1QMw87QpR-ub6ehsKZs7dL6xIX4cSviuXrIlgZks6tQmKR7AASeCN5-Sp6f__aFoxVGNDW0lu8yOlUaNOeaN0Dnkh-3nPGGlRC8xkZ7Wp_4TXBL1QIOSEESARaBsU7i8g/s637/Lesson7-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="567" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzbmaY8CSNZLQQ1TaZMTOdzCEnVz3-T5Xg6tEtS-5RhPSahNwix1QMw87QpR-ub6ehsKZs7dL6xIX4cSviuXrIlgZks6tQmKR7AASeCN5-Sp6f__aFoxVGNDW0lu8yOlUaNOeaN0Dnkh-3nPGGlRC8xkZ7Wp_4TXBL1QIOSEESARaBsU7i8g/s400/Lesson7-03.png" /></a></div>
Give the key the label "KEYSTATECODE" and a description, and then add the field "State" as the only field in the key. Click "OK"<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirfurDi_5iLLsVu4SHGYocHjAKPEwNxgG4bHzLh395mMc1_YuRSik2zxzFJnSJwUm-WFTYX4PqMMwwCGOquHo6qPRP71o61_SyRO1pKKHeMkjvQ2znFWjN4DDu0wJnpDpfkx_apSXGBgdRB9wYWyamSExNQUsZERtia9esFdh_qTZ_1E2Kew/s852/Lesson7-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="738" data-original-width="852" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirfurDi_5iLLsVu4SHGYocHjAKPEwNxgG4bHzLh395mMc1_YuRSik2zxzFJnSJwUm-WFTYX4PqMMwwCGOquHo6qPRP71o61_SyRO1pKKHeMkjvQ2znFWjN4DDu0wJnpDpfkx_apSXGBgdRB9wYWyamSExNQUsZERtia9esFdh_qTZ_1E2Kew/s400/Lesson7-04.png" width="400" /></a></div>
Move the new key to the bottom of the list, and then click on the "Save All" button to save these changes. Now we need to get the data file itself to change.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPlE10TGZqg1YO8GtTywd4W0a5k7QtS_pb39npWYGjBTrqc4ahlLF8aern4_ZoEDjWXvKdkOKL32BcKlsEs2WqDF-6KACLCdmWCD1-dj5nu7L-p1Vcp-yonsrp_TA9Gfw_qq_qZ_dik2nZeBkN6k0W-58i4DCPXV5_Pmf_PSDFqIIsUQ37RA/s612/Lesson7-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="489" data-original-width="612" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPlE10TGZqg1YO8GtTywd4W0a5k7QtS_pb39npWYGjBTrqc4ahlLF8aern4_ZoEDjWXvKdkOKL32BcKlsEs2WqDF-6KACLCdmWCD1-dj5nu7L-p1Vcp-yonsrp_TA9Gfw_qq_qZ_dik2nZeBkN6k0W-58i4DCPXV5_Pmf_PSDFqIIsUQ37RA/s400/Lesson7-05.png" width="400" /></a></div>
Right-click on the Customer table and select "Browse Table".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbp7SnALJbG_XxHuT_hyCs9VyhIc8iN5hX2SVAjSSchGx-zITO48r7T-cEtGzqVAUg1CbWab9b_qTeAS2UKtY_wtJ1eig9Y3rU5OBbsrtpfvuEzAydTG-Z4ox_KCASXwAwITudD2jEzR_FqGzlyJYuigKse4glBPIW8qce7YbI_Tauc94q2w/s754/Lesson7-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="640" data-original-width="754" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbp7SnALJbG_XxHuT_hyCs9VyhIc8iN5hX2SVAjSSchGx-zITO48r7T-cEtGzqVAUg1CbWab9b_qTeAS2UKtY_wtJ1eig9Y3rU5OBbsrtpfvuEzAydTG-Z4ox_KCASXwAwITudD2jEzR_FqGzlyJYuigKse4glBPIW8qce7YbI_Tauc94q2w/s400/Lesson7-06.png" width="400" /></a></div>
Choose the "Convert and backup" option, and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92UnqINq9CASgmzOr0jc846gB4ejLAZJElsNFo61CjdNoyB9iy9ZwFMx8zNohLDM6f7pUKoJsgpQlwPRqAtR19izFGLw87diD-G8VI0WL3hF-XN_D2TNxTjv8xF_KUfx-KMMGrVsrT8s35PVHYAfyQzvbLk-Wa5UOr-h5dERKf2rLu05zdA/s821/Lesson7-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="502" data-original-width="821" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92UnqINq9CASgmzOr0jc846gB4ejLAZJElsNFo61CjdNoyB9iy9ZwFMx8zNohLDM6f7pUKoJsgpQlwPRqAtR19izFGLw87diD-G8VI0WL3hF-XN_D2TNxTjv8xF_KUfx-KMMGrVsrT8s35PVHYAfyQzvbLk-Wa5UOr-h5dERKf2rLu05zdA/s400/Lesson7-07.png" width="400" /></a></div>
Click the top dropdown box to check that the new index/key is present in the data file. Close the window, and close the dictionary.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />From the Start Menu, open the LCLesson Application. We need to introduce some changes to the Customer browse form. Select it, and click on the "Window" button to open the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQpJ9NMvo5KzhYGVkeMzOGt2RsgAn7UlhTPbS4VD59NyQV8KPjfuRZwZ3EfmRfrvYYc9F0tRQFf9k0Nl2h6A6ApAj8sP9820RGoPqt7Zb4SIGufJigbtjBRnMh1pSH89v0U5TS1SDpxr-eCx8NT2XyTZ40J8zUc6_B33RxqKJcm6WLImBKA/s699/Lesson7-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="609" data-original-width="699" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTQpJ9NMvo5KzhYGVkeMzOGt2RsgAn7UlhTPbS4VD59NyQV8KPjfuRZwZ3EfmRfrvYYc9F0tRQFf9k0Nl2h6A6ApAj8sP9820RGoPqt7Zb4SIGufJigbtjBRnMh1pSH89v0U5TS1SDpxr-eCx8NT2XyTZ40J8zUc6_B33RxqKJcm6WLImBKA/s400/Lesson7-08.png" width="400" /></a></div>
Use the "List Box Format" command to change the width property of "First Name" and "Last Name" to "40" instead of "80". Then adjust the width of the screen to 640, and adjust the SHEET and the LIST controls as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZZNyET-KKfJwl0QdvrUUWX9XG8Xq430GhtPdJaOeQbCqqjZF4ab_4Kmir5bP54BcFZc_ylNchaWmxmBzarSuHRcEmeEBdrwAiP9EM3ci2va62RwhBuEVMr08rzgRQY_MTnZicGjhDejxQI9wbexBSJhEi49Wx7ZIyrNSmIgnTNvg3JM7iqw/s680/Lesson7-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="505" data-original-width="680" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZZNyET-KKfJwl0QdvrUUWX9XG8Xq430GhtPdJaOeQbCqqjZF4ab_4Kmir5bP54BcFZc_ylNchaWmxmBzarSuHRcEmeEBdrwAiP9EM3ci2va62RwhBuEVMr08rzgRQY_MTnZicGjhDejxQI9wbexBSJhEi49Wx7ZIyrNSmIgnTNvg3JM7iqw/s400/Lesson7-09.png" width="400" /></a></div>
Now click on the SHEET to select it, and then right-click to add a new Tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsRty4zpah2ElJuppt_2prguaUeOElbpLry5H7o-5tgj79QlNbV3x8sP0CgjvnnJwYXRDVKwhsLLwG-NC3DfXfG9Elg8uL72c6tk9aAjwJlRHqF4WwilW6BdtPGDWoh5LgV1EifYOniW294Tp-_jjUrIw328bVtOTlj_V9ETq5InpSYFJdiQ/s1059/Lesson7-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="1059" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsRty4zpah2ElJuppt_2prguaUeOElbpLry5H7o-5tgj79QlNbV3x8sP0CgjvnnJwYXRDVKwhsLLwG-NC3DfXfG9Elg8uL72c6tk9aAjwJlRHqF4WwilW6BdtPGDWoh5LgV1EifYOniW294Tp-_jjUrIw328bVtOTlj_V9ETq5InpSYFJdiQ/s400/Lesson7-10.png" width="400" /></a></div>
In the properties on the right is a "Tabs" property, with the word "(Collection) ..." after it. Click on the ellipsis button and choose "tab4" in the Control Collection Editor". Change its text to "by State Code" and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRYfhBbH8wQiCxSJtzy3UVVsxrPved4vJUQBQgzIE2aNoup8ETa6zRfn_CSTg2W2_RYMoGpCZ08DJmkOzXqvzJPajBcWlDjYMfVL1D3JBI2gdvzJLLC_7rECb06dF8cnYCzJFhEYPHAj1RSIELl2FWuAhK-tF6atPWACXe8l7JovkdBh47jw/s1355/Lesson7-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="603" data-original-width="1355" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRYfhBbH8wQiCxSJtzy3UVVsxrPved4vJUQBQgzIE2aNoup8ETa6zRfn_CSTg2W2_RYMoGpCZ08DJmkOzXqvzJPajBcWlDjYMfVL1D3JBI2gdvzJLLC_7rECb06dF8cnYCzJFhEYPHAj1RSIELl2FWuAhK-tF6atPWACXe8l7JovkdBh47jw/s400/Lesson7-11.png" width="400" /></a></div>
Change to the new "by State Code" tab, and then drag and drop the "State" field from the Data/Tables window and place it below the State column as shown. You can delete the label. Then mark the State control as "Flat" and "Read Only" as shown. This will display the state code for whatever record is selected in the browse form. Click on the green "Save and Close" button and <b>save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4HVQwRHaLNnY8-zKVROGjtcFE3w3WtKwSM_b-hL_AziDjhQYwFW0JJ6fqEPWizFkKi7CxqSXoASuH_WPjjZXYhEKAZfl4-0t7ObMUtmTq6jfERjBZmUuEcsdo2WPfNJhuGHBc7469C6TelT4TP8nvt9Pr9-2dQ4NfJzyjDKR07Zfb5OHC4Q/s842/Lesson7-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="842" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4HVQwRHaLNnY8-zKVROGjtcFE3w3WtKwSM_b-hL_AziDjhQYwFW0JJ6fqEPWizFkKi7CxqSXoASuH_WPjjZXYhEKAZfl4-0t7ObMUtmTq6jfERjBZmUuEcsdo2WPfNJhuGHBc7469C6TelT4TP8nvt9Pr9-2dQ4NfJzyjDKR07Zfb5OHC4Q/s400/Lesson7-12.png" width="400" /></a></div>
Keep the "BrowseCustomers" form selected, and click on the "Extensions" button. This will display the extensions that apply to the form.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8_77ia0JWIj0qupVy8wv5p4TUFhDQhEhDJlylojpjv12EwbmhUBSJ7b-2xuIZD-4uTKo03OAuTIbBcZ4B4NeX13EIgWP1xHfWdVNCbzNLwtQ09gt5ab37AML0bLwwN6lVWDcLU_tiLVrQ51tGwl1Rjptmrkie2ibXzDwxSodqdning3k8g/s846/Lesson7-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="292" data-original-width="846" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM8_77ia0JWIj0qupVy8wv5p4TUFhDQhEhDJlylojpjv12EwbmhUBSJ7b-2xuIZD-4uTKo03OAuTIbBcZ4B4NeX13EIgWP1xHfWdVNCbzNLwtQ09gt5ab37AML0bLwwN6lVWDcLU_tiLVrQ51tGwl1Rjptmrkie2ibXzDwxSodqdning3k8g/s400/Lesson7-13.png" width="400" /></a></div>
First, we are going to <b>delete</b> the top extension, the one that allows the form to be resized. This will prevent the buttons moving around on the form. Then double-click on the line that reads "Browse on Customer ()".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhohcvWJ8w-2HptKqu4xGfXD9y-pxXt6MsBhoMvNv_PBij78NjXsrtTuCy82uz-PXeBbDafcjh8roWGPXILpAb8jOgOMyDAmPhqyNVfjto2c2AIiXAyWlJ46b7ABP7ISkdJ1sD5tl99YM2ZcTq6Ekg3aXSth1hUKN4YgXjzR2hbhg52oR2ruQ/s844/Lesson7-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="842" data-original-width="844" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhohcvWJ8w-2HptKqu4xGfXD9y-pxXt6MsBhoMvNv_PBij78NjXsrtTuCy82uz-PXeBbDafcjh8roWGPXILpAb8jOgOMyDAmPhqyNVfjto2c2AIiXAyWlJ46b7ABP7ISkdJ1sD5tl99YM2ZcTq6Ekg3aXSth1hUKN4YgXjzR2hbhg52oR2ruQ/s400/Lesson7-14.png" width="400" /></a></div>
Change to the "Conditional Behavior" tab, and click on the "Properties" button. This shows how the sort behaviour based on which tab is selected, works. Highlight and copy the "Condition" expression and click "Cancel".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEherQPjbsKsheoWpFeYuVe6vh89Jltyou1C6Y-U3kspysSWczIGcHHlGyqgFYrCOm5al0yPvTkg2HVM-cmlHsQwc44jyGeqeUUGfM6YHZEq7vLCh7URFqVPMiQRCLh0cjSiT8eiO8PPi0BND2NpUjQYTGqnoEov2Hb1oKfj2qOyFrtlDHZVgg/s872/Lesson7-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="871" data-original-width="872" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEherQPjbsKsheoWpFeYuVe6vh89Jltyou1C6Y-U3kspysSWczIGcHHlGyqgFYrCOm5al0yPvTkg2HVM-cmlHsQwc44jyGeqeUUGfM6YHZEq7vLCh7URFqVPMiQRCLh0cjSiT8eiO8PPi0BND2NpUjQYTGqnoEov2Hb1oKfj2qOyFrtlDHZVgg/s400/Lesson7-15.png" width="400" /></a></div>
Now click "Insert", and paste the clipboard to the "Condition" field. Change it to end with a "4" instead of a "2". Click on the ellipsis on the "Key to use" field and select the "KEYSTATECODE" key. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOMKhPBtIukbSdI4D6pleCmUyMEmbg44I5xKwjVikVQXdqoaqoe1JVyccjsOmdD19ViSLki4oE72lG4l9wbNPIZ2XDHZ5OFZMBA0VHRNa3eFhcVj-jY_0IkUuyIzEe_RyCLsY0nPO81VTQRXD3VaNUBMVtS1ovrDRrL0HPQylQeL9HaVbMMQ/s832/Lesson7-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="515" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOMKhPBtIukbSdI4D6pleCmUyMEmbg44I5xKwjVikVQXdqoaqoe1JVyccjsOmdD19ViSLki4oE72lG4l9wbNPIZ2XDHZ5OFZMBA0VHRNa3eFhcVj-jY_0IkUuyIzEe_RyCLsY0nPO81VTQRXD3VaNUBMVtS1ovrDRrL0HPQylQeL9HaVbMMQ/s400/Lesson7-16.png" width="400" /></a></div>
Make sure the choices are in numerical order, for sanity's sake. Click "OK". Click on the green "Save and Close" button and <b>save your work</b>. Start the application and try out the changes in the Customer Browse form.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR9_-wbd6Zl3p9bIiTgc6kWOHOzz2gRvJqS4x2N7IATwRIof6BLV6qiIdm8auS2ipSPdESxf0JgL4g4U3RmETr9EAp1f9vM1xMwpQg8QBL5MUEl8ObUw5NySvobVwG115Yt6EfxdRCnilt-kB46FO6XacfRaFnncMQd3K-BhglMOt4QADASA/s680/Lesson7-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="522" data-original-width="680" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR9_-wbd6Zl3p9bIiTgc6kWOHOzz2gRvJqS4x2N7IATwRIof6BLV6qiIdm8auS2ipSPdESxf0JgL4g4U3RmETr9EAp1f9vM1xMwpQg8QBL5MUEl8ObUw5NySvobVwG115Yt6EfxdRCnilt-kB46FO6XacfRaFnncMQd3K-BhglMOt4QADASA/s400/Lesson7-17.png" width="400" /></a></div>
Adjust the screen to fit the data. Notice how the scroll bar is using up some of the data space, so let's make a note to reduce the size of the "City" column just a bit (change the width from "80" to "70"). Notice how the data is sorted by the field on which the key is based. Close the app and return to <i>Clarion</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdognFuKh71eF8Ao4vIB26D3uBkocnqLtxP0qRC-g61psEwmg_0aqIY1miezamp4Lwq0s8uynK0Us-qIWt6cd-DFa5DfnrV3BB14YI0UmycCahcHSiE8Rpzm6KCB1z7zpx9GTH0Qd-wbhLHnYicIF5cK_ljVC409IrevWUiNjA0JlaROzKXg/s1086/Lesson7-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="598" data-original-width="1086" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdognFuKh71eF8Ao4vIB26D3uBkocnqLtxP0qRC-g61psEwmg_0aqIY1miezamp4Lwq0s8uynK0Us-qIWt6cd-DFa5DfnrV3BB14YI0UmycCahcHSiE8Rpzm6KCB1z7zpx9GTH0Qd-wbhLHnYicIF5cK_ljVC409IrevWUiNjA0JlaROzKXg/s400/Lesson7-18.png" width="400" /></a></div>
Open the Window Designer and return to the "by State Code" tab. Add a button labeled "?btnDeleteThis" with text "Delete this State:" and Red TextColor. Change the adjacent "State" control to have red text too, and line up their middles for neatness.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLrQbEpPtxXwcTUlPQ3NswxPcBbkk_ZMi0trXYImza7SZBzDd2z3MdMEpAhP2cSz8Ra1tDmOO_9R-uhXGPs9nSpNSRps3Y59l6dPqFgCUitF3X8eqr9Ql9DFSRWc5lbo_7a-WlQJ-GdRVGaFcaTnV7ehwYmcoC7f9xu-Bjm6eNeSluHU5kw/s848/Lesson7-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="399" data-original-width="848" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLrQbEpPtxXwcTUlPQ3NswxPcBbkk_ZMi0trXYImza7SZBzDd2z3MdMEpAhP2cSz8Ra1tDmOO_9R-uhXGPs9nSpNSRps3Y59l6dPqFgCUitF3X8eqr9Ql9DFSRWc5lbo_7a-WlQJ-GdRVGaFcaTnV7ehwYmcoC7f9xu-Bjm6eNeSluHU5kw/s400/Lesson7-19.png" width="400" /></a></div>
Double-click on the button and click on the "Accepted" event. Thenc click on the "Insert" button and choose "Source". Type in "ud.Debug(' btnDeleteThis ' & CUS:State)" and click on the green "Save and Close" buttons (three times) and <b>save your work</b>.<br />
<b>Note</b>: <i>always</i> use the "Insert" button shown. <i>Do not be tempted</i> to use the "Source" button to get into the code and add in stuff. It will cause the Clarion IDE to crash and you will lose some of your work. <i>Never enter the Embeditor directly from the Window Designer</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj66TQJlffGDt2tLqkyA_dwkMi6epTDwPt_F-uw8bMtTxgVdf51qon4yrPY-tUe2R9naHBFBKGyyc7IQU0ccHtRNyRfPoO-WEooPriyvnmBEAr03HYK3LmKgvw4ETS3pWFCKaGPpENSAEqr1k7jCE8W6Mddn82-W0eYwRsf-8svLZyhhBwWPQ/s816/Lesson7-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="619" data-original-width="816" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj66TQJlffGDt2tLqkyA_dwkMi6epTDwPt_F-uw8bMtTxgVdf51qon4yrPY-tUe2R9naHBFBKGyyc7IQU0ccHtRNyRfPoO-WEooPriyvnmBEAr03HYK3LmKgvw4ETS3pWFCKaGPpENSAEqr1k7jCE8W6Mddn82-W0eYwRsf-8svLZyhhBwWPQ/s400/Lesson7-20.png" width="400" /></a></div>
Now that we have left the Window Designer, we can go to the code using the Embeditor. Click on the "Next Filled Embed" button a few times until you get to the "btnDeleteThis" section. The code is not going to be the same as the previous button, but we will borrow pieces from it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimGKj-MJcMAZ3Lk3GznnejkGWmYyBnIRF3x6ng_O8moXb1l2CA70YNnacEF4KY2y0baKA4MMEEwSoOFaHfqeKcFVE3rM1mHTx9T1S-KYZd-ZceFtjP_cDciEvpcYs9EVxYxK4QsBK_EuyGteD9FagI1uzXj95DDwfbrEEO6VytZ61zvYvfGg/s568/Lesson7-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="268" data-original-width="568" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimGKj-MJcMAZ3Lk3GznnejkGWmYyBnIRF3x6ng_O8moXb1l2CA70YNnacEF4KY2y0baKA4MMEEwSoOFaHfqeKcFVE3rM1mHTx9T1S-KYZd-ZceFtjP_cDciEvpcYs9EVxYxK4QsBK_EuyGteD9FagI1uzXj95DDwfbrEEO6VytZ61zvYvfGg/s400/Lesson7-21.png" width="400" /></a></div>
First, move up to the top of the "ThisWindow.TakeAccepted" procedure, and define two variables as shown. Then move down to the "btnDeleteCA" code block and change the three "i#" entries to "i" because we have explicitly defined the i variable as LONG. Now let's write the new code:<br />
<pre> strStateCode = clip(CUS:State) ! Remember which state to delete
ud.Debug(' ?btnDeleteThis ' & strStateCode)
Access:Customer.UseFile()
if Access:Customer.TryOpen() = Level:Benign then ! Customer Open
Access:Customer.<b>ClearKey</b>(CUS:KEYSTATECODE) ! Top of the index
<b>CUS:State = strStateCode ! Jump to this state</b>
! SET using this index, starting at this index value
<b>SET(CUS:KEYSTATECODE,CUS:KEYSTATECODE)</b>
i = 0
<b>LOOP UNTIL</b> Access:Customer.<b>TryNext</b>() <> Level:Benign ! Cust Loop
if clip(CUS:State) = strStateCode then ! State
! Display Customer Number
?btnDeleteThis{PROP:Text} = clip(CUS:CustNumber)
DISPLAY() ! Update the screen display
!// Delete without asking
if Access:Customer.<b>DeleteRecord</b>(False) |
= Level:Benign then ! Delete
ud.Debug(' Record deleted ' & CUS:CustNumber)
i += 1 ! Count the deleted record
else ! Delete
ud.Debug(' Record NOT deleted: ' & CUS:CustNumber)
MESSAGE('Unable to delete ' & CUS:Company)
end ! Delete
else ! State
!// We have moved on to the next state code
ud.Debug(' Break at ' & CUS:State)
<b>BREAK</b> ! All done
end ! State
<b>END</b> ! Cust Loop
end ! Customer Open
Access:Customer.<b>Close</b>()
?btnDeleteThis{PROP:Text} = 'Deleted ' & i ! No of records deleted
ThisWindow.Reset(1) ! Update display to remove the deleted records
ud.Debug(' <btnDeleteThis ' & strStateCode) </pre>
Note the <b>SET</b> command has the same index listed twice, to specify the search and sort order, and to allow you to specify the starting point of the loop. From the help file: "<b>SET (<i>key,key</i>)</b> specifies keyed sequence processing and positions to the first ... record which contains values matching the values in the component fields of the key. Both key parameters must be the same."
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />I always think of this technique as the "hop, skip and jump" method. We start with the index being reset. Then we use the assignment statement to tell the index which record to "<b>hop</b>" to. While we loop through the records, we are <b>skipping</b> from one valid record to the next. When we run out of valid records, we use the BREAK command to "<b>jump</b>" out of the loop because there are no more valid records. The index is doing most of the work, instead of having to rummage through <i>all the records</i> in the entire table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpvspKFWipOryo8bFmfRqgyKhm9i-MiMGZ-UEKGKX8Xg3wPFBJgj2lEuCx_o5OM4ppdiPnly_caYwOPNb_QIjtc8ZQYhTy9R2fnoDup-FzOoabgYXklycHJ10Vf8bHfvHzW_z7_NAAxKKZG1-Ny8SA6KnqkytZq6-bcczVLs-Y3Vv_pSkB8Q/s742/Lesson7-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="670" data-original-width="742" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpvspKFWipOryo8bFmfRqgyKhm9i-MiMGZ-UEKGKX8Xg3wPFBJgj2lEuCx_o5OM4ppdiPnly_caYwOPNb_QIjtc8ZQYhTy9R2fnoDup-FzOoabgYXklycHJ10Vf8bHfvHzW_z7_NAAxKKZG1-Ny8SA6KnqkytZq6-bcczVLs-Y3Vv_pSkB8Q/s400/Lesson7-22.png" width="400" /></a></div>
Close the Embeditor, save your work, and Start the application. Go to a state near the end of the alphabet (I chose Vermont) and click the "Delete this State:" button. Watch in the debugger how the program skips through the records.<br />
<br />
<h1>Exercise 8: Be Careful Not To Delete Parent Records</h1>
I <i>assumed</i> that since there was a relationship between Customers and Orders (and it has a "restrict" setting for deleting records) that "Customer" records with existing child records in the "Orders" table, would not be deleted. <i>I was wrong</i>. In any case, it is always better to check for these things <i>explicity</i> than to expect them to happen <i>implicitly</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFncK4OjFAwyxSOZ1bssy8cX--fCNAu1mvngUi9IlfXdyzuJOv3XA5q7oFC7aKCmZc5eYgJ7W0T_sAwRQq5MAEvMvSOoY_nGbkNnqWaz2D8tzqI8f8rqeGjjSvxo90qUL2dQoS8ePRcAKkRSuSYoyd83UiIOr0ZZh3OgWpdu92YiKZrD6VBw/s595/Lesson8-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="454" data-original-width="595" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFncK4OjFAwyxSOZ1bssy8cX--fCNAu1mvngUi9IlfXdyzuJOv3XA5q7oFC7aKCmZc5eYgJ7W0T_sAwRQq5MAEvMvSOoY_nGbkNnqWaz2D8tzqI8f8rqeGjjSvxo90qUL2dQoS8ePRcAKkRSuSYoyd83UiIOr0ZZh3OgWpdu92YiKZrD6VBw/s400/Lesson8-01.png" width="400" /></a></div>
Open the Embeditor for the "BrowseCustomers" form, and go to the "Data/Tables" panel. Click on the "Other Files" folder, and the "Add" button, and select the "Order" table. This makes it easy to see the Index and Field names, and to drag and drop them into the code. So let's modify the code for the "delete this" button:<br />
<pre> strStateCode = clip(CUS:State) ! Remember which state to delete
ud.Debug(' ?btnDeleteThis ' & strStateCode)
Access:Customer.UseFile()
if <b>Access:Order.TryOpen</b>() = Level:Benign then ! Order Open
if Access:Customer.TryOpen() = Level:Benign then ! Customer Open
<b>Access:Order.ClearKey</b>(ORD:KEYCUSTNUMBER) ! Top of the index
Access:Customer.ClearKey(CUS:KEYSTATECODE) ! Top of the index
CUS:State = strStateCode ! Jump to this state
SET(CUS:KEYSTATECODE,CUS:KEYSTATECODE)
SET(ORD:KEYCUSTNUMBER) ! Use this index to find stuff
i = 0
LOOP UNTIL Access:Customer.TryNext() <> Level:Benign ! Cust Loop
if clip(CUS:State) = strStateCode then ! State
?btnDeleteThis{PROP:Text} = clip(CUS:CustNumber) ! Display Cust #
DISPLAY() ! Update the screen display
!// Delete without asking
<span style="color: #0c343d;">! Look for this Customer in the Orders Table
<b>ORD:CustNumber = CUS:CustNumber</b>
IF <b>Access:Order.TryFetch</b>(ORD:KEYCUSTNUMBER) |
<> Level:Benign THEN ! Orders
!// No orders found. Safe to delete empty customer
if Access:Customer.DeleteRecord(False) |
= Level:Benign then ! Delete
ud.Debug(' Record deleted ' & CUS:CustNumber)
i += 1 ! Count the deleted record
else ! Delete
ud.Debug(' Record NOT deleted: ' & CUS:CustNumber)
MESSAGE('Unable to delete ' & CUS:Company)
end ! Delete
ELSE ! Orders
ud.Debug(' Orders exist. Record NOT deleted: ' & CUS:CustNumber)
MESSAGE('Unable to delete ' & clip(CUS:Company) |
& ' because of existing orders')
END ! Orders</span>
else ! State
!// We have moved on to the next state code
ud.Debug(' Break at ' & CUS:State)
BREAK ! All done
end ! State
END ! Cust Loop
end ! Customer Open
end ! Order Open
Access:Customer.Close()
<b>Access:Order.Close</b>()
?btnDeleteThis{PROP:Text} = 'Deleted ' & i ! No of records deleted
ThisWindow.Reset(1) ! Update display to remove the deleted records
ud.Debug(' <btnDeleteThis ' & strStateCode)
</pre>
Now that we have the required checks in place, "Save and Close" the Embeditor, <b>save your work</b>, and start the application.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmFn3NX8SjBOR7b4a2t_afwcan_S5BYHw9HLgHqS_cJ2InFg9wWmxVomm1CjDJGjgVYqsngCzGdKbY-RIp7LaFc1DPqrxkbJJgt0OTPFHDiSAJqfS4TMw_aFcOKrsCH4Q2tflQCElVTI2yD0Nj7DelNj_tzMGF2IPNlse_zgJsovB1mxGEzA/s679/Lesson8-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="521" data-original-width="679" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmFn3NX8SjBOR7b4a2t_afwcan_S5BYHw9HLgHqS_cJ2InFg9wWmxVomm1CjDJGjgVYqsngCzGdKbY-RIp7LaFc1DPqrxkbJJgt0OTPFHDiSAJqfS4TMw_aFcOKrsCH4Q2tflQCElVTI2yD0Nj7DelNj_tzMGF2IPNlse_zgJsovB1mxGEzA/s400/Lesson8-02.png" width="400" /></a></div>
Change to the "by State Code" tab, and choose South Carolina. Click on the "Delete this State" button. The first record in the Customer table has an invoice, so we get the correct notification. Same with the third customer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilG19m0g4DCgSzGEBGJfQCzapAn_eOp12sjFx-g8l_Xoa9w9gT3jKbruLI3ShMW7rH6KNWkIhQ-q8ktztZBdsc_tUKRWcW9ltzrwjLXWcYs6kPKVeKQIIuY0giCGwMEVL5jtSmbtvjbWNaMWo5u_-NQZGbcqfmPv2NyIYJo0QjZqv9r6_Z7g/s682/Lesson8-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="520" data-original-width="682" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilG19m0g4DCgSzGEBGJfQCzapAn_eOp12sjFx-g8l_Xoa9w9gT3jKbruLI3ShMW7rH6KNWkIhQ-q8ktztZBdsc_tUKRWcW9ltzrwjLXWcYs6kPKVeKQIIuY0giCGwMEVL5jtSmbtvjbWNaMWo5u_-NQZGbcqfmPv2NyIYJo0QjZqv9r6_Z7g/s400/Lesson8-03.png" width="400" /></a></div>
In the end, we deleted the empty customers, and two SC customers remain. We would have to delete their orders before we should delete these customers.
<br />
<br />
<h2>Essential Reading</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKtz1q-oJ34jbATGH2kK7JAolh8S6pRiyrv8DZIgO0jzk9sJponJpa1eTA_Byu7Iab6ZIiWG5QoAJf3x6Mi8IWptyEMKYW6VnGACaT6TpRg5VdLyvdmqlzkcAlY6TDFbZxzBhL8Hhf4twcAfWzFOiyZrW6bdcClDNF1y1GTYT74aNe6TkHA/s531/Programming%20in%20Clarion%27s%20ABC.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="531" data-original-width="411" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGKtz1q-oJ34jbATGH2kK7JAolh8S6pRiyrv8DZIgO0jzk9sJponJpa1eTA_Byu7Iab6ZIiWG5QoAJf3x6Mi8IWptyEMKYW6VnGACaT6TpRg5VdLyvdmqlzkcAlY6TDFbZxzBhL8Hhf4twcAfWzFOiyZrW6bdcClDNF1y1GTYT74aNe6TkHA/s320/Programming%20in%20Clarion%27s%20ABC.PNG" /></a></div>
I learnt most of what is covered in these articles from "Section 2: Accessing Data Tables" from Bruce Johnson's book, "<a href="https://www.clarionshop.com/checkout.cfm?pid=1412&q=1&" target="_blank">Programming in Clarion's ABC</a>". You <i>really</i> need to invest $49 in this book. I was also assisted by some very helpful people at <a href="https://clarionhub.com/t/adding-and-updating-records-using-code/5692" target="_blank">ClarionHub</a>, who kindly guided me through my mistakes and misunderstandings.<br />
<br /><br />
<div align="center">[ <a h.ref="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-2.html">Introducing Clarion FileManager (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
<br />
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
<br />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-83133898642657857172022-10-28T19:41:00.037+02:002023-10-08T15:54:59.760+02:00Clarion Resources and Products<div class="separator" style="clear: both;"><a href="https://store.softvelocity.com/" style="display: block; padding: 1em 0px; text-align: center;" target="_blank"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This is an attempt to bring together the various useful <i><a href="https://pisoft.ru/verstak/insider/cw_history.htm" target="_blank">Clarion</a></i> resources, particularly those in Africa, since we have an <a href="https://chat.whatsapp.com/HSdZnjxq18OEYLeXQgC0Yx" rel="nofollow" target="_blank">Africa Clarion WhatsApp Group</a>. Please contact me on <i>WhatsApp</i> if you want your <i>Clarion-related</i> website to be included in this list.<br />
<br />
<h1>Clarion Accessories</h1>
<ul>
<li><b>Capesoft</b> has produced a number of indispensable accessories for <i>Clarion</i>, including <i>FM3</i>, <i>NetTalk</i>, <i>StringTheory</i> and others. Link: <a href="https://capesoft.com/clarion" target="_blank">CapeSoft Accessories for Clarion</a></li>
<li><b>ProperData</b> has two accessories: <i>Relational Browse</i>, and <i>Edit-on-the-spot</i>. Link: <a href="http://properdata.co.za/wp/index.php/produkte/clarion-tools/" target="_blank">ProperData</a></li>
<li><b>ClarionShop</b> is the marketplace for all the accessories mentioned here, plus many others from around the world. All prices are in US$. Link: <a href="https://www.clarionshop.com/secure/ProductsSearch" target="_blank">ClarionShop</a> </li>
</ul><br />
<br />
<h1>Built with Clarion</h1>
<ul>
<li><b>CapeSoft</b> develops Time & Attendance, Access Control, Job Costing, Panel Beating & Workshop Management, and Depreciation applications. Link: <a href="https://www.capesoft.com/" target="_blank">capesoft.com</a></li>
<li><b>Crommix</b> provides software and services to Pharmacies, Medical Centres, Clinics and businesses in Burkina Faso. Link: <a href="https://crommix-com.translate.goog/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US" target="_blank">crommix.com</a></li>
<li><b>Dr Smash Software</b> provides packages focused on the Motor Industry and the requirements around Insurance and Manufacturer Approvals. With packages that range from Basic Quoting to Full Financial Business management, Dr Smash is your one stop shop for all your Motor Industry software requirements. Link: <a href="https://drsmash.co.za/" target="_blank">Dr Smash</a></li>
<li><b>SofTrends Solutions</b> supplies Payroll, FAS Accounting, POS Inventory, Property Manager, HR Manager, Fleet Manager, Tours Manager, VetMed Manager, Insurance Brokers Manager, Hotel-Club Manager, and Bulk SMS. Custom software is the cornerstone of our business, based in Kenya. Link: <a href="http://www.softrendsolutions.com" target="_blank">SofTrends Solutions</a></li>
<li><b>Trident Software</b> focuses on Managing and Rental Agent Software (townhouse complexes, homeowner associations, retirement homes, business parks etc.) Contact Ken Ward 083 235 5495 Link: <a href="http://www.tridentsoftware-online.com/" target="_blank">Trident Software</a></li>
<li><b>WatchManager</b> is used in the security industry to handle numerous incoming burglar alarm messages, and assist the control centre operators to follow the correct instructions for dealing with different types of emergencies. Link: <a href="https://www.watchmanager.co.za/" target="_blank">WatchManager</a></li>
<li><b>WinFin</b> develops accounting software for farmers and business in English and Afrikaans. Developed by Helgard Scholtz at <a href="http://properdata.co.za/wp/index.php/contact/" target="_blank">ProperData</a>. Link: <a href="http://www.winfin.co.za/" target="_blank">WinFin</a></li>
</ul><br />
<br />
<h1>Worldwide Clarion Community: helping one another</h1>
<ul>
<li><b>Clarion Live</b> has been running support and information webinars for many years. They have also published some free utilities for the community to use. They also host the Clarion International Developers Conference every few years. Links: <a href="https://www.clarionlive.com/" target="_blank">ClarionLive</a>, <a href="https://www.cidc2019.com/" target="_blank">CIDC 2019</a>, <a href="https://www.cidc2020.com/" target="_blank">CIDC 2020/2</a>, <a href="https://www.cidclive.com/" target="_blank">CIDC 2023</a> (Sept 11-15 2023, Orlando, Florida).</li>
<li><b>ClarionHub</b> is the place to go to ask questions or share programming tips. Links: <a href="https://clarionhub.com/" target="_blank">ClarionHub</a></li>
<li><b>NetTalk Central</b> is the place to go to ask questions or share programming tips relating to the <i>NetTalk</i> ecosystem. Link: <a href="https://www.nettalkcentral.com/forum/" target="_blank">NetTalk Central</a></li>
<li><b>Clarion Mag</b> archive has articles from 1999 to 2011. It's a gold mine of useful stuff. Link: <a href="https://clarionmag.jira.com/wiki/spaces/archive/overview" target="_blank">clarionmag.jira.com</a></li>
<li><b>Clarion Blog</b> is the official announcement page for <i>SoftVelocity</i>. Link: <a href="https://clarionsharp.com/blog/" target="_blank">Clarion Blog</a></li>
<li><b>Principled Programming</b> is a set of principles published by Daniel Read in 2001. <a href="https://www.mustang.co.za/file/developerdotstar.txt" target="_blank">Copy and paste this file</a> in your main procedure to remind you of the principles. Article: <a href="https://www.developerdotstar.com/mag/articles/read_princprog.html" target="_blank">developerdotstar.com</a></li>
<li><b>Skype Chats</b> are available for a number of topics. This list comes from the <i>ClarionHub</i> forum. Link: <a href="https://clarionhub.com/t/skype-chat-groups-login-links/20" target="_blank">Skype Chat Groups listing</a></li>
<!-- We have created a discussion group to provide support, answer questions, or discuss problems you encounter.
NNTP: sv.clarion.clarion11
We have created a new AnyScreen newsgroup to provide support, answer questions:
NNTP: sv.clarion.anyscreen
You should report any problems you experience using the Problem Tracker system located at:
http://problemtracker.softvelocity.com
https://groups.google.com/g/comp.lang.clarion
-->
</ul><br />
<br />
<h1>Worldwide Clarion Accessories</h1>
<ul>
<li><b>SoftVelocity</b> is the source for <i>Clarion</i>, plus several add-ons: In-Memory Driver, IP Driver, <i>AnyScreen</i>, Business Maths Library, Report Writer, etc. Link: <a href="https://store.softvelocity.com/" target="_blank">store.softvelocity.com</a> </li>
<li><b>Noyantis Software</b> is a leading provider of Clarion Wrapper Templates. Each of our wrapper templates enables Clarion developers to quickly add powerful enhancements to their applications in a matter of minutes. Link: <a href="https://noyantis.com/clarion/" target="_blank">noyantis.com</a> </li>
<li><b>LinderSoft</b> is the home of <i>SetupBuilder</i>, a best-of-breed product for developers who want complete control over their software installations. Link: <a href="http://lindersoft.com/" target="_blank">lindersoft.com</a></li>
<li><b>ohnOsoft</b> products include <i>Classify.It!</i>, <i>Analyze.It!</i> and <i>Update.It!</i> . Link: <a href="https://ohnosoft.com/" target="_blank">ohnosoft.com</a></li>
<li><b>BoxSoft</b> has created a number of <i>Super Templates</i> for use by Clarion developers. They have several vertical market products written in Clarion. Link: <a href="https://boxsoft.net/supertemplates.htm" target="_blank">boxsoft.net</a> </li>
<li><b>IceTips</b> has Templates, Tools and Utilities for Clarion Developers. Link: <a href="https://www.icetips.com/products.php" target="_blank">icetips.com</a></li>
<li><b>CHT</b> is short for <i>Clarion Handy Tools</i>, a wide variety of templates, classes, utilities, apps and projects. Link: <a href="https://web.cwhandy.ca/presentcomponents.htm" target="_blank">cwhandy.ca</a></li>
<li><b>Mitten Software</b>: Clarion Tools, Templates and Programming. Link: <a href="https://www.mittensoftware.com/sitemap.htm" target="_blank">Mitten Software</a></li>
<li><b>Developer Team</b> has numerous useful templates, plus a facility for sending WhatsApp messages. Link: <a href="https://developerteam.com.ar/BrowseProductos?Producto=Templates" target="_blank">developerteam.com.ar</a></li>
<li><b>Templates Clarion</b> has some useful templates and products from Clarioneros in Argentina. Link: <a href="https://templatesclarion.com/front/" target="_blank">templatesclarion.com</a></li>
<li><b>Laro Group</b> is also based in Argentina, and have developed numerous templates. <a href="https://www.clariontemplates.com/" target="_blank">clariontemplates.com</a></li>
<li><b>Upper Park Solutions</b> is best known for their <i>Version Control</i> systems, but they also provide other Clarion services. Link: <a href="https://upperparksolutions.com/index.html" target="_blank">upperparksolutions.com</a></li>
<li><b>Ingasoft Plus</b> aims to make your life easy, with templates and tools. Link: <a href="http://www.ingasoftplus.com/Catalog.php" target="_blank">ingasoftplus.com</a></li>
<li><b>KlariSoft</b> develops for Clarion programmers, ranging from simple utility templates to class/template wrappers of various third-party software. Link: <a href="https://klarisoft.com/" target="_blank">klarisoft.com</a></li>
<li><b>Clarion ProSeries</b> are serious tools for Clarion developers. Link: <a href="https://www.clarionproseries.com/" target="_blank">clarionproseries.com</a></li>
</ul><br />
<br />
<h1>Worldwide Open Source Resources</h1>
<ul>
<li><b>GitHub</b> topics listed on <i>Github</i>. <i>Clarion.Studio</i> has foked and collected 109 repositories as well. Links: <a href="https://github.com/topics/clarion" target="_blank">github.com</a> and <a href="https://github.com/clarion-studio" target="_blank">Clarion.Studio</a></li>
<li><b>Clarion Community Help</b> is a wiki community project to keep the help for the Clarion up to date with additional notes and helpful pointers. Link: <a href="http://clarion.help/doku.php" target="_blank">clarion.help</a></li>
<li><b>Clarion Standards</b> is a document from <a href="https://www.mittensoftware.com/DL/STANDARD.ZIP" rel="nofollow" target="_blank">Mitten Software</a> that identifies good coding practice. It's a <a href="https://www.mittensoftware.com/DL/STANDARD.ZIP" rel="nofollow" target="_blank">ZIP download</a>.</li>
<li><b>Carl Barnes</b> has posted a number of useful code, examples, tools, templates and utilities. Link: <a href="https://github.com/CarlTBarnes" target="_blank">github.com</a>. His "<a href="https://github.com/CarlTBarnes?tab=following" target="_blank">following list</a>" has a lot of good stuff too.</li>
<li><b>Mike Duglas</b> has contributed 54 repositories. Many are free, some are commercial. Link: <a href="https://github.com/mikeduglas" target="_blank">github.com</a></li>
<li><b>Steve Parker</b> collected a large number of useful tips, FAQs, articles and files. These have been archived on the IceTips website. Link for articles: <a href="https://www.icetips.com/articleindex.php#category28" target="_blank">icetips.com</a>. Link for Downloads: <a href="https://www.icetips.com/downloads.php?dl=PAR2" target="_blank">icetips.com</a></li>
<li><b>ClarionLife.net</b> is a (Russian language) portal for Clarion developers. Google Translate will help. Link: <a href="https://www.clarionlife.net/" target="_blank">ClarionLife.net</a></li>
<li><b>The History of Clarion</b> is the (very unofficial) History of JPI, Clarion and SoftVelocity, by Paul Attryde. Link: <a href="https://pisoft.ru/verstak/insider/cw_history.htm" target="_blank">pisoft.ru</a></li>
<li><b>Programming Objects in Clarion</b> is an invaluable book by the late Russ Eggen. Link: <a href="https://github.com/mriffey/RADFusionObjectsInClarion" target="_blank">github.com</a></li>
</ul><br>
<br>
<h1>My Clarion Lessons</h1>
<ul>
<li><a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html"><b>Installing</b> Clarion 11 on Windows 10</a></li>
<li><a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html"><b>Introduction</b> to Clarion 11</a></li>
<li><a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html"><b>Getting Started</b> with Clarion</a> in 2 parts</li>
<li><a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html"><b>Backing up</b> your Clarion projects</a></li>
<li><a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html"><b>Learning Clarion</b></a> in 7 parts</li>
<li><a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html"><b>Adding Extensions</b> to Clarion</a></li>
<li><a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful <i>CapeSoft</i> <b>accessories</b> up to date</a></li>
<li><b><a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager</a></b> in 2 parts</li>
</ul><br>
These lists are a work in progress. Please send me any links you may have.<br />
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.comtag:blogger.com,1999:blog-19298483.post-15452257882261308342022-10-15T20:54:00.006+02:002023-10-02T19:59:50.760+02:00How to keep your useful CapeSoft accessories up to date<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
The accessories I use from from <i><a href="https://capesoft.com/accessories/downloads" target="_blank">CapeSoft</a></i> are updated regularly, as new features and fixes are released. I haven't signed up for the <i><a href="https://ohnosoft.com/index.php/update-it/" target="_blank">Ohnosoft Update.It!</a></i> service yet, so I have my own (manual) update method. First you need to <a href="https://www.mustang.co.za/file/CapesoftAccessoriesList.zip" rel="nofollow">download my list files</a>. Extract them to the "C:\Clarion11\accessory\Documents\Capesoft" folder.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />First, let's use the full list. Delete the current CapesoftAccessories.htm file, and then make a copy of "CapesoftAccessoriesFull.txt". <b>Rename the copy</b> to "CapesoftAccessories.htm" and open it in your browser.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ES_7voG86slvwl8ZDTHDDsTw1ntAOeVPM93K-IP57aa5Lm464SnYyMlLdyVgC48s7-P2qCIgBBTkcJW4_IJQJezGctKWjeG0uqqSLp8GSLjzTE26z1p96QJ5nDuOPIJdvePd4kWinCBNuHW1zDZwFRTXcX6ccko8CsCR907JqRpmOjAsSA/s867/CapeSoftFull.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="628" data-original-width="867" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ES_7voG86slvwl8ZDTHDDsTw1ntAOeVPM93K-IP57aa5Lm464SnYyMlLdyVgC48s7-P2qCIgBBTkcJW4_IJQJezGctKWjeG0uqqSLp8GSLjzTE26z1p96QJ5nDuOPIJdvePd4kWinCBNuHW1zDZwFRTXcX6ccko8CsCR907JqRpmOjAsSA/s400/CapeSoftFull.PNG" width="400" /></a></div>
It's a tweaked copy of the <a href="https://www.capesoft.com/docs/CapesoftAccessories.htm" target="_blank">CapeSoft Accessories</a> page. The second column shows the version numbers of their products that you may have installed. The right-hand column shows the current version number of the product. Close this page.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Delete the CapesoftAccessories.htm file, and then make a copy of "CapesoftAccessoriesMine.txt". <b>Rename the copy</b> to "CapesoftAccessories.htm" and open it in your browser. This is the list of the accessories that I have bought, but it's easy enough to edit the HTML to add or remove products from the list.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinG59NIR7h9jE3lYUuzLYmLGfKGV8lwG3f4u2D2rfkWLVw34lmbudxYSEjLm5Skvd2T0nEELiYE5dLoSxY5TKn3b7FU3CnYrZgZuvBvGvZo-wPNChICCVUfWTeWeIrUasM5MK3m3CNnqiBWfU4pKtxn36XvMkTXjm7ITd4HtHLSaRKNl4G9Q/s739/CapeSoftMine01.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="387" data-original-width="739" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinG59NIR7h9jE3lYUuzLYmLGfKGV8lwG3f4u2D2rfkWLVw34lmbudxYSEjLm5Skvd2T0nEELiYE5dLoSxY5TKn3b7FU3CnYrZgZuvBvGvZo-wPNChICCVUfWTeWeIrUasM5MK3m3CNnqiBWfU4pKtxn36XvMkTXjm7ITd4HtHLSaRKNl4G9Q/s400/CapeSoftMine01.PNG" width="400" /></a></div>
Notice how some of my accessories are out of date. I have highlighted them in yellow for this article. Click on the "<a href="https://www.capesoft.com/accessories/downloads.htm" target="_blank">Downloads</a>" link at the top of the page.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimAPTp9NnbHT0fFyodCHzXQmCaLcLtPF91flsdeTlNAxRGAfLmCPjyE5s6zS-jt4WErX4EgHJ6zGroK_cbVVdaxzcKxlmLKXcWAIv0Z8x4tF03EpggVGEoV6gXWbUA5gc0kuQLPK1Zp5iQaAP8rFNyUCf6UZnn1QjUOXwTg_d7w2wEeeWI_g/s902/CapeSoftMine02.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="711" data-original-width="902" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimAPTp9NnbHT0fFyodCHzXQmCaLcLtPF91flsdeTlNAxRGAfLmCPjyE5s6zS-jt4WErX4EgHJ6zGroK_cbVVdaxzcKxlmLKXcWAIv0Z8x4tF03EpggVGEoV6gXWbUA5gc0kuQLPK1Zp5iQaAP8rFNyUCf6UZnn1QjUOXwTg_d7w2wEeeWI_g/s400/CapeSoftMine02.PNG" width="400" /></a></div>Click on the "Last Updated" column heading to get all the new stuff to display first. Then click on the "Download" button for each new version you need. When the downloads are done, use the "Show in Folder" option in your browser to go to your Downloads folder.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />My downloads folder has a copy of my "SafeReader Passwords.txt" file, and a shortcut link to the folder I use to store all my CapeSoft installed files. Open the passwords file in notepad or your favourite text editor.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DHXXLS8FBDsSywbiXgfwPBmOdQLTrUk65qRJLnW7gvBHyQrFApwpfm1MdVjKSGMIkNS-dPWO0TMs6k8Hb1z8rJQ7xyDPPQ_CHgq3phDAYXXHQzo-TgSzu3oKped1NQSb5DX_BZHGmEWGV5T3Ia9g3F9Xw6YtC1fFmsLSgjvAYwyARU3f-A/s851/CapeSoftMine03.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="320" data-original-width="851" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_DHXXLS8FBDsSywbiXgfwPBmOdQLTrUk65qRJLnW7gvBHyQrFApwpfm1MdVjKSGMIkNS-dPWO0TMs6k8Hb1z8rJQ7xyDPPQ_CHgq3phDAYXXHQzo-TgSzu3oKped1NQSb5DX_BZHGmEWGV5T3Ia9g3F9Xw6YtC1fFmsLSgjvAYwyARU3f-A/s400/CapeSoftMine03.PNG" width="400" /></a></div>
Extract each .saf file, and rename the installer to include its version number, as shown here. Once you have done all the files, put today's date in the bottom of the passwords file, and save it. This will move it to the top of the downloads folder if you keep it sorted by "Date Modified", like I do.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><b>Copy</b> the updated passwords file to the "CapeSoft" folder. Then delete the .saf files and <b>move</b> the installer files to the "CapeSoft" folder. Then click on the "CapeSoft" shortcut link to go there.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />In my "CapeSoft" folder, I have a subfolder called "old". After I install each new accessory, I <b>move</b> the previous version of the accessory installer to the "old" file, just in case. The nice thing about these installers is they register the extension templates and stuff for you. I also have a shortcut to my "C:\Clarion11\accessory\Documents\Capesoft" folder. Click on it to return to this folder.<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7qxuE7EENkUDUhiA3EJ28OTZvvpKGHE02Ni-hZL3K3utT0uWh_1tLf1eg0fvUf63Z_cSEdZJ0h3PEG907QVCkegCT5ASr0VyPmxKYCEmtuZIE5lr8qaXHz1jF_AbplxTXJHrkffwcm9yvqG2yxc8qknKQgRD_HuZokKRHn5f_82ign85icA/s638/CapeSoftMine04.PNG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="351" data-original-width="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7qxuE7EENkUDUhiA3EJ28OTZvvpKGHE02Ni-hZL3K3utT0uWh_1tLf1eg0fvUf63Z_cSEdZJ0h3PEG907QVCkegCT5ASr0VyPmxKYCEmtuZIE5lr8qaXHz1jF_AbplxTXJHrkffwcm9yvqG2yxc8qknKQgRD_HuZokKRHn5f_82ign85icA/s400/CapeSoftMine04.PNG"/></a></div>
The installers have replaced your previous "CapesoftAccessories.htm" file with their own one. Rename it to "CapesoftAccessories.org.htm" and then copy "CapesoftAccessoriesMine.txt". Rename the copy to "CapesoftAccessories.htm" and open it. Voila! The version numbers should all match up, and all your useful <i>CapeSoft</i> accessories are up to date.<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxyBwQJlAiwz9tfpSNLCMPJrg6M8zQtKxJ8eQKdAKdGmzBp1OAy_milts-K05cexblM1_ujcPC56RVHeAkk7GVZoYQre7VCORneaok2wWxRfnfI2FyS0ID0kqRPotYNmjQplJ7vZQZAdQo-KzaOM7_8unPTHR18RArjhMjyq6ItqWGq2xeg/s325/CapeSoftLogo.PNG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="97" data-original-width="325" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWxyBwQJlAiwz9tfpSNLCMPJrg6M8zQtKxJ8eQKdAKdGmzBp1OAy_milts-K05cexblM1_ujcPC56RVHeAkk7GVZoYQre7VCORneaok2wWxRfnfI2FyS0ID0kqRPotYNmjQplJ7vZQZAdQo-KzaOM7_8unPTHR18RArjhMjyq6ItqWGq2xeg/s320/CapeSoftLogo.PNG"/></a></div>
<br><br>
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html">Clarion Resources and Products</a> ]<br>
[ <a h.ref="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br /></div>
<br>
<b>Update Tuesday 2 October 2023:</b> <a href="https://www.mustang.co.za/file/CapesoftAccessoriesList.zip" rel="nofollow">New version</a> of the text files, to open links in a new window, and listing additional <i>CapeSoft</i> products, such as xFiles 4, NetTalk 14, etc.<br>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-44770238162766173772022-10-06T19:51:00.015+02:002023-10-08T15:39:38.775+02:00Adding Extensions to Clarion<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
<i>Clarion</i> includes some useful templates and extensions, and there are many others, both free and commercial, that you can add. Let's consider some of these. First, go to <a href="https://www.clarionlive.com/Utilities.Htm" target="_blank">clarionlive.com</a>, and from the "other" menu, select "Utilities" to download the <a href="https://www.mediafire.com/file/gn86vyyho5fyv30/ClarionLiveUtilities.exe/file" target="_blank"><i>ClarionLive Utility Pack</i></a>. Next, visit <a href="https://www.capesoft.com/clarion" target="_blank">CapeSoft.com</a> and buy the <a href="https://www.capesoft.com/accessories/abcdefaultssp.htm" target="_blank">CapeSoft ABC Defaults</a> accessory. You will receive a decryption keyword for the download. You also need to download their free <a href="https://www.capesoft.com/ftp/public/safereaderinstall.exe" target="_blank">safe reader</a> utility to decrypt the <a href="https://www.capesoft.com/downloads#abcdefaults" target="_blank">ABC Defaults download</a>. Once you have the ABCDefaultsInstall.exe and ClarionLiveUtilities.exe files, close your <i>Clarion IDE</i>, and run the installers using all the default options.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxpPerONyFcvViVpbV07y3AD62pY_rGm-GdvgL6027LnOgxKeUFr8zDBq6lEOpYMBrMvtKn4ueLO3JDVF3BRPp9SHSQgDyufWGaWiuGNAUon6H7sWHcD1fDP71K8TJUXJ39ry7b6x3Np507YDoJu9REx8cEvaK-aUEPAj6113apKI-C9CeOg/s910/Templates01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="467" data-original-width="910" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxpPerONyFcvViVpbV07y3AD62pY_rGm-GdvgL6027LnOgxKeUFr8zDBq6lEOpYMBrMvtKn4ueLO3JDVF3BRPp9SHSQgDyufWGaWiuGNAUon6H7sWHcD1fDP71K8TJUXJ39ry7b6x3Np507YDoJu9REx8cEvaK-aUEPAj6113apKI-C9CeOg/s400/Templates01.png" width="400" /></a></div>
Open the <i>Clarion IDE</i> and then open your project, e.g. LCLesson. Click on the "Global Extensions" tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx6HiNMPbBd98zKGwe5KZ3ja5IwKtjVQLlrJzWIt_uSOW5m_ibOph9YSsYKWtAwDhlOVUCIHwI76UZ7LcUWkx4Wo_icjzVdmrxARucWzri394FELyJurx4cB_L1260XdD5SzcXX2nN7D6ypmHNdYV8LGKVUkGN3a2zvj1DJAn3DjNoqt9NRQ/s832/Templates02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="593" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx6HiNMPbBd98zKGwe5KZ3ja5IwKtjVQLlrJzWIt_uSOW5m_ibOph9YSsYKWtAwDhlOVUCIHwI76UZ7LcUWkx4Wo_icjzVdmrxARucWzri394FELyJurx4cB_L1260XdD5SzcXX2nN7D6ypmHNdYV8LGKVUkGN3a2zvj1DJAn3DjNoqt9NRQ/s400/Templates02.png" width="400" /></a></div>
Click on "Insert" and scroll down until you find the "cwVersion - Version Resource" template. Select it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdJJ6cV5dM2QdU8CqoeGDtJ8ysB1wJ9MrCUJKX9Kj56inb6JSgnTsSKAJFEZpm5IQr3pgtxisIGB_c-ZKHBertgsplO6iuyhhrxONzDZhjFYrJbqQASH0lTCAgVN-fN4IneWN1q79IUvKkv_x2Sdqcj4m-7mGT3LzI87FCbfXIBRtypl1lcg/s830/Templates03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="348" data-original-width="830" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdJJ6cV5dM2QdU8CqoeGDtJ8ysB1wJ9MrCUJKX9Kj56inb6JSgnTsSKAJFEZpm5IQr3pgtxisIGB_c-ZKHBertgsplO6iuyhhrxONzDZhjFYrJbqQASH0lTCAgVN-fN4IneWN1q79IUvKkv_x2Sdqcj4m-7mGT3LzI87FCbfXIBRtypl1lcg/s400/Templates03.png" width="400" /></a></div>
Fill in the fields as required, and go to the "Product Version" tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgb7lKnmdBFqIoHtOUOpOo4y1nnkArmsVwmgQGGClzSHNgwqfS9jrBM8UjYBUSbDLf9_hwiYSVO1y6iZbB3z2dRWOUwLYrm8MKUPhYygOnw5iaaq9jUeUImqSAhjmEUYj71r4cN1fI0KHCLiwSqmxUoG6KVcN6tfj1jYqYFslQeTrRYcwvdQ/s827/Templates04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="344" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgb7lKnmdBFqIoHtOUOpOo4y1nnkArmsVwmgQGGClzSHNgwqfS9jrBM8UjYBUSbDLf9_hwiYSVO1y6iZbB3z2dRWOUwLYrm8MKUPhYygOnw5iaaq9jUeUImqSAhjmEUYj71r4cN1fI0KHCLiwSqmxUoG6KVcN6tfj1jYqYFslQeTrRYcwvdQ/s400/Templates04.png" width="400" /></a></div>
Again, fill in the fields as required, and go to the next tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQER99yqa4kZJ0S3EMcebjA4pC75dCzirkmk0fKAOWB8GTtEnkCCjGJZ3v124ggFyZ6aL0pBHCruCFRw9GFoWm1MoMIdyTuObqjPBd4AUzaobk2BCWpcbkko08GbYQ227VW69_aD1IV5J0fHYLwZiW12nuCLthm3s5Hgowv8s_qprE5ta9tg/s828/Templates05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="345" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQER99yqa4kZJ0S3EMcebjA4pC75dCzirkmk0fKAOWB8GTtEnkCCjGJZ3v124ggFyZ6aL0pBHCruCFRw9GFoWm1MoMIdyTuObqjPBd4AUzaobk2BCWpcbkko08GbYQ227VW69_aD1IV5J0fHYLwZiW12nuCLthm3s5Hgowv8s_qprE5ta9tg/s400/Templates05.png" width="400" /></a></div>
These are my suggested options. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisLU8Mhwxp4hW3r7sJyOD7Jq_gsfGTfz2PW8Eoi2xpCPHmdqzZiqG_YK8Yvsv10ewOyg5C3gvKDu8Nqb0h4Txi3VBIb4Jf2dTwm0lHheyYt1jL6oH5iezcsRBLkfuJ5tIsXsOPV396h0DHGhftN2kAJA2TjYQ6goJLHcPSVmhFsBhbwpNjIA/s837/Templates06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="320" data-original-width="837" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisLU8Mhwxp4hW3r7sJyOD7Jq_gsfGTfz2PW8Eoi2xpCPHmdqzZiqG_YK8Yvsv10ewOyg5C3gvKDu8Nqb0h4Txi3VBIb4Jf2dTwm0lHheyYt1jL6oH5iezcsRBLkfuJ5tIsXsOPV396h0DHGhftN2kAJA2TjYQ6goJLHcPSVmhFsBhbwpNjIA/s600/Templates06.png" width="400" /></a></div>
Click on the "Generate and Make Current Application" button. Assuming it compiled without incident, open the folder that contains the LCLesson.exe file and right-click to view the file properties.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUsZJkeWsz3qfepSgdsf9hJ6uxj4B4FUKSStHew0zgmvHHyh7BxWM0ShMPuFD15lSMLfeoHVV_aBW8e7468TRC-R7KtOSoG6JduaLNYJUhVaq192bLVm3ssFQZjEJR-SDpgUR9q0UPj3_Te-uN9HOFtU6lQh1Rjp9JLIB13sl9QKqpuucncA/s651/Templates07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="540" data-original-width="651" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUsZJkeWsz3qfepSgdsf9hJ6uxj4B4FUKSStHew0zgmvHHyh7BxWM0ShMPuFD15lSMLfeoHVV_aBW8e7468TRC-R7KtOSoG6JduaLNYJUhVaq192bLVm3ssFQZjEJR-SDpgUR9q0UPj3_Te-uN9HOFtU6lQh1Rjp9JLIB13sl9QKqpuucncA/s600/Templates07.png" width="400" /></a></div>
As you can see, the file has professional version and product information, which was not present before.<br />
<br />
<h2>ABC Defaults</h2>
Let's return to the Clarion IDE and search for another template to use. Click on "Insert" and type "defaults" to the search bar.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4EAhU7bgpCqd7CV_TsNvSs5sZ2ZPh3iINpn6viDEgz8K8B7tbw8UAuZBnF3Zj9FtjnU1m1Lt5KjZeEv3b7rLBwX785zPvLC2tWXqEyRi6Z6HkDUHkqghQ1MpKUUWArfCiuv3BfIsxoHDDP4bh8KGO3qaQ1CvUSE3ClqnYAi84MORP0FkO-A/s831/Templates08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="614" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4EAhU7bgpCqd7CV_TsNvSs5sZ2ZPh3iINpn6viDEgz8K8B7tbw8UAuZBnF3Zj9FtjnU1m1Lt5KjZeEv3b7rLBwX785zPvLC2tWXqEyRi6Z6HkDUHkqghQ1MpKUUWArfCiuv3BfIsxoHDDP4bh8KGO3qaQ1CvUSE3ClqnYAi84MORP0FkO-A/s400/Templates08.png" width="400" /></a></div>
Select the "ActivateABCDefaults" template.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B3a4Dcv7q-ZmI7vncjp22f1QhdGqhWN5eDqqe1FSoEsq43htzfy2xr_dms6N4wPjT5fWu8Sy-yfa0cC9GE-D5rrmXTiBriXkACa1PMmTD3EkMyWd6CrfxG9tYowiENCPSg3mE2yohNRepHMnOANcEpfa-7HqfzEcFza7XWz0zrJ7aM5qSw/s832/Templates09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8B3a4Dcv7q-ZmI7vncjp22f1QhdGqhWN5eDqqe1FSoEsq43htzfy2xr_dms6N4wPjT5fWu8Sy-yfa0cC9GE-D5rrmXTiBriXkACa1PMmTD3EkMyWd6CrfxG9tYowiENCPSg3mE2yohNRepHMnOANcEpfa-7HqfzEcFza7XWz0zrJ7aM5qSw/s400/Templates09.png" width="400" /></a></div>
Click "OK" The <a href="https://www.capesoft.com/accessories/abcdefaultssp.htm" target="_blank">documentation</a> explains what this template does. Basically, it stops certain misbehaviour by your application when some error conditions arise.<br />
<br />
<h2>Ultimate Debug</h2>
Before we use this template, please download <a href="https://github.com/CobaltFusion/DebugViewPP" target="_blank">DebugView++</a> and install it. It is an extremely useful debugging tool for Windows. There are others, so if you are happier with a <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/debugview" target="_blank">different</a> one, that's also OK.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGXb7AF_lZtascMQJ57DVAr9sXYAuyHQkqZH5tGt8i_UwknvTrOTNotCy943DmFyLPO1NH73yBbVauG4uKNfW3AogLxr8pw4f01mIM3V0SqRSZUEOG0j8odoKasGJUILqvaflCG4roHZHdtuwW1_tU08VS0i1Iai-stfYyyx1crRRfLsueFg/s825/Templates10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="624" data-original-width="825" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGXb7AF_lZtascMQJ57DVAr9sXYAuyHQkqZH5tGt8i_UwknvTrOTNotCy943DmFyLPO1NH73yBbVauG4uKNfW3AogLxr8pw4f01mIM3V0SqRSZUEOG0j8odoKasGJUILqvaflCG4roHZHdtuwW1_tU08VS0i1Iai-stfYyyx1crRRfLsueFg/s400/Templates10.png" width="400" /></a></div>
Click "Insert" and search for "debug". Click on "UltimateDebugGlobal" and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCJK7rQYN_gXYMlfesNmem1v3eJPUzj362A-JTIT6tcL9gfgmPyV9wSdclF42f0_ReeNNnUB8kqq923EmMAKjfeTKPfhpGMb3sjsUgp1RGuuKFgIStTBAyBBkHAQ0HWBjDM8ymF0rxjf99d4ZOsnhoY9vLBW_hXmiNTYDEd2I_hK5zbmbjjg/s832/Templates11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="674" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCJK7rQYN_gXYMlfesNmem1v3eJPUzj362A-JTIT6tcL9gfgmPyV9wSdclF42f0_ReeNNnUB8kqq923EmMAKjfeTKPfhpGMb3sjsUgp1RGuuKFgIStTBAyBBkHAQ0HWBjDM8ymF0rxjf99d4ZOsnhoY9vLBW_hXmiNTYDEd2I_hK5zbmbjjg/s400/Templates11.png" width="400" /></a></div>
The default settings in the template are fine for now. You may want to tweak them later, but I haven't found a reason to do so yet. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5qV5Umbzp3DzteniPoXurtsUdtrHIiPaehgGSf9Z0PwfsjJpl0W3F-56tou-j0f_IKcN77ZJFnsFGSt7_u3RBG33Q3dLi7FRDc-YTZgXcuXwk5_h6iGN2Aidi7yV13U_XwZkQl60Zj0i5Uxk4aIJccnjkRLmEts1bWDTlb41rcegV4gVtTw/s833/Templates12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="336" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5qV5Umbzp3DzteniPoXurtsUdtrHIiPaehgGSf9Z0PwfsjJpl0W3F-56tou-j0f_IKcN77ZJFnsFGSt7_u3RBG33Q3dLi7FRDc-YTZgXcuXwk5_h6iGN2Aidi7yV13U_XwZkQl60Zj0i5Uxk4aIJccnjkRLmEts1bWDTlb41rcegV4gVtTw/s400/Templates12.png" width="400" /></a></div>
Build the solution as normal, and wait for the app to run. Then fire up your debugger program (DebugView++)<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy6vLfinxEB7sLDxvGQ9dOGaV6EwiI-QkWHabPV0-HddmSrH-5UvGsXM3w2OXuLHjXIGbYZ1U6EuR-a2MobsnxvwDAwvNJCNpbwHTBv9rKMV1i7qlcxb8BZYy6AOkPfjSixGlkzijbLRwPq4Iy_0Qg7l3F-ka4oBzGhrbOM-wdljluoO2FHg/s784/Templates13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="208" data-original-width="784" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy6vLfinxEB7sLDxvGQ9dOGaV6EwiI-QkWHabPV0-HddmSrH-5UvGsXM3w2OXuLHjXIGbYZ1U6EuR-a2MobsnxvwDAwvNJCNpbwHTBv9rKMV1i7qlcxb8BZYy6AOkPfjSixGlkzijbLRwPq4Iy_0Qg7l3F-ka4oBzGhrbOM-wdljluoO2FHg/s400/Templates13.png" width="400" /></a></div>
The template has inserted debug trace information into your program. As you open and close screens, the debugging information will display in the debug window. This is helpful in figuring out what your program is doing. In the next lesson we will add in some of our own debugging code.<br />
<br /><br />
<h2>One More Thing ...</h2>
I discovered a bug in the <i>Ultimate Version Resource</i> template while writing this lesson. So how do we disable or remove a template or extension? First, close the application you are busy with, and return to the IDE Start Page. Next, go to the "Tools" menu and select "Edit Template Registry".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBrDRKLSPElicejHsL3wFy3M2ULEn7w4Wiyb0Ad6nqoL7sDs6jVeeQnnA5e6p407aGM6-E7TI94UyPdTKwsLqSYqoWKM4O3c88kwQKYm6ndHJL0nKyZKuIrrHIb2NAAUE3NvqbuuSZxYe19wq1iWF4xFqXg07oVR6S9QFpBZyiPtMu_Ybwvw/s812/Templates14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="591" data-original-width="812" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBrDRKLSPElicejHsL3wFy3M2ULEn7w4Wiyb0Ad6nqoL7sDs6jVeeQnnA5e6p407aGM6-E7TI94UyPdTKwsLqSYqoWKM4O3c88kwQKYm6ndHJL0nKyZKuIrrHIb2NAAUE3NvqbuuSZxYe19wq1iWF4xFqXg07oVR6S9QFpBZyiPtMu_Ybwvw/s400/Templates14.png" width="400" /></a></div>
Wait for the list to load. Then click on the "Contract All Nodes" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhitrVuKNVbEVZpkgzWx8tl-_A8cW-Y7kKlmYaj5jYx54ubixQmUrJT8VNxd8M7pxtsW6FZS45-BD9FCan3I1z5E8BSYln4oxL8Rk_HSCwCVfIjHiljEGXIhueFxG97Lgsqcd6IRJTsDo-iXNuzDNu4Mo-UZnQCyjiMJ29PFqAJ62Gq1wYOqQ/s836/Templates15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="488" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhitrVuKNVbEVZpkgzWx8tl-_A8cW-Y7kKlmYaj5jYx54ubixQmUrJT8VNxd8M7pxtsW6FZS45-BD9FCan3I1z5E8BSYln4oxL8Rk_HSCwCVfIjHiljEGXIhueFxG97Lgsqcd6IRJTsDo-iXNuzDNu4Mo-UZnQCyjiMJ29PFqAJ62Gq1wYOqQ/s400/Templates15.png" width="400" /></a></div>
Scroll down to find "Class UltimateVersion", select it and click the "Disable" button. Click on the green "Save and Exit" button. The "Ultimate Version Resource" is no longer shown when you try to insert an extension.<br />
<br />
<br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html">Clarion Resources and Products</a> ]<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br>
[ <a h.ref="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-34110184709973788552021-12-16T23:28:00.022+02:002022-11-19T20:10:29.036+02:00DisChem's Vaccine Lies<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEh8mzR9UVVVAUXLFvtl5T63fBDKlUqbwRvMdN_HnDxRQOalyGNBOnSVIhxxoKE_kIBIJh4dkTzrw0ubmtqZa9m-gnCbY_4rjk7R79gkeX6aMy6dy-WS6y9kUoVpM02l2A5Iok7QM_hPfjAimcc95r9WxeTxDaLmg2on_itvdavqgRF00C4ubQ=s3471" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="3471" data-original-width="2273" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEh8mzR9UVVVAUXLFvtl5T63fBDKlUqbwRvMdN_HnDxRQOalyGNBOnSVIhxxoKE_kIBIJh4dkTzrw0ubmtqZa9m-gnCbY_4rjk7R79gkeX6aMy6dy-WS6y9kUoVpM02l2A5Iok7QM_hPfjAimcc95r9WxeTxDaLmg2on_itvdavqgRF00C4ubQ=s400" /></a></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />I'm tired of all the lies and propaganda about the COVID-19 vaccines in South Africa. So now it's time to call out the unscientific rubbish being published by people who should know better. This poster by <a href="https://www.dischem.co.za/" rel="nofollow" target="_blank"><i>Dis-Chem</i></a> ("pharmacists who care") is a perfectly good example. They claim they got the information from <a href="https://covidcomms.org.za/" rel="nofollow" target="_blank">COVIDComms SA</a>, but even a few fact checks on <i>Google </i>would show how bogus this information is. That's how much they care. As long as they sell plenty of vaccine doses, what's a few white lies among friends?<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />1. Tested Twice</h3>
<blockquote>Vaccines are tested and approved internationally and in South Africa <b>before</b> they are given to people.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Oversimplified and misleading. There are two ongoing trials of the <i>Pfizer/BioNTech</i> vaccine, one sponsored by <i>BioNTech </i>in Germany (Phase 1), and another sponsored by <i>BioNTech(Pfizer) </i>in the USA, Argentina, Brazil, Turkey, South Africa and Germany (Phase 1,2,3). <b>Not all phases are completed</b>. None of the trials are <b>independent</b>, and the trial data is not available for public scrutiny. So, we have to rely on the <i>honesty of the manufacturer</i> to provide accurate data. The animal trials failed, so all of these trials are given to the trial participants (people) before they are given to the general public (also people). There were 771 people in phase 1, and 87,495 people in phases 2 and 3. [<a href="https://phmpt.org/wp-content/uploads/2021/11/5.2-tabular-listing.pdf" target="_blank">1</a>]. No "Vaccine safety" information provided.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />2. New Technologies</h3>
<blockquote>New technologies and information about other Coronaviruses before COVID-19 made production faster.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Vague and misleading. Presumably it is referring to the fact that these are mRNA vaccines. The mRNA technology hasn't been successful in any previous attempts at a vaccine. The manufacturers of the vaccine are immune from prosecution for any side effects, manufacturing defects, quality control lapses, or incorrect administration of the doses. For example, in the first 90 days after approval of the vaccine in the USA, 7 people died due to incorrect administration or dosing out of 2792 reported "Medication Error" events. Administration had not even started in South Africa at that point. [2:<a href="https://phmpt.org/wp-content/uploads/2021/11/5.3.6-postmarketing-experience.pdf" target="_blank">Page 26</a>]. Again, no "vaccine safety" information, just talk about faster production and new technologies.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />3. Over One Million Volunteers</h3>
<blockquote>Over one million volunteers were part of the testing process for the vaccine - 2 000 South Africans tested the vaccine.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
<b>Wrong</b>. NIAID was <i>looking for</i> a million volunteers [3:<a href="https://www.forbes.com/sites/oracle/2020/07/28/niaid-seeks-1-million-volunteers-for-covid-19-vaccine-trials/" target="_blank">July 2020</a>] but the <i>Pfizer </i>trial involved 90,000 people at best (see above), and it doesn't say how many South Africans were involved. The <i>Johnson & Johnson</i> trial involved 2,000 participants in South Africa [<a href="https://www.samrc.ac.za/news/covid-19-vaccine-challenges-running-trial-middle-pandemic" target="_blank">4</a>], but presumably half of them were in the control group, so they didn't "test" anything. Again, no mention of the safety of the trials.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />4. Millions Are Vaccinated</h3>
<blockquote>Over 700 million people around the world are already fully vaccinated.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Again, misleading. It implies that 700 million people were <i>safely</i> vaccinated, but avoids actually saying that. The real situation is being carefully concealed and manipulated by the drug companies, the "health" authorities, and many doctors (and pharmacists who care). [<a href="https://books.google.co.za/books/about/The_Real_Anthony_Fauci.html" target="_blank">5</a>] If you are convinced that the vaccine is "safe and effective" then what do you say when a patient dies within 48 hours of taking the vaccine? Who is going to pay for the autopsy? So the doctor says, "it's a coincidence" and doesn't mention the vaccine as cause of death. It happened to a family friend. They are too busy grieving to worry about the doctor's lies. So if you hear that millions are vaccinated but don't hear about the side effects and fatalities, does that mean the vaccine is safe?<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />5. Side Effects Are Tracked</h3>
<blockquote>Vaccines may have some side effects. All vaccine side effects are monitored over time.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Once again, this is false and misleading. It implies that "someone" is <i>actively monitoring</i> for vaccine side effects and injuries. <i>Pfizer </i>isn't doing it, and they admit as much. They are <i>passively </i>accepting data sent to them. This data has to be forced out of the FDA by a court order [<a href="https://phmpt.org/wp-content/uploads/2021/11/091621-Complaint.pdf" target="_blank">6</a>] after they sat on the data for months, and claimed it would take years to be released, despite their legal obligation to do so in a timeous fashion.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />So what are the known side effects? For the first 90 days of the <i>Pfizer </i>vaccine, there was a total of 42,086 case reports (25,379 medically confirmed and 16,707 non-medically confirmed) containing 158,893 events. Most cases (34,762) were received from United States (13,739), United Kingdom (13,404) Italy (2,578), Germany (1913), France (1506), Portugal (866) and Spain (756); the remaining 7,324 were distributed among 56 other countries. The <i>Pfizer </i>report [2:<a href="https://phmpt.org/wp-content/uploads/2021/11/5.3.6-postmarketing-experience.pdf" target="_blank">Page 7</a>] lists 1,223 fatalities out of those 42,086 reports. The report also lists:<ul>
<li>Nervous system disorders (25,957)</li>
<li>Musculoskeletal and connective tissue disorders (17,283)</li>
<li>Gastrointestinal disorders (14,096)</li>
<li>Skin and subcutaneous tissue disorders (8,476)</li>
<li>Respiratory, thoracic and mediastinal disorders (8,848)</li>
<li>Infections and infestations (4,610)</li>
<li>Injury, poisoning and procedural complications (5,590)</li>
<li>Investigations (3,693)</li></ul>
There is no mention whatsoever of menstrual cycle issues [<a href="https://www.spectator.co.uk/article/The-Covid-vaccines-may-affect-periods.-Are-we-allowed-to-talk-about-this" target="_blank">7</a>]. They are not even listed in the conditions tracked. British women have made 30,304 reports of changes to their periods after having received a Covid vaccine. So much for the official data from the manufacturer. Remember Thalidomide? The manufacturer's data said it was perfectly safe. Except when it wasn't.<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />How bad is 1,223 fatalities? Considering that the common vaccines (Polio; MMR: Measles, Mumps, Rubella; Tetanus; Rabies; etc) have reports of less than a dozen or so over the entire history of each vaccine, it would appear that the COVID-19 is TEN times more deadly than all the other common vaccines combined. Yet this "safety" information is not mentioned.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />6. Protects Against Serious Illness</h3>
<blockquote>You can still get COVID-19 but the vaccine protects from serious illness and death.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Where is the data? Most countries with high vaccination rates are still experiencing high death tolls and hospitalization rates. Most media reports try to spin this as "the unvaccinated" are getting sick, but the reality is quite different. One study shows that "Increases in COVID-19 are unrelated to levels of vaccination across 68 countries and 2947 counties in the United States" [<a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8481107/" target="_blank">8</a>]. Public officials are promoting "booster shots" as being necessary because the vaccine's "protection" only seems to last about 6 months. So I guess the death of 1,223 people in 90 days is not a <b>serious</b> death.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />7. Check for Side Effects</h3>
<blockquote>In the days after your jab, check your body for side effects like tiredness, soreness, headache, fever, dry cough, etc.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
All of the mentioned side effects are also listed as symptoms of a COVID-19 infection. That's because the vaccine generates the same toxic spike protein found in SARS-Cov-2. But the vaccine generates these toxic proteins in an unregulated way. Notice that none of the serious side effects listed above are included. <b>This is deliberately misleading</b>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Nor does the poster mention the risk of Anaphylactic shock, which is the reason why one has to wait for 15 minutes after the injection, to see if Anaphylaxis shows up. The <i>Pfizer </i>report [2:<a href="https://phmpt.org/wp-content/uploads/2021/11/5.3.6-postmarketing-experience.pdf" target="_blank">Page 10</a>] lists the following under the heading of Anaphylaxis:<ul>
<li>Relevant event seriousness: Serious (2341), Non-Serious (617);</li>
<li>Gender: <b>Females</b> (876), Males (106), Unknown (20);</li>
<li>Age (n=961) ranged from 16 to 98 years (mean = 54.8 years, median = 42.5 years);</li>
<li>Relevant event outcomes: fatal (9), resolved/resolving (1922), not resolved (229), resolved with <i>sequelae </i> [complications] (48), unknown (754).</li></ul>
No, I don't know why there were 2341 serious cases but only 961 people involved. Seems fishy to me too. So the "ten things you need to know about COVID-19 vaccine safety" poster obviously doesn't think you need to know about any of the real risks. Just puppy dogs and kittens.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />8. Works in Two Weeks</h3>
<blockquote>The vaccine will take two weeks before it gives protection against COVID-19.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Again, what is NOT said is more important than what is said. During those two weeks your immune system is <b>temporarily compromised</b> as it deals with the unregulated production of the toxic spike protein. So any conditions that you may have had in the past that were being suppressed by your immune system can flare up again. Also, you could get flu, COVID-19 or any other contagious disease if exposed to it during that period, and your body will probably battle to deal with both at the same time. But in many regions you aren't classified as "vaccinated" until after the two week window, so any problems that occur during that time may well be recorded as occurring in "unvaccinated" patients. That's how the data is skewed. Here is the CDC definition: "For the purposes of this guidance, people are considered fully vaccinated for COVID-19 ≥2 weeks after they have received the second dose in a 2-dose series (Pfizer-BioNTech or Moderna), or ≥2 weeks after they have received a single-dose vaccine (Johnson and Johnson) ... Unvaccinated people refers to individuals of all ages, including children, that have not completed a vaccination series or received a single-dose vaccine." [<a href="https://www.cdc.gov/coronavirus/2019-ncov/vaccines/fully-vaccinated-guidance.html" rel="nofollow" target="_blank">9</a>]. Again, no safety data, just a bland statement that the vaccine works (assuming you survive the two weeks).<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />9. Stay Safe</h3>
<blockquote>You can spread COVID-19 <b>to people not vaccinated</b>. Wear your mask. Sanitize. Social Distance.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
What? Let's unpack this a bit more: since you are presumably vaccinated, you got COVID-19, which means you can catch it from people who are vaccinated, and likewise spread it to people who are vaccinated. So why only mention people who are <b>not</b> vaccinated? This is blatantly dishonest from the "pharmacists who care".
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The other "stay safe" advice applies to both vaccinated and unvaccinated, which implies that the vaccine doesn't work. After all, a vaccine that would allow us to "return to normal" would be one that <b>prevents infection and transmission</b>, not one that supposedly prevents hospitalization and death. Except it doesn't do that either, it only <i>reduces</i> hospitalization and death, and only for a limited time, hence the need for "boosters".
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Once again, what is NOT said is most interesting in a poster about "public health": no mention of safe, effective early treatment, or the need to get fit, lose weight, avoid processed food, stop smoking and excessive drinking, take Vitamin C and D, and Zinc, Selenium and Quercetin. Since <i>Dis-Chem</i> sells these supplements, one would expect the "pharmacists who care" to mention these things, but they don't. They are the same pharmacists who sell (unhealthy) sweets and chocolates in the "gauntlet" aisle that you have to stand in while waiting for a teller. Because they care. About the bottom line, not your health.<br />
<br />
<h3 align="center"><img align="left" height="25" src="https://www.mustang.co.za/img/Quotation_Left.png" />10. Tell Your Family and Friends</h3>
<blockquote>Tell your friends and family about your experience and encourage them to get vaccinated.<img align="right" height="25" src="https://www.mustang.co.za/img/Quotation_Right.png" /></blockquote>
Yes, I got suckered by this one. I told my community that I didn't experience any bad side effects, just tiredness and a sore arm. I learnt back from my community that one person had a stroke, and another suffered pericarditis. My brother told me about a friend who had a bad reaction within 24 hours, went to hospital, and died within 48 hours. Of course, it had ABSOLUTELY NOTHING to do with the vaccine. Because the doctor said it was so. People just drop dead all the time for no reason. My niece's husband who isn't even 30 has been having heart palpitations. It was unusual in his age group until the pandemic came along.<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Accoring to Discovery CEO Adrian Gore, "... our own data mirrors the international research, proving Covid-19 vaccines to be extremely safe. Fewer than <b>one in every 20</b> <i>Discovery</i> members who received the <i>Pfizer-BioNTech</i> vaccine showed any signs of side effects within seven days of vaccination, and almost all were mild and resolved quickly." [<a href="https://www.businesslive.co.za/bd/opinion/2021-09-05-adrian-gore-why-we-are-mandating-vaccines-for-discoverys-sa-based-employees/" target="_blank" rel="nofollow">10</a>] So <5% got side effects, but he won't say how many were serious. That smells like spin to me. I don't feel reassured at all.<br />
<br />
So what should we make of the lies and disinformation in a single poster? It seems to me that the "Vaccine <i>uber alles</i>" brigade will go to any lengths to "nudge" people to get a vaccine that is ineffective at best (the pandemic isn't over in countries with high vaccination rates) and dangerous at worst. The mRNA vaccine manufactures toxic spike proteins in the body in an unregulated manner, so they can spread around the body and cause havoc with just about every part of the human body. What could possibly go wrong?<br />
<br />
<b>Update 17 December</b>: Unvaccinated employees must get vaccinated or be subjected to weekly tests, at their own expense. And they must wear expensive N95 masks. Dr Verwoerd would have been so proud of this version of #VaccineApartheid.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEhK5YMgyDB2L1tLhJTj9lgy69nbbnqmINDq3RWnt0_pAWq2c39FhaV7ZUn3A5PjfKad_OmYno63WtiJdZh1NJA0qzae50H2bzkPZrM687p_fTMHXOboFZ_CV_mkqY3Ev0yRbVrP_tKJFAlgF9GPrjpJcQFSMkK7pc5sMBEKT7dGnjYCxSREUA=s931" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="931" data-original-width="730" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEhK5YMgyDB2L1tLhJTj9lgy69nbbnqmINDq3RWnt0_pAWq2c39FhaV7ZUn3A5PjfKad_OmYno63WtiJdZh1NJA0qzae50H2bzkPZrM687p_fTMHXOboFZ_CV_mkqY3Ev0yRbVrP_tKJFAlgF9GPrjpJcQFSMkK7pc5sMBEKT7dGnjYCxSREUA=s400" /></a></div>
And in a cruel twist, <i>Dis-Chem</i> <b>doesn't sell</b> the <a href="https://www.dischem.co.za/catalogsearch/result/?q=n95+mask" rel="nofollow" target="_blank">N95 masks</a> their staff are expected to wear. Because they are <i>the pharmacists who care</i>.<br />
<b>Update 18 December</b>: I found some expensive "Civilian KN95" masks at one of their stores (but not online).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEiuelADk-7EcBWAN_v7bdLgD5EcKGyeb9KIg1SogrVILv6uePxLYWHQq-C5YKw5kvebqmVzCattoAjVOD1GqPTzL_nyEkgcTJxafzbLFWNEL07gZEaWRVOwnQ0T5BF0Mcmbc1IC4CQspssoM1FXVA5XcmsW7pqk7obgvh9sjCcakCKA0GnD8w=s800" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="741" data-original-width="800" src="https://blogger.googleusercontent.com/img/a/AVvXsEiuelADk-7EcBWAN_v7bdLgD5EcKGyeb9KIg1SogrVILv6uePxLYWHQq-C5YKw5kvebqmVzCattoAjVOD1GqPTzL_nyEkgcTJxafzbLFWNEL07gZEaWRVOwnQ0T5BF0Mcmbc1IC4CQspssoM1FXVA5XcmsW7pqk7obgvh9sjCcakCKA0GnD8w=s400" width="400" /></a></div>
It isn't clear if they are genuine or bogus [<a href="https://www.businessinsider.co.za/your-n95-mask-is-likely-fake-heres-how-to-tell-if-its-keeping-you-safe-2020-12" target="_blank">11</a>] or whether management is clear about the difference between N95 and KN95 masks [<a href="https://www.healthline.com/health-news/report-finds-kn95-masks-not-as-effective-as-n95-masks" target="_blank">12</a>] but the <i>SA Medical Journal</i> reports "KN95 filtering facepiece respirators distributed in South Africa fail safety testing protocols" [<a href="http://www.samj.org.za/index.php/samj/article/view/13162" target="_blank">13</a>], so they probably don't meet the requirements of the Vaccine Apartheid letter of 6 December. Was the "N95" requirement a typo, or a deliberate setup to be able to fire staff? Time will tell.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEg-1JdoHpfINFOvHsxiLFeT-lDTg_p20r3wfCdbAnHfEZk7__P6qxDRZmRDNNM0o9zZ1-vD_SdhiTuLXAiXHmEMQjwpYMNfDfvPTHhibTWeWgufL2HLpPtUvbcgp1Y14EEjoU4GIvXdxzMIQpoIP_imSt44lHwdjjSpu37yK5hwrjnt5WSgeg=s800" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="458" data-original-width="800" src="https://blogger.googleusercontent.com/img/a/AVvXsEg-1JdoHpfINFOvHsxiLFeT-lDTg_p20r3wfCdbAnHfEZk7__P6qxDRZmRDNNM0o9zZ1-vD_SdhiTuLXAiXHmEMQjwpYMNfDfvPTHhibTWeWgufL2HLpPtUvbcgp1Y14EEjoU4GIvXdxzMIQpoIP_imSt44lHwdjjSpu37yK5hwrjnt5WSgeg=s400" width="400" /></a></div>
The "KN95" masks cost R7.50 each, but the ones that most of their staff are currently wearing are cheaper, around R2 each. All of these masks use the idiotic loops around the ears, which means they don't fit properly, obvious by the way the pharmacists (who care) and other staff were wearing them.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEj8JBDOuwotXVuoRZgcctLyhrycpLiRx0sjTFJC2ej-nQW3xD2xu0bzIhEpUqla16iqg1K-_feGHQaZdFJ5n3oMybUyMPcMJn4m8zHOKcsbuV4aKRAJHUxMIA9JSGjVftztoPUYNlasaiWQAM9BbKOyqTqchc68sp4j1MtAKWLOMbeun6SPgA=s1373" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="1373" data-original-width="800" height="400" src="https://blogger.googleusercontent.com/img/a/AVvXsEj8JBDOuwotXVuoRZgcctLyhrycpLiRx0sjTFJC2ej-nQW3xD2xu0bzIhEpUqla16iqg1K-_feGHQaZdFJ5n3oMybUyMPcMJn4m8zHOKcsbuV4aKRAJHUxMIA9JSGjVftztoPUYNlasaiWQAM9BbKOyqTqchc68sp4j1MtAKWLOMbeun6SPgA=s400" /></a></div><br />
I could only find one mask that doesn't use the ear loops (R70), but instead has ties that you can use to tie behind your head, like the ones that surgeons use. Pathetic.<br />
<br>
<b>Update 14 January 2022</b>: <i>DisChem</i> has managed to get itself on <a href="https://theredlist.co.za/en/the-red-list" target="_blank">the red list</a> and face a consumer boycott. And then there's this:<br>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/a/AVvXsEjqg4le9-7isQ2JeqZUZZkhVheV8glhLKlqoMnyDTHec4y8mt2YIqcUWqq7nID3bxGU-n6H1hBnRZvTebosS854wRTiEcCUqoWMgbvYquZnT7skcXW091VbTsrVoY4V0m3pmbW93QmHRPkV81cg0c8oCS14ILKigyrph0yEFzOuUBvw5ao_sQ=s1024" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="400" data-original-height="1024" data-original-width="990" src="https://blogger.googleusercontent.com/img/a/AVvXsEjqg4le9-7isQ2JeqZUZZkhVheV8glhLKlqoMnyDTHec4y8mt2YIqcUWqq7nID3bxGU-n6H1hBnRZvTebosS854wRTiEcCUqoWMgbvYquZnT7skcXW091VbTsrVoY4V0m3pmbW93QmHRPkV81cg0c8oCS14ILKigyrph0yEFzOuUBvw5ao_sQ=s400"/></a></div>
The human rights attorney <a href="https://www.facebook.com/Schalk-van-der-Merwe-Official-101424978909784/" target="_blank">Schalk van der Merwe</a> posted this image on his Facebook page. He is also on <a href="https://www.linkedin.com/in/schalk-van-der-merwe-aa4a2315a/" target="_blank">LinkedIn</a>. It isn't clear whether he is suing <i>DisChem</i> or not.<br>
<br>
<!--
It seems that <i>everyone is lying</i> [<a href="https://thecovidworld.com/memory-hole-virtually-every-major-health-official-in-the-united-states-has-claimed-that-covid-shots-stop-the-virus/" target="_blank">14</a>] about the vaccine:<br>
<video controls src="https://thecovidworld.com/wp-content/uploads/2021/12/COVID.mp4" width="560"></video><br>
<br /> -->
<b>Update November 2022</b>: Last year they lied about the vaccine. This year their board turned racist and announced they would no longer be hiring any new "whites" to meet their racist "diversity targets". The most glaringly non-diverse part of their organisation is the <a href="https://dischemgroup.com/investors/board-of-directors/" target="_blank" rel="nofollow">senior management</a>, whose 5 male "executive directors" seem to be exclusively "white", and their 5 "non-executive directors" aren't. I wonder whether these "non-executive" directors really have any say in the running of the company, or whether they just feel they are token appointments, based soleley on the colour of their skin. So now their new motto should be: "<b>Dis-Chem: <i>pharmacists</i> who care; <i>management</i> that doesn't.</b>"<br><br>Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.comtag:blogger.com,1999:blog-19298483.post-71034808503246335552021-08-09T18:35:00.027+02:002021-08-22T18:01:40.228+02:00LastPass is Broken. Seriously Broken<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTcUDuwkvA8ZVYYfZW9WzQwIA0apR22sDmLEVRI0M3SGrkoK0kAWSmSbQC06C-r4Dbk3t3sVQkaSdON3ii6O8sxYzG_nYZBfZP5QS0P-Usc5119OXdoYJhAYpx6-Dm5ZT0k7JS/s489/irony.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="Irony" title="Irony" border="0" data-original-height="489" data-original-width="430" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTcUDuwkvA8ZVYYfZW9WzQwIA0apR22sDmLEVRI0M3SGrkoK0kAWSmSbQC06C-r4Dbk3t3sVQkaSdON3ii6O8sxYzG_nYZBfZP5QS0P-Usc5119OXdoYJhAYpx6-Dm5ZT0k7JS/s400/irony.PNG" /></a></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />I have used and recommended <i><a href="https://lastpass.com" rel="nofollow" target="_blank">LastPass</a></i> for years. It has allowed me to create random passwords for a gazillion websites that I have used or visited over the years. But I no longer wish to pay for the service: I have found the open source <i><a href="https://bitwarden.com/" target="_blank">BitWarden</a></i> product instead. I migrated all my passwords to <i>BitWarden</i>, and it seems to work just as well.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />It seems, however, that <i>LastPass </i>just doesn't want to say goodbye. No matter what I do, <b>I can't delete my account</b>. And they don't make it easy, either. First, you have to find the part of the website that "enables" you to delete the account.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaZO-piwd_BgntLRC6gkm962B7oi0mCfDjv0o5f3GxVJp_Bq9eGwu3tcNrTaX_b06Sxob959_C11uQ5dYxcTgVlYwnf3VCDf39_B7OmuhlDGI8mMRg6_KB_P4yrbq9LINRuv60/s1174/lastpass+delete+0.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="828" data-original-width="1174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaZO-piwd_BgntLRC6gkm962B7oi0mCfDjv0o5f3GxVJp_Bq9eGwu3tcNrTaX_b06Sxob959_C11uQ5dYxcTgVlYwnf3VCDf39_B7OmuhlDGI8mMRg6_KB_P4yrbq9LINRuv60/s400/lastpass+delete+0.PNG" width="400" /></a></div>Log in to your <i>LastPass</i> account and click on "Account Settings" at the bottom left. Then scroll down to "Account Information" and click on the "My Account" link.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRQojhx9QAMzRAXSeHyFw7xiP585WHlqJ4wJQVj1pvGVQlbEonorJzpCm92avzxXw7pFHGjJsg8m8q5mualueqvSsGAaZtM_LvzIFmOm4mfPoYb1Ek_e86mxm1yuupgUMRfC_h/s1132/lastpass+delete+00.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="690" data-original-width="1132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRQojhx9QAMzRAXSeHyFw7xiP585WHlqJ4wJQVj1pvGVQlbEonorJzpCm92avzxXw7pFHGjJsg8m8q5mualueqvSsGAaZtM_LvzIFmOm4mfPoYb1Ek_e86mxm1yuupgUMRfC_h/s400/lastpass+delete+00.PNG" width="400" /></a></div>
<b>Don't waste your time</b> trying to cancel your <i>PayPal</i> recurring payment. There isn't one. <i>LastPass</i> stopped using <i>PayPal</i>, but hasn't updated its website to reflect this. <b>Nor has it informed its customers</b>. So, you will be sent on a wild goose chase at <i>PayPal</i> that will only waste your time and achieve nothing. <span style="color: red;">#Strike1
</span><br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Rather, click on the button to "Delete or Reset Account".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwPqTpFmytgPKL00OOaTf3BNNiVD7CVyH66Mlr28NRKTvRMurmh23TRllygwjIeF3oHI_gM-OdrH1Km3eAt9j07W21cmJZJHc_rUHzmDs8EuLzFkg5yMYnR3dIMA0if_KxxS1M/s990/lastpass+delete+1.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="860" data-original-width="990" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwPqTpFmytgPKL00OOaTf3BNNiVD7CVyH66Mlr28NRKTvRMurmh23TRllygwjIeF3oHI_gM-OdrH1Km3eAt9j07W21cmJZJHc_rUHzmDs8EuLzFkg5yMYnR3dIMA0if_KxxS1M/s400/lastpass+delete+1.PNG" width="400" /></a></div>
I suggest you export all your data and click on the "Reset" button. This ensures that you no longer have any passwords stored on the <i>LastPass</i> servers. At least that part works.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Now let's try deleting the account. Click on the "Delete" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_w1M5jM5MhGwyUFIrfMpD_3Zbyiu-vC9BeFComRF6PV2PFkWFWwl9RVRgYtghvJoUCNMRlrtS-DKc7QBZqzQd2opFm2xgrlCAPAZTCktZJXVOVZhkL2crLB8zv66GsVt_S-MB/s1012/lastpass+delete+2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="767" data-original-width="1012" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_w1M5jM5MhGwyUFIrfMpD_3Zbyiu-vC9BeFComRF6PV2PFkWFWwl9RVRgYtghvJoUCNMRlrtS-DKc7QBZqzQd2opFm2xgrlCAPAZTCktZJXVOVZhkL2crLB8zv66GsVt_S-MB/s400/lastpass+delete+2.PNG" width="400" /></a></div>
You should get this fancy dialog box. Click on "Yes" because, actually, we do remember the <i>LastPass</i> master password. How else would we have been able to log in if we didn't?<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgilrzKgeIgnPlyboDNBxDYn9ajMvoEfQhM38eFD3VsUhAccVLzbOK7Qm1wvUIeJOBVbndzOucezV53_gwlzeWqlGyj6v2rVCILsR_ecxl_dDcUUhw2XkPfRzX4umJRVgRgH1rl/s988/lastpass+delete+3.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="781" data-original-width="988" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgilrzKgeIgnPlyboDNBxDYn9ajMvoEfQhM38eFD3VsUhAccVLzbOK7Qm1wvUIeJOBVbndzOucezV53_gwlzeWqlGyj6v2rVCILsR_ecxl_dDcUUhw2XkPfRzX4umJRVgRgH1rl/s400/lastpass+delete+3.PNG" width="400" /></a></div><b>
This dialog box is broken</b>. Presumably it would ask me to type in the master password, or something. I have no idea. <span style="color: red;">#Strike2</span><br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqHTvcqnzsIJ-L-Vm9qWf3wANoHEQuPNhUSxqBhg35Awy8hBGvTOBksjHX0QrDryRELeYX3TBrPsUvEIbDzC6baCtuPYfgCz2PwVoIFbqJh24qXmlLnQTXHzAqjJzdXbH_l2rS/s1025/lastpass+delete+4.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="783" data-original-width="1025" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqHTvcqnzsIJ-L-Vm9qWf3wANoHEQuPNhUSxqBhg35Awy8hBGvTOBksjHX0QrDryRELeYX3TBrPsUvEIbDzC6baCtuPYfgCz2PwVoIFbqJh24qXmlLnQTXHzAqjJzdXbH_l2rS/s400/lastpass+delete+4.PNG" width="400" /></a></div>
Go back to the delete button and answer "No" to the question about remembering the master password. Let's see if that works. Click on the "Send Email" button, just to waste your time. <span style="color: red;">#Strike3</span><br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxZs8VOakahLMpsgHQwF9fHe301QuZD8mHSVztO4mYqZ_CVIMJa_RYxiJzrE03OdLxV9JJ64zVvoHp3r2f_khctHC1HQ3z2MT0X30EpOL4AfpIenX3-udagn1o-7Gul8sJIx5l/s997/lastpass+delete+5.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="793" data-original-width="997" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxZs8VOakahLMpsgHQwF9fHe301QuZD8mHSVztO4mYqZ_CVIMJa_RYxiJzrE03OdLxV9JJ64zVvoHp3r2f_khctHC1HQ3z2MT0X30EpOL4AfpIenX3-udagn1o-7Gul8sJIx5l/s400/lastpass+delete+5.PNG" width="400" /></a></div>
OK, so now you look in your mailbox for the message from <i>LastPass</i>. If you are using Gmail, it's in the "Updates" section of your inbox.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDY4ZuUFqG6VBLlZnNDePpsYoCo0kRpTcGAaq-HZ2LJA8YAsA7WaqkEuwZzTLfQJubnq3IQf85JsXahUV_Kskp9xfkLVHeHUTzCW1lBfoM1ERr1-o8hya2tC_JrjeZ6PrlG3sE/s757/lastpass+delete+6.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="565" data-original-width="757" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDY4ZuUFqG6VBLlZnNDePpsYoCo0kRpTcGAaq-HZ2LJA8YAsA7WaqkEuwZzTLfQJubnq3IQf85JsXahUV_Kskp9xfkLVHeHUTzCW1lBfoM1ERr1-o8hya2tC_JrjeZ6PrlG3sE/s400/lastpass+delete+6.PNG" width="400" /></a></div>
So despite being told to "<i>never click on an email link</i>", we have to click on the email link in the message, which takes us to the following page:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKECi5sCfl3fikGyTox9pipGYcofAu-5w8y1S3bKGYsHtev0TAn8DCAMG0S5O1hXJ6Qxp7dCBecimzkqOLAFD4rUGWn6x8U-dpj4hG2vNVKvcmDKr7DbsLsPkAaMFrphIfJA8a/s730/lastpass+delete+7.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="377" data-original-width="730" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKECi5sCfl3fikGyTox9pipGYcofAu-5w8y1S3bKGYsHtev0TAn8DCAMG0S5O1hXJ6Qxp7dCBecimzkqOLAFD4rUGWn6x8U-dpj4hG2vNVKvcmDKr7DbsLsPkAaMFrphIfJA8a/s400/lastpass+delete+7.PNG" width="400" /></a></div>
Notice that we didn't have to log in to get here because we don't know our master password, remember? Fortunately, the link does expire after a while. <b>There are supposed to be some buttons</b> and other confirmation goodies on this page, but they aren't there. <span style="color: red;">#Strike4</span>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK6iMYjvJ3ZPqKXV7beRIJ6FUGWz4GW5cE2aO9GkmShyuV_Js7fYMMnkwByzVAUjlkvFNWoJy4UMUNR12T8xAylXcUG1B8862xFs-9du9FaWZwS1CVoNzQO6DnlsmrWEon6dU_/s954/lastpass+delete.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="640" data-original-width="954" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiK6iMYjvJ3ZPqKXV7beRIJ6FUGWz4GW5cE2aO9GkmShyuV_Js7fYMMnkwByzVAUjlkvFNWoJy4UMUNR12T8xAylXcUG1B8862xFs-9du9FaWZwS1CVoNzQO6DnlsmrWEon6dU_/s400/lastpass+delete.PNG" width="400" /></a></div>
So, I contacted the <i>LastPass </i>"help" desk. <b>No help whatsoever</b>. They asked me to try various things, all of which are mentioned above. <span style="color: red;">#Strike5</span>.<br />
<blockquote class="twitter-tweet"><p dir="ltr" lang="en">To delete your account you need to click on that link you were sent and confirm <a href="https://t.co/8dQQGPyQDR">https://t.co/8dQQGPyQDR</a> If you have already tried that and had trouble completing the process please provide details of what happened. ^GD</p>— LastPass Support (@LastPassHelp) <a href="https://twitter.com/LastPassHelp/status/1422939841629540354?ref_src=twsrc%5Etfw">August 4, 2021</a></blockquote> <script async="" charset="utf-8" src="https://platform.twitter.com/widgets.js"></script>
The <i>Twitter </i>account ignored my case number and told me to try various things, which didn't help. The link to their "<a href="https://support.logmeininc.com/lastpass/help/i-do-not-know-my-master-password-how-do-idelete-my-account" target="_blank">help</a>" mentions buttons that do not appear on the screen.
<br />So far I have tried the following browsers:<ul><li><i>Internet Explorer 11</i>. No extensions or add-ons</li>
<li><i>Google Chrome</i>, including Incognito mode, with all extensions disabled.</li>
<li><i>Firefox</i>, including private browsing, with all extensions disabled.</li>
<li><i>Microsoft Edge</i>, with no extensions.</li>
</ul>I'm running out of options here.
<br />I guess I'll have to wait until my "membership" comes up for renewal and see what happens then.<br />
<table width="100%" border="0" cellpadding="5" align="center"><tr><td><center><iframe width="560" height="315" src="https://www.youtube.com/embed/z_HmDP3lKMI" frameborder="0" allowfullscreen></iframe></center></td></tr></table>
<br />
<b>Update Tuesday 10th August</b>: I tried posting in the LastPass "<a href="https://community.logmein.com/t5/LastPass-Support-Discussions/Can-t-delete-my-premium-account/m-p/273330/highlight/true#M32930" target="_blank">Community Forum</a>" with some interesting results:<ul>
<li>The link to this blog article was deleted. <span style="color: red;">#Strike6</span></li>
<li>My question about "<a href="https://forums.grc.com/threads/lastpass-has-ties-to-china.255/" target="_blank">Does LastPass have ties to China?</a>" (from the GRC forums) was deleted completely from my LastPass forum post. I'll take that as a "yes".</li></ul>
I asked a simple question: <blockquote>"Why can't you guys just use basic HTML that is guaranteed to work on all browsers? Clearly this super-sensitive, entirely vulnerable, overly engineered JavaScript spread out over several modules doesn't work."</blockquote>Let's see if we get a coherent answer.<br />
<br />
<b>Update 2</b>: Apparently this is the screen I'm supposed to get:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBD-rDwgJUd67fo8A0HbaSqbmFy5YttfJDSHzTxTFSraZteRFjHBNB7PSPjJkEM6qto05OM1W_ZgK5uvlaM3qdJoBEIRQbnr0SKJr8sHR7KBK-tHKY2QrUOP04cAAk9tEk_WoN/s400/Screen+Shot+2021-08-09+at+1.22.45+PM.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="294" data-original-width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBD-rDwgJUd67fo8A0HbaSqbmFy5YttfJDSHzTxTFSraZteRFjHBNB7PSPjJkEM6qto05OM1W_ZgK5uvlaM3qdJoBEIRQbnr0SKJr8sHR7KBK-tHKY2QrUOP04cAAk9tEk_WoN/s400/Screen+Shot+2021-08-09+at+1.22.45+PM.png" width="400" /></a></div>
I decided to try downloading a <a href="https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/" target="_blank"><i>VirtualBox </i>image from <i>Microsoft</i></a> that contains just <i>Windows 7 Enterprise Edition</i> and <i>Internet Explorer 11</i>. It only works for 90 days and is designed for web developers to test their websites.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvpCkkJI14yZ_xgG5yUzryrb8QD1qtKJC2ndDFDvFyUrQaRGYn6xdbywdUO7NOaNJ_JJ39nGXfhWXR3fkPRGlONqlBbVnnQrtTHlRFunENtkfxXmdUAtVbfNyJfugXhRU0zW_/s1030/lastpass+win7+ie11.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="846" data-original-width="1030" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtvpCkkJI14yZ_xgG5yUzryrb8QD1qtKJC2ndDFDvFyUrQaRGYn6xdbywdUO7NOaNJ_JJ39nGXfhWXR3fkPRGlONqlBbVnnQrtTHlRFunENtkfxXmdUAtVbfNyJfugXhRU0zW_/s400/lastpass+win7+ie11.PNG" width="400" /></a></div>
After setting the DNS servers to 1.1.1.1 and 8.8.8.8 in the network settings, I ventured to the lastpass.com page and got the same result as before. This time I was using the default settings for IE 11 as recommended by <i>Microsoft</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvzxFtWgRXCM5p99M-z5HNNhwItp0GBbwE0Kuqba180kG2Jjw74l4lh8zTqpuM3eAtOgy_AcnYk7auUOMqZQLhYQ3ohLriofKhlB5zBmHgAnUDQH6pEk4TcDNMTwup6_SedrZV/s1032/lastpass+win7+firefox.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="849" data-original-width="1032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvzxFtWgRXCM5p99M-z5HNNhwItp0GBbwE0Kuqba180kG2Jjw74l4lh8zTqpuM3eAtOgy_AcnYk7auUOMqZQLhYQ3ohLriofKhlB5zBmHgAnUDQH6pEk4TcDNMTwup6_SedrZV/s400/lastpass+win7+firefox.PNG" width="400" /></a></div>
I also tried downloading and installing <i>Firefox</i>, and got exactly the same result with their default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR2c74JhUnBB-oNkzVrq1QToRvAW6GLcvSbUlrAQOOLJfwhZqLkcTRM-3Ug2RcVfKrepIruowUDZUneJ6b_e-oFiTIC0LA4pYNYuNfvzT4tTSAYrRj-ntNEr7x5ADFT-QWr7G2/s1027/lastpass+win7+brave.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="843" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR2c74JhUnBB-oNkzVrq1QToRvAW6GLcvSbUlrAQOOLJfwhZqLkcTRM-3Ug2RcVfKrepIruowUDZUneJ6b_e-oFiTIC0LA4pYNYuNfvzT4tTSAYrRj-ntNEr7x5ADFT-QWr7G2/s400/lastpass+win7+brave.PNG" width="400" /></a></div>
This is the <i>Brave</i> browser, again using default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ-iGFHIfOymsYPtWBTgaSbrtr8qajMj-kHhLDnfU9MCDTw53i4khetetsf5id1r1ujAHjqXLS4YLmIjMDYewbtEzayCNiNInKWp2m00HGuL5un4jofuYNFgScHtyF7Qjjs-0E/s1030/lastpass+win7+chrome.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="845" data-original-width="1030" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ-iGFHIfOymsYPtWBTgaSbrtr8qajMj-kHhLDnfU9MCDTw53i4khetetsf5id1r1ujAHjqXLS4YLmIjMDYewbtEzayCNiNInKWp2m00HGuL5un4jofuYNFgScHtyF7Qjjs-0E/s320/lastpass+win7+chrome.PNG" width="320" /></a></div>
Here is Google Chrome, using default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMqYSWXL6HJsh2tWMy0kV04P5ICRSyWWz2oTeoVcQwb2BhjYGUOxvQdhnnPgu_JpMFSMU5_WE2P_tbSM89elOQm5uhB7ITHhI5yktcbTJyOXuRVcPd4m83kFxa8DCn0kFfGAgP/s1028/lastpass+win7+edge.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="845" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMqYSWXL6HJsh2tWMy0kV04P5ICRSyWWz2oTeoVcQwb2BhjYGUOxvQdhnnPgu_JpMFSMU5_WE2P_tbSM89elOQm5uhB7ITHhI5yktcbTJyOXuRVcPd4m83kFxa8DCn0kFfGAgP/s400/lastpass+win7+edge.PNG" width="400" /></a></div>
Finally, <i>Microsoft Edge for Windows 7</i>. It must be <i>Windows 7</i> that is faulty. So let's try the <i>Microsoft VirtualBox</i> image with <i>MSEdge</i> and <i>Windows 10</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYs46LhIvSvtP4itgRDYKEmKwxDsGlEUUA8fH1PXrmUW_Ng587zjMrzAhsAu4W4-_jf3zOCn-SQ_fP8n_6kZgil89j-emNCeY8zHKhqrA9ngBhFJDk6QLBWYP6aaarA6e7RXp5/s1027/lastpass+win10+old+edge.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="846" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYs46LhIvSvtP4itgRDYKEmKwxDsGlEUUA8fH1PXrmUW_Ng587zjMrzAhsAu4W4-_jf3zOCn-SQ_fP8n_6kZgil89j-emNCeY8zHKhqrA9ngBhFJDk6QLBWYP6aaarA6e7RXp5/s400/lastpass+win10+old+edge.PNG" width="400" /></a></div>
The <b>original</b> <i>Microsoft Edge</i> browser with default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdarCqtg0xb9CoOYJa99u2ta2uYbTC9Gj8uQR46wHWpp_MnE7tOQn1qZWaof7O_SRe8vcBDG3r58b8fJOrI6IAU7cTY8lRC5MFCBSdbKRLDasDmM7F-xHpP1bTkcjrNeuXpTrv/s1028/lastpass+win10+new+edge.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="846" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdarCqtg0xb9CoOYJa99u2ta2uYbTC9Gj8uQR46wHWpp_MnE7tOQn1qZWaof7O_SRe8vcBDG3r58b8fJOrI6IAU7cTY8lRC5MFCBSdbKRLDasDmM7F-xHpP1bTkcjrNeuXpTrv/s400/lastpass+win10+new+edge.PNG" width="400" /></a></div>
The <b>new</b> <i>Microsoft Edge</i> browser with default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrBGPhYNHN4-7nu2G4qrA-wn9XO3Kq3oPlIOoh8qocQW6XRvf7VjFX_9aUYu79Q8HcphRuvvPCfL2b3c-PdDj0Ikp2dSwo23ZqgLvIGcfZ3oIk5MEBLrmT1IGajla5op5HduQQ/s1025/lastpass+win10+ie11.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="844" data-original-width="1025" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrBGPhYNHN4-7nu2G4qrA-wn9XO3Kq3oPlIOoh8qocQW6XRvf7VjFX_9aUYu79Q8HcphRuvvPCfL2b3c-PdDj0Ikp2dSwo23ZqgLvIGcfZ3oIk5MEBLrmT1IGajla5op5HduQQ/s400/lastpass+win10+ie11.PNG" width="400" /></a></div>
The creaky old <i>Microsoft Internet Explorer 11</i> browser with default settings.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2QvSx-uG1AS5adRPeQnb0f5N5oNP8lORDdNG49LBX-BaASOZ7A3uINOZBlyYS4XrJ1prB_3yK1fyDpDNUY83B_4Nr3iAvIY_qDaJ05vTS_BbdgrmUZTOM4ijmZlhNPyjIV4Mn/s1028/tracert.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="844" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2QvSx-uG1AS5adRPeQnb0f5N5oNP8lORDdNG49LBX-BaASOZ7A3uINOZBlyYS4XrJ1prB_3yK1fyDpDNUY83B_4Nr3iAvIY_qDaJ05vTS_BbdgrmUZTOM4ijmZlhNPyjIV4Mn/s400/tracert.PNG" width="400" /></a></div>
So if it isn't the choice of browser, or the choice of <i>Windows</i> version, maybe, just maybe, it has something to do with the lastpass.com <b>website</b>? I'm pretty sure the <i>LastPass</i> "help" centre is connecting to another version of lastpass.com, probably the one on their Intranet.<br />
It seems that <a href="https://community.logmein.com/t5/LastPass-Support-Discussions/Can-t-delete-LastPass-account/td-p/263559" target="_blank">I'm not the only one</a> who has had this problem.<br />
<br />
<b>Update Wednesday 11 August</b>: Remember my trace route (image above)? Well, I got this illuminating response:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLR0epr4MsTVNtaV97kbIWt_gGXHERKeZIlNBVPXCMTAquWYNtUetzn_-N9k-nu9r-TYG4eRMpLnsw_OLd_dZayfMla8Y3_hzNKQ-H2yyQfy4E9bDMML1u_HmrBH0Ulg0HxuoB/s635/lastpass+trace.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="182" data-original-width="635" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLR0epr4MsTVNtaV97kbIWt_gGXHERKeZIlNBVPXCMTAquWYNtUetzn_-N9k-nu9r-TYG4eRMpLnsw_OLd_dZayfMla8Y3_hzNKQ-H2yyQfy4E9bDMML1u_HmrBH0Ulg0HxuoB/s400/lastpass+trace.PNG" width="400" /></a></div>Thanks, Glenn, for disregarding possibly helpful technical information. My confidence in your organisation has grown in leaps and bounds. <span style="color: red;">#Strike7
</span><br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Remember the definition of insanity? Repeating the same thing over and over and expecting a different result. Well, the <i>LastPass</i> "Support" team seems to think that if they give you instructions that didn't work the first time, they will somehow work the next time. Maybe they just aren't saying it loudly enough.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjauGsWzwEMfDU_B_bnGwXsExm8mwxud6QJXGzPKj3fmotjaUj_olRyYfxFhcDXL2OQ6glWgHLvKG5OibIA2LJAsKQf3hC2jzRBpzwH-995WxFav-kqAl1YPQjDQPv0u3LVs24M/s726/LastPass+Case+15830220.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="672" data-original-width="726" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjauGsWzwEMfDU_B_bnGwXsExm8mwxud6QJXGzPKj3fmotjaUj_olRyYfxFhcDXL2OQ6glWgHLvKG5OibIA2LJAsKQf3hC2jzRBpzwH-995WxFav-kqAl1YPQjDQPv0u3LVs24M/s400/LastPass+Case+15830220.PNG" width="400" /></a></div>
Or if they say something completely incomprehensible, it will somehow make the problem go away:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixvj8VPQuMfihKV7rlIfHJwEsMVPHWfsp8RWEs5q5mhJiMfEXaKcJg76dbaYrUQz1yVmyOevSIbKGxzgEUyT3pFuiZtEdRyuntnqctdA9_nNH4e0mT08CLHtWF1B6RVx9KocZD/s695/LastPass+Case+15768010.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="619" data-original-width="695" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixvj8VPQuMfihKV7rlIfHJwEsMVPHWfsp8RWEs5q5mhJiMfEXaKcJg76dbaYrUQz1yVmyOevSIbKGxzgEUyT3pFuiZtEdRyuntnqctdA9_nNH4e0mT08CLHtWF1B6RVx9KocZD/s400/LastPass+Case+15768010.PNG" width="400" /></a></div>
See if you can figure out what this means. I have no idea.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZfd3XlBoIQkcfh4rjtiIixFGCZboHFTyS2EM-nmx1FH1_X7Rqt4joS4yGs5I_9m4F4TOSBDjArZlFbeJnpwMYEL9RJFCqAOaE6nJy85EgLi7FVXoCHt7mjStvMcUPsSp8v6_m/s625/lastpass+paypal+cancel.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="387" data-original-width="625" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZfd3XlBoIQkcfh4rjtiIixFGCZboHFTyS2EM-nmx1FH1_X7Rqt4joS4yGs5I_9m4F4TOSBDjArZlFbeJnpwMYEL9RJFCqAOaE6nJy85EgLi7FVXoCHt7mjStvMcUPsSp8v6_m/s400/lastpass+paypal+cancel.PNG" width="400" /></a></div>
On a different note, it now turns out that I need to cancel my subscription with <i>PayPal</i>. I have already pointed out that I can't do that because the instructions provided no longer work. So now I have to give them screenshots to show how it doesn't work.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7IelleZXHNX0VkDCttlatEUiNeP88VJexTTbBzijiFcrnbgW4yHH54OY87VJ9-TMeJh3z7McwSj0cXxwRouzaaatWvYsdcDvwUG5LR8QOSMiBGabprb25nQEwQaa-PP_oE8kr/s819/lastpass+cancel.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="233" data-original-width="819" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7IelleZXHNX0VkDCttlatEUiNeP88VJexTTbBzijiFcrnbgW4yHH54OY87VJ9-TMeJh3z7McwSj0cXxwRouzaaatWvYsdcDvwUG5LR8QOSMiBGabprb25nQEwQaa-PP_oE8kr/s400/lastpass+cancel.PNG" width="400" /></a></div>
As you can see, there is no "Yes" button to click on.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTZ8qeaxNdTGJnv9O80vGShnk0Ag1Tm6121OATxK8LYpyYwa43r9DM1CjPGRDFHWclep-JaGq42UqGTX5aUGgKTR8CM50SJNHcC_7DX0pxqDeD-Z1hcZfw02LBmQxubQCH3i0/s629/lastpass+paypal+cancel+2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="354" data-original-width="629" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTZ8qeaxNdTGJnv9O80vGShnk0Ag1Tm6121OATxK8LYpyYwa43r9DM1CjPGRDFHWclep-JaGq42UqGTX5aUGgKTR8CM50SJNHcC_7DX0pxqDeD-Z1hcZfw02LBmQxubQCH3i0/s400/lastpass+paypal+cancel+2.PNG" width="400" /></a></div>
So now we have some instructions that haven't worked since 2018, but let's try them anyway.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8tOcuP2Q6qItSaRL8m2KTPxiF3JYdyjSb3QdWs3WjtrayUcOVJRbdyCZqHX87mU7baefdpmoCQ4MZ8TN2pNFzZZNDCAbkHDW2BrcIFEl5Utd3P-weRE4tFqzCZx4uqOMdISK1/s1070/paypal+cancel.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="659" data-original-width="1070" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8tOcuP2Q6qItSaRL8m2KTPxiF3JYdyjSb3QdWs3WjtrayUcOVJRbdyCZqHX87mU7baefdpmoCQ4MZ8TN2pNFzZZNDCAbkHDW2BrcIFEl5Utd3P-weRE4tFqzCZx4uqOMdISK1/s400/paypal+cancel.PNG" width="400" /></a></div>
Step 1 and 2 still work: I can click on the gear icon. I can find the "Payments" section, but nothing about "Pre-approved payments" and only one active subscription (<i>Patreon</i>).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5Ls6JDfqQ4mNQpdqG3r3FqTcZXJydRBHm5dyWlM0nwbHphHyi5QGuMIdCo3DLVK44Crt2JKhc_SiD6qs-2Ylshk7HrMQ8Ja91BDwi5N7hR0EPImnrljKYPFAid6DplHB2DZV/s787/paypal+cancel+2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="499" data-original-width="787" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjA5Ls6JDfqQ4mNQpdqG3r3FqTcZXJydRBHm5dyWlM0nwbHphHyi5QGuMIdCo3DLVK44Crt2JKhc_SiD6qs-2Ylshk7HrMQ8Ja91BDwi5N7hR0EPImnrljKYPFAid6DplHB2DZV/s400/paypal+cancel+2.PNG" width="400" /></a></div>
I found two <i>LogMeIn</i> entries under "Inactive" but there is no "Cancel" button. <span style="color: red;">#Strike8</span> Now I know what the pilots in <i>Catch 22</i> felt like.<br />
<br />
<b>Update Thursday 12 August</b>: Eventually, the desired result:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG_kf_T3iqNDpOSUvN4ku0spO7OPR-P-Bc-yhNoZBxlZtoBI1W1n2p55noN503g1OZlcBnPozTOx10MrUwmR-vREu-jZ29bv3gGIQmtWhjUfQAav5n0Kl4qF9tTLG1jJlUOVI9/s574/lastpass+finally.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="458" data-original-width="574" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG_kf_T3iqNDpOSUvN4ku0spO7OPR-P-Bc-yhNoZBxlZtoBI1W1n2p55noN503g1OZlcBnPozTOx10MrUwmR-vREu-jZ29bv3gGIQmtWhjUfQAav5n0Kl4qF9tTLG1jJlUOVI9/s400/lastpass+finally.PNG" width="400" /></a></div>
I tried logging in, and it rejected my login. Yay!<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUxYK_0T1N8Xqg5wMVJLFOFAROwGzHNyxZt8Vs6-0AYzo7ExK-OZwzUdZtCNqfYjJhx_jdFLASt-HyCZMHQgQj8DUyuLEgvHGAn6rg-Nis3P6L2TSqQR29qR0-RVK3If9jUunC/s850/lastpass+finally+2.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="483" data-original-width="850" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUxYK_0T1N8Xqg5wMVJLFOFAROwGzHNyxZt8Vs6-0AYzo7ExK-OZwzUdZtCNqfYjJhx_jdFLASt-HyCZMHQgQj8DUyuLEgvHGAn6rg-Nis3P6L2TSqQR29qR0-RVK3If9jUunC/s400/lastpass+finally+2.PNG" width="400" /></a></div>
It has only taken <b>two weeks</b> to get them to cancel the account. Now I need to go through the same process for my wife's <i>LastPass</i> account. <br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-67189948444075343362021-07-31T19:29:00.005+02:002022-12-18T21:53:50.260+02:00Learning Clarion (Part 7)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This follows on from <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Learning Clarion (Part 6)</a>. In the lesson below, we’ll create the application’s reports. But first, we need to tidy up the data.<br />
<br />
<h1>Extra Lesson: Tidy Up the Data</h1>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEvsnk84YGKUJpiuYPKZu0FR3dkVmuFMH_wK0u_27q7dOqQvI9YsqY81RG2SYPyNuPCjYT4RjZFFM_25wtJTeXMe970Kj3iSvR6ob1IpI5cGFfJqi7m-ETZ0YCfLLbaDZ9nnU/s990/LC+Lesson+12-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="463" data-original-width="990" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMEvsnk84YGKUJpiuYPKZu0FR3dkVmuFMH_wK0u_27q7dOqQvI9YsqY81RG2SYPyNuPCjYT4RjZFFM_25wtJTeXMe970Kj3iSvR6ob1IpI5cGFfJqi7m-ETZ0YCfLLbaDZ9nnU/s400/LC+Lesson+12-01.png" width="400" /></a></div>
Use the "Save and Exit" button to close the LCLesson app. If the "Start Page" is not visible, click on the "Start Page" toolbar icon, and then click on "Dictionaries". Click on the "Location" link for LCLesson, to open the folder where the files are stored: "C:\Users\Public\Documents\SoftVelocity\Clarion11\Lessons\LearningClarion".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg38HiKGUmAXSdacfjRqJEZmiHbMqaoX48vVF83HZfhTBPAg9dXJUneyvD6s3Jyv15VLdIAczwfSthvh4NWGwqWRemz-cRcSAIjxiacsXMT6F7logYD5lKzeQWcMI8NiAbnoBtW/s513/LC+Lesson+12-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="291" data-original-width="513" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg38HiKGUmAXSdacfjRqJEZmiHbMqaoX48vVF83HZfhTBPAg9dXJUneyvD6s3Jyv15VLdIAczwfSthvh4NWGwqWRemz-cRcSAIjxiacsXMT6F7logYD5lKzeQWcMI8NiAbnoBtW/s400/LC+Lesson+12-02.png" width="400" /></a></div>
Find and rename the following files, changing the file extension from .tps to .tps.old:<pre>STATE.tps
ORDER.tps
PRODUCT.tps
DETAIL.tps</pre>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLvlhtx_vkS4s9_Rako5DKJ8EssdlGHzdNjyCZVVxMDQyRg2vPvFSOsePBkVfkwj2-Hfm8_fDnGf-bpgZhp5AGiERK5qc7UH7eot_mGnvHMMBelwDuBCgrSvJZpDfI6GeOSMoh/s617/LC+Lesson+12-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="487" data-original-width="617" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLvlhtx_vkS4s9_Rako5DKJ8EssdlGHzdNjyCZVVxMDQyRg2vPvFSOsePBkVfkwj2-Hfm8_fDnGf-bpgZhp5AGiERK5qc7UH7eot_mGnvHMMBelwDuBCgrSvJZpDfI6GeOSMoh/s400/LC+Lesson+12-03.png" width="400" /></a></div>
Next, go to the "Solution" folder and select the following 4 files:<pre>STATES.tps
ORDERS.tps
PRODUCTS.tps
DETAIL.tps</pre>
Once they are selected, press Ctrl-C to copy them. Go back to the "LearningClarion" folder and press Ctrl-V to paste these files. Rename STATES to STATE, ORDERS to ORDER, PRODUCTS to PRODUCT. It is always best to name your tables in the <i>singular</i>. Close the folder and return to the <i>Clarion</i> "Start Page".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOIHRQOTw2njNxHel3aHHC5ocm0TPS8Tjfrcq2xlUCX5PwK_Pf6OsJSnc_UuWPvEszcy-0VLje7jM6pauksc_dP0KC5yj5dyFH7G0S8bWx1VsVwePum26iEBkI7U9ZeMHr9-Yi/s767/LC+Lesson+12-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="599" data-original-width="767" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOIHRQOTw2njNxHel3aHHC5ocm0TPS8Tjfrcq2xlUCX5PwK_Pf6OsJSnc_UuWPvEszcy-0VLje7jM6pauksc_dP0KC5yj5dyFH7G0S8bWx1VsVwePum26iEBkI7U9ZeMHr9-Yi/s400/LC+Lesson+12-04.png" width="400" /></a></div>
Click on the "LCLesson" dictionary to open LCLesson.dct. Right-click on the "State" table and select "Browse Table" from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfg-fm-hXkJNwVCuofn-EJM2KRj_NKxfk6HCr_OJOcIUk8LAGZ9aZZNBJyzu0VFUVUYGGQT8s8KjCxdkkw_F9pAKuc47iToejXAIoumRedRgoi8ZAhevApwy2i9pc46wcgiCtG/s399/LC+Lesson+12-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="306" data-original-width="399" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfg-fm-hXkJNwVCuofn-EJM2KRj_NKxfk6HCr_OJOcIUk8LAGZ9aZZNBJyzu0VFUVUYGGQT8s8KjCxdkkw_F9pAKuc47iToejXAIoumRedRgoi8ZAhevApwy2i9pc46wcgiCtG/s400/LC+Lesson+12-05.png" width="400" /></a></div>
The "Convert File" dialog should appear because our index names are slightly different to the "Solution" version. Click on the "Convert the file and backup the existing file ..." option and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipuP0ftyk0iguAlW1oAd_Euc9Qz6urhg_4-Q9SvdXiAgjAAMCKPTDjnRoJIqA7Y5NC1GVLKpfqVQxo-9wEFzpHSrkP-2CfdLe65vjLOePaO6ZNCrzsY3KgcEmy0Y4z1D4wc3ub/s574/LC+Lesson+12-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="574" data-original-width="399" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipuP0ftyk0iguAlW1oAd_Euc9Qz6urhg_4-Q9SvdXiAgjAAMCKPTDjnRoJIqA7Y5NC1GVLKpfqVQxo-9wEFzpHSrkP-2CfdLe65vjLOePaO6ZNCrzsY3KgcEmy0Y4z1D4wc3ub/s400/LC+Lesson+12-06.png" /></a></div>
Once the data has been displayed, click on the "x" next to "State.TPS" to close the data file. Right-click on "Product" and select "Browse Table" and follow the same steps. "Order" opens without conversion, but "Detail" will also need some help. Open all the tables just to make sure. The "Phone" table is empty. The "Customer" data was imported in Lesson 5. Click on the green "Save and Close" button. <b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>. Change to "Solutions (Projects and Applications)" in the "Start Page", and open the "LCLesson" application once again.<br />
<br />
<h1>Lesson 12: Reports</h1>
The next item to cover is adding reports. First, we’ll create a simple customer list to introduce you to the <b>Report Designer</b>. Then we’ll create an Invoice Report to demonstrate how you can easily create Relational reports with multi-level group breaks, group totals, and page formatting. Then we’ll copy the Invoice Report and limit the copied report to print an invoice for only one customer at a time.<br />
<br />
<h2>Updating the Main Menu</h2>
First, we need to add menu selections, so the user can call the reports, and so the Application Generator will call the appropriate "ToDo" procedures.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgcf8pAD8n9sDLQHtJ7vjIMCOOCaBe9Np-392N5M4dXNNO37KKWeZbsyB9iskLnchtUVXuCFkLz6jBAG-40gocGknXThyphenhyphenpk-a9hizvrzzV1-I182G4-Nhx43Ek5dhnHURdGZrg/s614/LC+Lesson+12-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="614" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgcf8pAD8n9sDLQHtJ7vjIMCOOCaBe9Np-392N5M4dXNNO37KKWeZbsyB9iskLnchtUVXuCFkLz6jBAG-40gocGknXThyphenhyphenpk-a9hizvrzzV1-I182G4-Nhx43Ek5dhnHURdGZrg/s400/LC+Lesson+12-07.png" width="400" /></a></div>
Select the "Main" procedure and click on the "Window" button to the right to open the window designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYes2r_2EYNLjiHHEHIko1fzhBxNFLRjFRty9F27Fu7ZEzdVIEnsheGvwD5xKrg17bttzdm7lbp7rHc6FVLRXaRhw_NqcF8oUkBiDyPu-t9H04phmuNXA-VA7S0Sapx1hdEiQr/s631/LC+Lesson+12-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="587" data-original-width="631" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYes2r_2EYNLjiHHEHIko1fzhBxNFLRjFRty9F27Fu7ZEzdVIEnsheGvwD5xKrg17bttzdm7lbp7rHc6FVLRXaRhw_NqcF8oUkBiDyPu-t9H04phmuNXA-VA7S0Sapx1hdEiQr/s400/LC+Lesson+12-08.png" width="400" /></a></div>
Right-click on the menu bar, and choose "Edit Menu" from the popup menu. This will open the <b>Menu Editor</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGyNpLPCx18eHwD-k7j5dW0cXK6gR6IYaZd3id_G0ZAtDX1VgnrEichGMQ4JceLHTghbeWxhxwiqqcEGn-inIgVwhNKzBTnoTeGMT9FUGIB6LCk6avY0Yj-1l2aYDWX15PF6TX/s622/LC+Lesson+12-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="622" data-original-width="621" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGyNpLPCx18eHwD-k7j5dW0cXK6gR6IYaZd3id_G0ZAtDX1VgnrEichGMQ4JceLHTghbeWxhxwiqqcEGn-inIgVwhNKzBTnoTeGMT9FUGIB6LCk6avY0Yj-1l2aYDWX15PF6TX/s400/LC+Lesson+12-09.png" /></a></div>
In the Menu Editor, click on the "P&rint Setup" item, and then click on the "Add new Item (Insert)" button on the toolbar. This will add a new menu item just below the "P&rint Setup" item.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfH9v-fBtvAYVVZBMb8uSrDJEE3TeEwcQ02Glk8IX6nK89BCRiek3szKMf1P2ANpWecF2S-d7Q67vbfQXdp-m682oNdv-pCs_5g-SIPyIPTAUNP9RpdFnmnAbYvv2Nz810K4L/s631/LC+Lesson+12-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="631" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQfH9v-fBtvAYVVZBMb8uSrDJEE3TeEwcQ02Glk8IX6nK89BCRiek3szKMf1P2ANpWecF2S-d7Q67vbfQXdp-m682oNdv-pCs_5g-SIPyIPTAUNP9RpdFnmnAbYvv2Nz810K4L/s400/LC+Lesson+12-10.png" width="400" /></a></div>
In the "Text" property, change it to read "Print &Customer List" and press the TAB key. Click on the "Actions..." link at the bottom of the properties pad.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqvfdTq5ShU7uDqeJPW45nNlN57CA1VoM_4YN_QJFsdDaKReCChT6r5UibdqMwYtttkax9ZnpSjveUWGzcXxLXGSf3pGIwj2hlJSzgPB-XLDMQatKLeI1FNh0S7kEMOUSFfpxQ/s828/LC+Lesson+12-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqvfdTq5ShU7uDqeJPW45nNlN57CA1VoM_4YN_QJFsdDaKReCChT6r5UibdqMwYtttkax9ZnpSjveUWGzcXxLXGSf3pGIwj2hlJSzgPB-XLDMQatKLeI1FNh0S7kEMOUSFfpxQ/s400/LC+Lesson+12-11.png" width="400" /></a></div>
Change the "When Pressed" selection to "Call a Procedure". In the "Procedure Name" field, type in "CustReport" and enable "Initiate Thread". Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHXpUOnMhnUIqX12TsGRHVLFW5h_I_ksId9Ny04lisZ-sGnXhRPCOT8J3EHf8vCgO4wY7UsSSogeUq8loPW4d6EC9lhgAvN7BYYYelwHB61RlSwztDLHod7F69Xr1Imro4ST1B/s627/LC+Lesson+12-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="627" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHXpUOnMhnUIqX12TsGRHVLFW5h_I_ksId9Ny04lisZ-sGnXhRPCOT8J3EHf8vCgO4wY7UsSSogeUq8loPW4d6EC9lhgAvN7BYYYelwHB61RlSwztDLHod7F69Xr1Imro4ST1B/s400/LC+Lesson+12-12.png" width="400" /></a></div>
Click on the newly created "Print &Customer List" item, and then click on the "Add new Item (Insert)" button once more.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIMJ8CMsNMoQGPI6mKo98j3YPM1GrZ5k8xu4BNEiKnu8wTlXEcMxCcrOM2ulq_WuOs3Lrp1JbCOQQsMt8F8fPWSkSzqUxZmJ5-n5j9RQHj4YbjpLMy0Tm5bAeLcQ28aLUcORrR/s629/LC+Lesson+12-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="564" data-original-width="629" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIMJ8CMsNMoQGPI6mKo98j3YPM1GrZ5k8xu4BNEiKnu8wTlXEcMxCcrOM2ulq_WuOs3Lrp1JbCOQQsMt8F8fPWSkSzqUxZmJ5-n5j9RQHj4YbjpLMy0Tm5bAeLcQ28aLUcORrR/s400/LC+Lesson+12-13.png" width="400" /></a></div>
Type "Print &All Invoices" in the Text property entry, and press the TAB key. Click on the "Actions..." link at the bottom of the properties pad.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZcOSq19H8bVIrM8YgpvdZHgJbjbZbLs3Lp6EOyX_GFStg-meLu_jE89tVZV_jB72qXTJYCynmr8pj7vZYvo4xc_QS-ujBJY3_Bfx5TqLBJoJZPXKc3JyB49ppEhszLYyfq3S/s838/LC+Lesson+12-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="838" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIZcOSq19H8bVIrM8YgpvdZHgJbjbZbLs3Lp6EOyX_GFStg-meLu_jE89tVZV_jB72qXTJYCynmr8pj7vZYvo4xc_QS-ujBJY3_Bfx5TqLBJoJZPXKc3JyB49ppEhszLYyfq3S/s400/LC+Lesson+12-14.png" width="400" /></a></div>
Change the "When Pressed" selection to "Call a Procedure". In the "Procedure Name" field, type in "InvoiceReport" and enable "Initiate Thread". Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfH4EFu5LDtsBelri17Hr9ZLezRdHqvIYoQa65aErt03u8yd9_-AmV7Y7oXq-pglnT6ikabUHpczjjJLYj8GrlJPZ5gt3nIv2SXcdGe9Sx6f5d2ZlIdTATxnOUAjqfqFrKuN7u/s832/LC+Lesson+12-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="659" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfH4EFu5LDtsBelri17Hr9ZLezRdHqvIYoQa65aErt03u8yd9_-AmV7Y7oXq-pglnT6ikabUHpczjjJLYj8GrlJPZ5gt3nIv2SXcdGe9Sx6f5d2ZlIdTATxnOUAjqfqFrKuN7u/s400/LC+Lesson+12-15.png" width="400" /></a></div>
For the third menu item, set the text to "Print &One Customer’s Invoices" and set the procedure to "CustInvoiceReport" as shown. Click "OK", "Save and Close", "Save and Close" and "Accept changes" to <b>save your work</b> and return to the main procedure display.<br />
<br />
<h2>Creating the Report</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj1-3LqGBtqSR6OvW-Cv_xAzxfI-gdhh2WVT1Bly3xwj-KMq-lxQTMHA_EclCpxaSdoxZr1bbpSGTpmpUaBmLaqfQHWurvcIsnTRGwegwhMHf6NSTdMFjBLAbifhu_H20Oa3t2/s634/LC+Lesson+12-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="632" data-original-width="634" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj1-3LqGBtqSR6OvW-Cv_xAzxfI-gdhh2WVT1Bly3xwj-KMq-lxQTMHA_EclCpxaSdoxZr1bbpSGTpmpUaBmLaqfQHWurvcIsnTRGwegwhMHf6NSTdMFjBLAbifhu_H20Oa3t2/s400/LC+Lesson+12-16.png" width="400" /></a></div>
Click on the "CustReport (ToDo)" empty procedure and then on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpv-z3EWMPKZ4haWvfngYxYPGOEbApi3xNq3218bIYpkjWmQ-xOIOY5SY2-LiBiwY9VJqZT2N2RubVEyaug9-jamPT9NIv4wgnIUhRp-Bd0xMKgybjrLk1AzTlqQf0cqXamOIf/s637/LC+Lesson+12-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="405" data-original-width="637" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpv-z3EWMPKZ4haWvfngYxYPGOEbApi3xNq3218bIYpkjWmQ-xOIOY5SY2-LiBiwY9VJqZT2N2RubVEyaug9-jamPT9NIv4wgnIUhRp-Bd0xMKgybjrLk1AzTlqQf0cqXamOIf/s400/LC+Lesson+12-17.png" width="400" /></a></div>
Click on the "Defaults" tab and notice that you can choose 3 different page sizes for reports. Because this program is intended for users in the USA, click on the "Report (Paper size Letter - Portrait)" option and click on the "Select" button to continue.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXdapXbfWsJ6NFfjJFwoG6yZ8HRCkwYbKGdIcslNiUe1nJxbaDDkPZ1UFtbkyyAHY6OeLav0uP84xGP2IM6iYow8GZGO4f-i2AIySl1hjARHO75QzioK0CYyCSDov_yplldZj/s836/LC+Lesson+12-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="680" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlXdapXbfWsJ6NFfjJFwoG6yZ8HRCkwYbKGdIcslNiUe1nJxbaDDkPZ1UFtbkyyAHY6OeLav0uP84xGP2IM6iYow8GZGO4f-i2AIySl1hjARHO75QzioK0CYyCSDov_yplldZj/s400/LC+Lesson+12-18.png" width="400" /></a></div>
Fill in "Print a list of Customers" in the Description field. Click on the "Data/Tables" pad, and double-click on the "<ToDo>" entry. Choose the "Customer" table and click "Select". Click on the green "Save and Exit" button and "Accept changes". Then click on the "Report" button. We are going to use a Control Template, so it is always a good idea to <b>save your work</b> before doing so.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1PE0smZp4WzvD1wvgOXcLmjig8lKNlWHhsyz9xsdYLF-Hn_289zL0BFPaOPsoDuZsH9b9NS-TYYP28xs0328qQWRW1F7ZMrIJR6DTCqDk4Bizc0h_r9Kq8qTkFiEE_VXniXSd/s1028/LC+Lesson+12-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1PE0smZp4WzvD1wvgOXcLmjig8lKNlWHhsyz9xsdYLF-Hn_289zL0BFPaOPsoDuZsH9b9NS-TYYP28xs0328qQWRW1F7ZMrIJR6DTCqDk4Bizc0h_r9Kq8qTkFiEE_VXniXSd/s400/LC+Lesson+12-19.png" width="400" /></a></div>
The Report Designer appears. Here you can visually edit the report and its controls. The Report Designer represents the four basic parts of the REPORT data structure by showing the Page Header, Detail, Page Footer, and Form as four "bands." Each band is a single entity that prints all together. See the "IDE User’s Guide" lesson 8 on the Report Designer for more information on the parts of the report and how the print engine generates them ("C:\Clarion11\docs\IDEUsersGuide.pdf").<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirjCt-mVXhvB9rDdUyVOhQswZHCOsBZNn6kaoU5mZ-f2w0kfUKotI81au3GPoEQ1bEgl0vTL32vW_fvIEBHCxN0kKM1p0v9w8Od1JtmqmNl9yn6pYy_cgjuM8YhUYn9d9nVDT7/s487/LC+Lesson+12-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="487" data-original-width="468" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirjCt-mVXhvB9rDdUyVOhQswZHCOsBZNn6kaoU5mZ-f2w0kfUKotI81au3GPoEQ1bEgl0vTL32vW_fvIEBHCxN0kKM1p0v9w8Od1JtmqmNl9yn6pYy_cgjuM8YhUYn9d9nVDT7/s400/LC+Lesson+12-20.png" /></a></div>
For this report, you’ll place page number controls in the header, then place the columns from the Customer table in the Detail band.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8aVxpT3gXBsOGTsb4Z-4N7sO6ERy08ok3XXC4CrirmkVicJFKYRv7swN1ztKWBMmGou8BlOWTqNoV26xn0KPV_U9KJT6KTBxKl9Hw-Cb8L7Ty_YurXy4tEIfCQBOCjYi_4LQN/s836/LC+Lesson+12-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="639" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8aVxpT3gXBsOGTsb4Z-4N7sO6ERy08ok3XXC4CrirmkVicJFKYRv7swN1ztKWBMmGou8BlOWTqNoV26xn0KPV_U9KJT6KTBxKl9Hw-Cb8L7Ty_YurXy4tEIfCQBOCjYi_4LQN/s400/LC+Lesson+12-22.png" width="400" /></a></div>
Click on the "Control Templates" pad, and drag the "ReportPageNumber" template to the Page Header band as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNJ7P8_HjoLyKWwpwSaScnzwGzIgktpkb2CmzycjEqRABdXwCjVxSQSRSF32EhUV5kZDWK9WbHuUfOOdDxCcA3uq9hHOtWwTPSc576TrqqG8_f8O8qScRkoglieZOrBeEvsA5d/s1028/LC+Lesson+12-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="638" data-original-width="1028" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNJ7P8_HjoLyKWwpwSaScnzwGzIgktpkb2CmzycjEqRABdXwCjVxSQSRSF32EhUV5kZDWK9WbHuUfOOdDxCcA3uq9hHOtWwTPSc576TrqqG8_f8O8qScRkoglieZOrBeEvsA5d/s400/LC+Lesson+12-21.png" width="400" /></a></div>
Select the STRING control in the "Toolbox" pad, and drag the control to the top left of the Page Header band, and drop. In the Properties Pad, set the "Text" property to "Page Number:". Tidy up the two items so they work together.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHV6uXpL-iGzh7CdAJeuMzazwwLzHAAeFnHgbHQ-nRAO8-hvkPPBzlYyUcls74d7UUScab01scszaFEsewjLG6X9Gtlha5CE7HaGzBLli8nbfe6Hucj-76Vzb9sAEXbISqdzJg/s833/LC+Lesson+12-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="641" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHV6uXpL-iGzh7CdAJeuMzazwwLzHAAeFnHgbHQ-nRAO8-hvkPPBzlYyUcls74d7UUScab01scszaFEsewjLG6X9Gtlha5CE7HaGzBLli8nbfe6Hucj-76Vzb9sAEXbISqdzJg/s400/LC+Lesson+12-23.png" width="400" /></a></div>
Select the "Data/Tables" pad, and double-click on the "Customer" table. Choose the "KeyCustNumber" key and click on the "Select" button. This will cause the report to sort the data by CustNumber.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvnUqK_Qm76-3-KZaRudvdck49SWw-DBttLnBOYe2NUQEGLSZfxrNXAdpuNlShxFeit3i6vq2xZIIbSibv7jIFNA_Lg7oAsj6BG_-5L3o_HDE8vJRbcyUjsDFGfQbvV5Aubo7x/s836/LC+Lesson+12-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvnUqK_Qm76-3-KZaRudvdck49SWw-DBttLnBOYe2NUQEGLSZfxrNXAdpuNlShxFeit3i6vq2xZIIbSibv7jIFNA_Lg7oAsj6BG_-5L3o_HDE8vJRbcyUjsDFGfQbvV5Aubo7x/s400/LC+Lesson+12-24.png" width="400" /></a></div>
Use the grab handles to adjust the report header size, and to make more space for the fields in the detail band. Drag the "Company" field to the top left of the detail band, as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdp0foYrlOF0EwgYghfjs6G2XhdvZy-DuY1_HHgS0icfxniYOVWodtVcbRTH5TF-YRMIYL-feIfGQnrwII_-EwdEoTw7EZvyjjItq_KlW_VL44ps49c88ADQrpD99R8b6eDQHL/s835/LC+Lesson+12-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="835" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdp0foYrlOF0EwgYghfjs6G2XhdvZy-DuY1_HHgS0icfxniYOVWodtVcbRTH5TF-YRMIYL-feIfGQnrwII_-EwdEoTw7EZvyjjItq_KlW_VL44ps49c88ADQrpD99R8b6eDQHL/s400/LC+Lesson+12-25.png" width="400" /></a></div>
Drag the "FirstName" and "LastName" field to the line below "Company". Put the "Address" field on the line below, and finish off with the "City", "State" and "ZIPcode" fields on the last line. Drag the "CustNumber" field to the top right, and use the familiar alignment tools to neaten everything up.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKv9OJYDTCOUVMOYmgpF_VYyq6Ox2VqBjYGseM6x-xmloIznMtolSNatW04oZkVt8aAPj73AM5rUlw-vnuiy17E4gRibR4ukVjyy6G1ZWt4CDH1qWfoLeGfR1_BoGhVcC2KgA9/s828/LC+Lesson+12-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKv9OJYDTCOUVMOYmgpF_VYyq6Ox2VqBjYGseM6x-xmloIznMtolSNatW04oZkVt8aAPj73AM5rUlw-vnuiy17E4gRibR4ukVjyy6G1ZWt4CDH1qWfoLeGfR1_BoGhVcC2KgA9/s400/LC+Lesson+12-26.png" width="400" /></a></div>
Click on the drop-down list at the top of the "Properties" pad, and select "Report". This will allow us to set the properties of the report. Click on the ellipsis next to the "TextFont" property, and choose a font and size. "Arial" 10pt is suggested. You could also use a more modern font like "Cambria" or "Calibri" to match the fonts often used in Word documents.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5kk_fJic7eO5B5SFEmJOzKjxt35qkaZhCUMzyrWZ1FuZMpUP4SEk5I2SxTNAjq4CYgEFCxCiTdnG0VYRx85bwDv7re8XE8URKRmRBM1nh7IOh-si13TNKzJrkn5OaCXbiGg3c/s629/LC+Lesson+12-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="598" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5kk_fJic7eO5B5SFEmJOzKjxt35qkaZhCUMzyrWZ1FuZMpUP4SEk5I2SxTNAjq4CYgEFCxCiTdnG0VYRx85bwDv7re8XE8URKRmRBM1nh7IOh-si13TNKzJrkn5OaCXbiGg3c/s400/LC+Lesson+12-27.png" /></a></div>
Before we close the report, click on the "Print Preview Details" button. Click on "Details" and then use the "Add" button a few times to get several records to display. Click on "OK" to see the preview, and then "Close". Click on the green "Save and Close" button and "Accept Changes" to <b>save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYqqhy-FEBGZ-PrkeFW5nwS3WSbStd9N3LvPGnbhZqodsLHhIgA2t09RWRy7Wx58eRqpa4rB5vyWJ-owZwn2rk4aaxZ5wsZdtwxCsTM12muG3a2QnfYFmUK2L1XEg8lHO4uNcd/s936/LC+Lesson+12-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="739" data-original-width="936" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYqqhy-FEBGZ-PrkeFW5nwS3WSbStd9N3LvPGnbhZqodsLHhIgA2t09RWRy7Wx58eRqpa4rB5vyWJ-owZwn2rk4aaxZ5wsZdtwxCsTM12muG3a2QnfYFmUK2L1XEg8lHO4uNcd/s400/LC+Lesson+12-28.png" width="400" /></a></div>
Click on the "Start without Debugger (Builds Solution)" button to run the application. Use the "File" menu and click on "Print Customer List" to preview the actual report, and to do a printout if you want to. "Exit" the application when done. Don't leave it running before you return to the <i>Clarion</i> IDE.<br />
<br />
<h2>An Invoice Report</h2>
Next, we will create one of the most common types of reports. An invoice will make use of most of the tables in the data dictionary, demonstrating how to create group breaks and totals. It will also show you how to control pagination based on group breaks.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnJyI5mYaJ3mDa0zMRRYjyckDMBa_xynkSJrJMznYZzMB-whpfn7EfmuL-qquXtlgfkRfpxwyBj2I0WUBNc1D8tZ6ipTqmhAeMdErAoD97A3iJOs2VCMly8RhuKXGmbEvb611H/s628/LC+Lesson+12-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="628" data-original-width="596" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnJyI5mYaJ3mDa0zMRRYjyckDMBa_xynkSJrJMznYZzMB-whpfn7EfmuL-qquXtlgfkRfpxwyBj2I0WUBNc1D8tZ6ipTqmhAeMdErAoD97A3iJOs2VCMly8RhuKXGmbEvb611H/s400/LC+Lesson+12-29.png" /></a></div>
Select the empty "InvoiceReport" procedure and then click on the "Properties" button. Change to the "Defaults" tab, choose "Report (Paper size Letter - Portrait)" and click on the "Select" button. Type in "Print All Invoices" in the "Description" field.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitce7JTIsArB-pN_rIiDrgBGJ9CRcbK6m-1CL3yaGP0T40Qg2X43N19xdxX6ZFYWA0Ls7BMi3AHL1C0O8sRLC42WImQtfvlRuRJDdVblxmi_zDIvEi56P9-o_YsRDp0kw3tiJb/s803/LC+Lesson+12-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="803" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitce7JTIsArB-pN_rIiDrgBGJ9CRcbK6m-1CL3yaGP0T40Qg2X43N19xdxX6ZFYWA0Ls7BMi3AHL1C0O8sRLC42WImQtfvlRuRJDdVblxmi_zDIvEi56P9-o_YsRDp0kw3tiJb/s400/LC+Lesson+12-30.png" width="400" /></a></div>
Go to the "Data/Tables" pad and double-click on the "<ToDo>" entry. Choose the "Customer" table and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJKB-nFrzsxCdX1A1zFDFsXIKl-IAgVNTXGmCSUAaLNEJyPUMTxeR_rT02dMVBqSCjDq3s8WTPSqoIe4KFaR7UaEGtrgCwIYkClKn_SjOhjK4L8N0MEh0C1Vmb-FAy4kwzJD9/s799/LC+Lesson+12-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="638" data-original-width="799" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJKB-nFrzsxCdX1A1zFDFsXIKl-IAgVNTXGmCSUAaLNEJyPUMTxeR_rT02dMVBqSCjDq3s8WTPSqoIe4KFaR7UaEGtrgCwIYkClKn_SjOhjK4L8N0MEh0C1Vmb-FAy4kwzJD9/s400/LC+Lesson+12-31.png" width="400" /></a></div>
Double-click on the "Customer" table and select the "KeyCustNumber" key.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrJqM78tJEK5WV1YEo54qFtq0skoJUpFycM3W1HzvuL-BbePIbURUuGmQNOOGSSo-tWvxTYhhRt-NpKdNB0NVz7y4v8GJLRoseKpSRi6Mv1NbPlS1KOSFsUXAT783UyKtLvgw4/s805/LC+Lesson+12-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="639" data-original-width="805" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrJqM78tJEK5WV1YEo54qFtq0skoJUpFycM3W1HzvuL-BbePIbURUuGmQNOOGSSo-tWvxTYhhRt-NpKdNB0NVz7y4v8GJLRoseKpSRi6Mv1NbPlS1KOSFsUXAT783UyKtLvgw4/s400/LC+Lesson+12-32.png" width="400" /></a></div>
Make sure the "Customer" table is still highlighted, and click on the "Add" button just above it. Select the "Order" table. With the "Order" table highlighted, click on the "Add" button and select the "Detail" table. Check the "Inner" join option if asked. With the "Detail" table highlighted, click on the "Add" button and select the "Product" table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7lULSl2q_s5eyYdZzOlrkmc_zaKgK5w4ZOkbai2ZZvbEcBmvNMtKGFIYqR2RmI4X3sTv3lIcCTEZiJRnweJ-xDgq1mJXVWNpJzCzC9TLMxE58Is4qvYaVkNS1kJ4l3xujCEmA/s798/LC+Lesson+12-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="798" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7lULSl2q_s5eyYdZzOlrkmc_zaKgK5w4ZOkbai2ZZvbEcBmvNMtKGFIYqR2RmI4X3sTv3lIcCTEZiJRnweJ-xDgq1mJXVWNpJzCzC9TLMxE58Is4qvYaVkNS1kJ4l3xujCEmA/s400/LC+Lesson+12-33.png" width="400" /></a></div>
The report will process all the Customer table rows in CustNumber order. It will process all the Orders for each Customer. Each Order will print all the related Detail rows. Each Detail row will lookup the related Products table row. Click on the "Accept changes" button and then on the "Report" button. Use the "Properties" pad drop-down to select "Report" and change the font to something suitable for your company reports. I chose "Cambria" again.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcSnkcWfR7cq91iQDDudvK_7ya9d-iUDBsQSUoKLWpwqo0JUfyVsmxBuK1fyJ_UYMNKKPqbJ9XZvik7AAY2I55cqfBJTRH5GyOHXsQdepaGT_5tfdP73hIlWnudcO3b0ZW02Y/s1048/LC+Lesson+12-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="632" data-original-width="1048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCcSnkcWfR7cq91iQDDudvK_7ya9d-iUDBsQSUoKLWpwqo0JUfyVsmxBuK1fyJ_UYMNKKPqbJ9XZvik7AAY2I55cqfBJTRH5GyOHXsQdepaGT_5tfdP73hIlWnudcO3b0ZW02Y/s400/LC+Lesson+12-34.png" width="400" /></a></div>
The "Report Form" band prints once for each page in the report. Its content is only composed once, when the report is opened. This makes it useful for constant information that will always be on every page of the report. Go to the "Toolbox" pad and drag a "STRING" control to the top middle of the "Report Form" band. Change its "Text" property to "Invoice", the "Justification" property to "CENTER", "Bold" to "True" and "Size" to 24. Use the grab handles to make the control span the full width of the band, as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMivkFceIK4gp65y-b8H7N7hKkFN6x2hTSv0M8ij4s6JC2REfCyHQCn9V-Meynqv2uccEnst0SXinqkOJMls6WIhlOQdfEjEbA2flNEpCEaqR9P-GovU8AS5exgbysTxNlzpCb/s1050/LC+Lesson+12-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="631" data-original-width="1050" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMivkFceIK4gp65y-b8H7N7hKkFN6x2hTSv0M8ij4s6JC2REfCyHQCn9V-Meynqv2uccEnst0SXinqkOJMls6WIhlOQdfEjEbA2flNEpCEaqR9P-GovU8AS5exgbysTxNlzpCb/s400/LC+Lesson+12-35.png" width="400" /></a></div>
Drag another "STRING" control to just below the "Invoice" control. Change its "Text" property to your company/client name, the "Justification" property to "CENTER", "Italic" to "True" and "Size" to 14. Use the grab handles to make the control span the full width of the band, as shown.<br />
<br />
<h2>Populating the Detail Band</h2>
The Detail band will print every time new information is read from the lowest level "Child" table in the Table Schematic. For this Invoice report, the lowest level "Child" table is the "Detail" table (remember that Product is a Many to One "lookup" table from the "Detail" table).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPAabZG80ad3f0VZrSQsFTFBEKjHsd7rNZEHit6_qKMAYqT8mm_DqBrN0uNDfEptGJclgkHi7lMYbU2YGHXgTrIORBg1FuLibb7I5tU8EL7rc06Z-uVsLnb5zca8irR9uFLK5t/s859/LC+Lesson+12-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="635" data-original-width="859" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPAabZG80ad3f0VZrSQsFTFBEKjHsd7rNZEHit6_qKMAYqT8mm_DqBrN0uNDfEptGJclgkHi7lMYbU2YGHXgTrIORBg1FuLibb7I5tU8EL7rc06Z-uVsLnb5zca8irR9uFLK5t/s400/LC+Lesson+12-36.png" width="400" /></a></div>
From the "Data/Tables" pad, select the "Detail" table and drag the "Quantity" field to the top-left corner of the "Detail" band.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujsn2TWNEUwYY2AE9AhPoHRsqMwmuv1uQBWpkDDuqejh6s6Eg3Z6-8Z0c5NMH1o8LUSbbO6aaFGd6K1fn1Mtkh_e62S_9R9gh4dV0kNgWm038gygS3aIF32yqWrrgPuyYK6lD/s856/LC+Lesson+12-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="639" data-original-width="856" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiujsn2TWNEUwYY2AE9AhPoHRsqMwmuv1uQBWpkDDuqejh6s6Eg3Z6-8Z0c5NMH1o8LUSbbO6aaFGd6K1fn1Mtkh_e62S_9R9gh4dV0kNgWm038gygS3aIF32yqWrrgPuyYK6lD/s400/LC+Lesson+12-37.png" width="400" /></a></div>
Then drag and drop the "ProdNumber" field from the "Detail" table to the right of the "Quantity" control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvATw0SxEWGWDtHLy7BdVbO5WNyE0LOMwWHjA8jklMhg8efzqVcr7tr0zxJ1-0pe1yw3y277H1l_vCzI3i1bXsl_uUzxjTmi2Y21HFXtgi3HOwPJvPcbGsnrcZ1eMuF_BWZTUM/s854/LC+Lesson+12-38.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="638" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvATw0SxEWGWDtHLy7BdVbO5WNyE0LOMwWHjA8jklMhg8efzqVcr7tr0zxJ1-0pe1yw3y277H1l_vCzI3i1bXsl_uUzxjTmi2Y21HFXtgi3HOwPJvPcbGsnrcZ1eMuF_BWZTUM/s400/LC+Lesson+12-38.png" width="400" /></a></div>
Drag and drop the "ProdDesc" field from the "Product" table to the right of the "ProdNumber" control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir2A99K9nliL1SmvBc7ZCqvDCU5Cpe4nthuW5YE6TYaIQef5m3LyIkiWXbTCRJmq7BKxy7_YLThqlb8kaUeu1_v9NruCAQ5UtyCCdZdi5D32hpZj6I4r4U2AOumr93JvivJS8D/s859/LC+Lesson+12-39.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="647" data-original-width="859" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEir2A99K9nliL1SmvBc7ZCqvDCU5Cpe4nthuW5YE6TYaIQef5m3LyIkiWXbTCRJmq7BKxy7_YLThqlb8kaUeu1_v9NruCAQ5UtyCCdZdi5D32hpZj6I4r4U2AOumr93JvivJS8D/s400/LC+Lesson+12-39.png" width="400" /></a></div>
Return to the "Detail" table and drag and drop the "ProdAmount" field to the right of the "ProdDesc" control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96tMha4PhwOhBeV_AgFvl6ZBDSeYF8zgvFjIen21Y1HAg9PZxiIeffWAfml8n0DFxRzhqHRrh607SucL1fjv6xHqAni7sv3YbDb39gO_a0nJqSgsl5j2d0l2OZkuQReMgoY_r/s954/LC+Lesson+12-40.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="603" data-original-width="954" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi96tMha4PhwOhBeV_AgFvl6ZBDSeYF8zgvFjIen21Y1HAg9PZxiIeffWAfml8n0DFxRzhqHRrh607SucL1fjv6xHqAni7sv3YbDb39gO_a0nJqSgsl5j2d0l2OZkuQReMgoY_r/s400/LC+Lesson+12-40.png" width="400" /></a></div>
Highlight "Local Data InvoiceReport" in the "Data/Tables" pad, then press the "Add" button. This local variable will be used to display the total price for each line item. Type "LOC:ItemTotal" in the "Column Name" field. Change the "Data Type" to "DECIMAL". Set the "Characters" to "7" and the "Places" to "2" and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68oEteJ9SfyUkqJbs_iYvy6WbYTiS1CExEoI9PnPbHgl-PLoXeLf7bRzeFWWReFhXAoA1mkT9vOselJwXLTlF9CTSn3YvHkLMfpt4vGyp77iTAi69aupkcAat4Ls9_gMrkfJt/s1040/LC+Lesson+12-41.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="638" data-original-width="1040" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj68oEteJ9SfyUkqJbs_iYvy6WbYTiS1CExEoI9PnPbHgl-PLoXeLf7bRzeFWWReFhXAoA1mkT9vOselJwXLTlF9CTSn3YvHkLMfpt4vGyp77iTAi69aupkcAat4Ls9_gMrkfJt/s400/LC+Lesson+12-41.png" width="400" /></a></div>
Drag "LOC:ItemTotal" and drop it to the right of the last control placed. Move all the controls to the top of the Detail band, aligned horizontally, then resize the band, so it is just a little taller than the controls. Also, modify the properties of the "DET:ProdAmount" and "LOC:ItemTotal" controls to change the "Justification" to "RIGHT" and the "Offset" to "2".<br />
<br />
<h2>Adding Group Breaks</h2>
We need to print different information on the page for each Invoice. Therefore, we need to create BREAK structures to provide the opportunity to print something every time the "Order" table information changes and every time the "Customer" table information changes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3m2iHfYBBJ5g7up4UVXPeLxU8QdvAYhMkUxEr2A-ULb16uBJ1mTehyphenhyphenyuz77rSH0HPsdbSPsPgmyTUy9fUUV09iBS2Zr1pbxnhtQ2zYApdxixzSo89ttbp6FsFZFGGDa4LLr8J/s643/LC+Lesson+12-42.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="501" data-original-width="643" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3m2iHfYBBJ5g7up4UVXPeLxU8QdvAYhMkUxEr2A-ULb16uBJ1mTehyphenhyphenyuz77rSH0HPsdbSPsPgmyTUy9fUUV09iBS2Zr1pbxnhtQ2zYApdxixzSo89ttbp6FsFZFGGDa4LLr8J/s400/LC+Lesson+12-42.png" width="400" /></a></div>
Click on the "Detail" band, and then choose "Report Designer", then "Bands", "Surrounding Break".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJc2W-SLDsT01R__aFAJVdwAXnGIpQyHd1AkkPcZb_lRLfKCxxGQ5CPOPJskt0AJLi5BHLeTDXo3qrjHT3ZHc2JkQM-W2FvzRhfNQSHqExUwNEhcMZIaPEhWSYzds7Ul-OuDya/s331/LC+Lesson+12-43.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="219" data-original-width="331" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJc2W-SLDsT01R__aFAJVdwAXnGIpQyHd1AkkPcZb_lRLfKCxxGQ5CPOPJskt0AJLi5BHLeTDXo3qrjHT3ZHc2JkQM-W2FvzRhfNQSHqExUwNEhcMZIaPEhWSYzds7Ul-OuDya/s400/LC+Lesson+12-43.png" width="331" /></a></div>
Use the ellipsis to the right of the "Variable" entry to choose "CUS:CustNumber", or just type it in. Change the "Label" from "break1" to "CustNumberBreak". Then click "OK". A "Break (CUS:CustNumber)" band appears above the Detail band. Repeat the process to choose "ORD:OrderNumber" for the second break. Change the "Label" from "break2" to "OrderNumberBreak".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Bxl9Sk-RL_uy1R5xaMMhSEWMaQ82HAEMPxd8ZVSSp2sJhZ1pKkrkKdoMuUb376q8-71bJPxS-DuNqjlxSUqZHeVnKcMtOCmZZB-v-tRYivn6wpqmh2zQ7O27rztfCglQZ9kg/s671/LC+Lesson+12-44.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="521" data-original-width="671" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Bxl9Sk-RL_uy1R5xaMMhSEWMaQ82HAEMPxd8ZVSSp2sJhZ1pKkrkKdoMuUb376q8-71bJPxS-DuNqjlxSUqZHeVnKcMtOCmZZB-v-tRYivn6wpqmh2zQ7O27rztfCglQZ9kg/s400/LC+Lesson+12-44.png" width="400" /></a></div>
Click on the "Break (ORD:OrderNumber)" band, and then select "Report Designer", "Bands", "Group Header". The "Group Header(ORD:OrderNumber)" band appears above the Detail band. This band will print every time the value in the ORD:OrderNumber column changes, at the beginning of each new group of rows. We will use this to print the company name, address, along with the invoice number and date.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_Z4BYfS-AjHZueMP_4lx6rqbRTKoFEeC7F7aOtgc2Q-bTmo-ZcdY3hSXCOl1xthNGvEtSolA3Bfk3tC-2JElUMPFQFu7fw_xYe98kXG7qStXT80qoOknsfSSulrxxDoNku9h/s703/LC+Lesson+12-45.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="703" data-original-width="661" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_Z4BYfS-AjHZueMP_4lx6rqbRTKoFEeC7F7aOtgc2Q-bTmo-ZcdY3hSXCOl1xthNGvEtSolA3Bfk3tC-2JElUMPFQFu7fw_xYe98kXG7qStXT80qoOknsfSSulrxxDoNku9h/s400/LC+Lesson+12-45.png" /></a></div>
Click on the "Break (ORD:OrderNumber)" band, and then select "Report Designer", "Bands", "Group Footer". The "Group Footer(ORD:OrderNumber)" band appears below the Detail band. This band will print every time the value in the ORD:OrderNumber column changes, at the end of each group of rows. We will use this to print the invoice total.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi295cu5tM80jWA7_56oJW2EK0GwosvQIff4Y4k_4xQtNKqEAqmietzm4jvg66681PQYdPdW1TvG7k3-G_xHPBGO2dlpO1BtubTBs0C0lusIfvV49bf8jldHfJS3GMH3rGBKYVr/s851/LC+Lesson+12-46.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="851" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi295cu5tM80jWA7_56oJW2EK0GwosvQIff4Y4k_4xQtNKqEAqmietzm4jvg66681PQYdPdW1TvG7k3-G_xHPBGO2dlpO1BtubTBs0C0lusIfvV49bf8jldHfJS3GMH3rGBKYVr/s400/LC+Lesson+12-46.png" width="400" /></a></div>
Click on the "Group Footer(ORD:OrderNumber)" band, and change the "PageAfter" property to "1" as shown. This causes the print engine to print this band, then initiate Page Overflow. This will compose the Page Footer band, issue a form feed to the printer, then compose the Page Header band for the next page.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiULBCQPPKJgVWk_iCIcobBLLpBGZvsZmY1lKRlU_PHe1JH_Y7O8uXsLShe7yR_Sz7P5aIYjojxiyPBtndHAXJMihkjFpjA-jyxej_B0we7tx4RRYzI3TG0mFivEjtfAVtmXkf5/s727/LC+Lesson+12-47.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="727" data-original-width="619" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiULBCQPPKJgVWk_iCIcobBLLpBGZvsZmY1lKRlU_PHe1JH_Y7O8uXsLShe7yR_Sz7P5aIYjojxiyPBtndHAXJMihkjFpjA-jyxej_B0we7tx4RRYzI3TG0mFivEjtfAVtmXkf5/s400/LC+Lesson+12-47.png" /></a></div>
Click on the "Break (ORD:CustNumber)" band, and then select "Report Designer", "Bands", "Group Footer". The "Group Footer(ORD:CustNumber)" band appears below the Detail and "Group Footer(ORD:OrderNumber)" bands. This band will print every time the value in the ORD:CustNumber column changes, at the end of each group of rows. We will use this to print invoice summary information for each company. Click on the "Group Footer(ORD:CustNumber)" band, and change the "PageAfter" property to "1".<br />
<br />
<h2>Populating the Group Header Band</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCeDZO4UTRV5sCltaFfhu7-L86yQMdarGZbXzNeOAqD4fMIhqkzkq_eSiCc44203HF3eaBmOxuEtzc5kikslj1cyasXAmi_rhimotp5PSbhTl8rwXN9WqzkOZfYD83BYubFtTr/s808/LC+Lesson+12-48.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="639" data-original-width="808" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCeDZO4UTRV5sCltaFfhu7-L86yQMdarGZbXzNeOAqD4fMIhqkzkq_eSiCc44203HF3eaBmOxuEtzc5kikslj1cyasXAmi_rhimotp5PSbhTl8rwXN9WqzkOZfYD83BYubFtTr/s400/LC+Lesson+12-48.png" width="400" /></a></div>
Click on the "Customer" table in the "Data/Tables" pad, and drag the "Company" control to the top-left corner of the "Group Header(ORD:OrderNumber)" band. Drag the "FirstName" and "LastName" controls to the line below, and then the "Address" control below them. Put the "City", "State" and "ZIPcode" controls on the fourth line. Tidy up the controls as before.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJusBfVlNcXNjj47gQjIRCE-yxXZObf_jogSmPtvF4XAtlo50diW6-d6bdy8_hHlIWiRItkD4NMkV7YTH21Z3sNBipUsoE2QGDNJlsCQvdi9z1Y_JL6BoKQ5J5bQQrHTw9BiE8/s811/LC+Lesson+12-49.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="634" data-original-width="811" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJusBfVlNcXNjj47gQjIRCE-yxXZObf_jogSmPtvF4XAtlo50diW6-d6bdy8_hHlIWiRItkD4NMkV7YTH21Z3sNBipUsoE2QGDNJlsCQvdi9z1Y_JL6BoKQ5J5bQQrHTw9BiE8/s400/LC+Lesson+12-49.png" width="400" /></a></div>
Click on the "Order" table in the "Data/Tables" pad, and drag the "OrderNumber" control to the top-right corner of the "Group Header(ORD:OrderNumber)" band. Set its "Bold" property to "True". Drag the "OrderDate" control to the line below it. Change its "Justification" property to "RIGHT".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepNYb3o96s8WTV4BFnY6D1CXQQGMFsw6wQtAewPEWaDuS-eHgE6ERJCJ5Id4lZMmbA9IhmwIXH9665bLyzkitUCpx0sJNBs72r2xHPBjMp6mEOhVYDiwX47r53dJKwG15Vz4G/s1043/LC+Lesson+12-50.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="1043" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgepNYb3o96s8WTV4BFnY6D1CXQQGMFsw6wQtAewPEWaDuS-eHgE6ERJCJ5Id4lZMmbA9IhmwIXH9665bLyzkitUCpx0sJNBs72r2xHPBjMp6mEOhVYDiwX47r53dJKwG15Vz4G/s400/LC+Lesson+12-50.png" width="400" /></a></div>
Go to the "Toolbox" pad and drag a "STRING" control to the left of the "OrderNumber" control. Click on the "Edit Value" entry in the pop-up menu, or at the bottom left of the "Properties" pad. Change the text value to "Order Number:" and click "Accept".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0eRJqtMZANmjWxazcPLGPNCnnCOPjh1-k1Q6hAgmBEsgL25l-wuaBQNWuGdXPkFEFq9RzI5Z_7yh65a1glEQnDPASYy15noQuhifnQgXYJgxOKctZvNCu-sUx5Ay0V0lpkuKp/s1040/LC+Lesson+12-51.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="634" data-original-width="1040" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0eRJqtMZANmjWxazcPLGPNCnnCOPjh1-k1Q6hAgmBEsgL25l-wuaBQNWuGdXPkFEFq9RzI5Z_7yh65a1glEQnDPASYy15noQuhifnQgXYJgxOKctZvNCu-sUx5Ay0V0lpkuKp/s400/LC+Lesson+12-51.png" width="400" /></a></div>
Drag another "STRING" control below the first one, and change its text to "Order Date:". Tidy up the controls so they look neat. Drag the bottom of the "Group Header(ORD:OrderNumber)" downwards to make some space for a line of text labels that will correspond to the controls in the "Detail" band.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAAcrXMJwf-zTWjtGzT6BqRnJGBPRxMXqWP8aBccz9JH5eKKUpKjKfBuNKVYabMb42MM1mlywAEeh_aPEOX1D-WMQ-exRG-8Fbs2iY62qAZ4hAdRyPCSsGdO2CJma6wlBy6Xo3/s871/LC+Lesson+12-52.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="633" data-original-width="871" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAAcrXMJwf-zTWjtGzT6BqRnJGBPRxMXqWP8aBccz9JH5eKKUpKjKfBuNKVYabMb42MM1mlywAEeh_aPEOX1D-WMQ-exRG-8Fbs2iY62qAZ4hAdRyPCSsGdO2CJma6wlBy6Xo3/s400/LC+Lesson+12-52.png" width="400" /></a></div>
Drag four "STRING" controls to the bottom of the "Group Header(ORD:OrderNumber)" band, and change their text to "Quantity", "Product", "At" and "Item Total" as shown here. Use the "sight lines" when dragging them to the right position, and tidy them up, so they are all at the same height.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvl0xHccgkznrZZo5qahjaMzhivijK9qz_N0j-24AjWk5tsHkk3MMqlJwrFbzwYTEhGD2HwC51Srmdpv_M4UtxUMC2slnbV-fEZLxzFm4B7y_jb70sQgo13pmsOSC3cwDgDRgK/s866/LC+Lesson+12-53.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="640" data-original-width="866" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvl0xHccgkznrZZo5qahjaMzhivijK9qz_N0j-24AjWk5tsHkk3MMqlJwrFbzwYTEhGD2HwC51Srmdpv_M4UtxUMC2slnbV-fEZLxzFm4B7y_jb70sQgo13pmsOSC3cwDgDRgK/s400/LC+Lesson+12-53.png" width="400" /></a></div>
Drag a "LINE" control and drop it in some open space in the "Group Header(ORD:OrderNumber)" band. Then move it down to below the "Quantity" control. Move the right-hand grab handle across until it is under the right end of the "Item Total" control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy-drFfjEX_qsSc5YsfgbvsEHKo3FgVkaclt8LeQBkHlT4IQkMleMenOQsoyKK4BDqlwzNNLZOpPNkC5m-3vI5usnCxq1yw0VVvgvhuPD0DTUEu0V6tTabtCzkwDqoQx4V1FJn/s1018/LC+Lesson+12-54.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="635" data-original-width="1018" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy-drFfjEX_qsSc5YsfgbvsEHKo3FgVkaclt8LeQBkHlT4IQkMleMenOQsoyKK4BDqlwzNNLZOpPNkC5m-3vI5usnCxq1yw0VVvgvhuPD0DTUEu0V6tTabtCzkwDqoQx4V1FJn/s400/LC+Lesson+12-54.png" width="400" /></a></div>
Set the "LineWidth" property to "5" and change the "LineColor" to "ControlDark", so we don't have a thick, ugly black line. Check that the "Height" value is 0, so we have a straight line.<br />
<br />
<h2>Populating the Invoice Group Footer Band</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuEWb8vq_-HHB5nsYua8tayCfChDMsb-q10V-odCv3KQRQ8XL6U1BBVmJ_Fkh6NcvGUpyrAD26_MA7Jff_yZpyQ8FgA2wizgXjTdBMS8zetdpWwnVYP6kzOusf-mFmhTKeCmA6/s850/LC+Lesson+12-55.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="850" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuEWb8vq_-HHB5nsYua8tayCfChDMsb-q10V-odCv3KQRQ8XL6U1BBVmJ_Fkh6NcvGUpyrAD26_MA7Jff_yZpyQ8FgA2wizgXjTdBMS8zetdpWwnVYP6kzOusf-mFmhTKeCmA6/s400/LC+Lesson+12-55.png" width="400" /></a></div>
Drag a "STRING" control to the "Group Footer(ORD:OrderNumber)" band, and place it under the "At" column. Change its "text" property to "Order Total:". Drag a second "STRING" control and place it to the right of the first control. Set its "VariableString" property to "True", and set the "Use" property to "LOC:ItemTotal" or use the ellipsis to select it from the Local Values. Type "@N9.2" into the "Text" property. Change the "TotalType" property to "Sum", and choose "OrderNumberBreak" for the "Reset" property. This will add up all the "LOC:ItemTotal" contents for the Invoice and will reset to zero when the value in the "ORD:OrderNumber" column changes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiyLa5-TJdiHpNL8cRybU5s7iWss2UL_F3d0gIX2SA3zvKuSYl8QmGuURr5PGxJ6r9tgjyJ3i_arNM8AKIthbWS0AZOf7cIl4TgyNePPI4jbKY9aIb2AJO6cJM2fmPt2CpZIHG/s1018/LC+Lesson+12-56.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="634" data-original-width="1018" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiyLa5-TJdiHpNL8cRybU5s7iWss2UL_F3d0gIX2SA3zvKuSYl8QmGuURr5PGxJ6r9tgjyJ3i_arNM8AKIthbWS0AZOf7cIl4TgyNePPI4jbKY9aIb2AJO6cJM2fmPt2CpZIHG/s400/LC+Lesson+12-56.png" width="400" /></a></div>
Select the LINE control we created in the Invoice Header. Note the "X" value of the line. Then use the "Edit" menu and choose "Copy". Click in the Invoice Footer band and use the "Edit" menu to "Paste". Twice. Set the "X" values of each new line to the same value as the original line. Make sure the "Height" values are both 0. Change the "Y" value of the first copy to 0, and the second one to 250. The "Order Total" controls should now have a line above and another below, equally spaced. Tidy up the controls if necessary. Reduce the height of the Invoice footer band.<br />
<br />
<h2>Populating the Customer Group Footer Band</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjORxRwxwEgvIg4W6KeTi8fOv58RHRlAhVe3X1t2XRWs7ZQEdlivcptPVIS1OerPAhhs7UxeneXhM1JixSWPjnTiPbltf488c2BlBisseh1h6oH1O_5XA0bfmI6llBCrOazhKTc/s808/LC+Lesson+12-57.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="634" data-original-width="808" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjORxRwxwEgvIg4W6KeTi8fOv58RHRlAhVe3X1t2XRWs7ZQEdlivcptPVIS1OerPAhhs7UxeneXhM1JixSWPjnTiPbltf488c2BlBisseh1h6oH1O_5XA0bfmI6llBCrOazhKTc/s400/LC+Lesson+12-57.png" width="400" /></a></div>
Drag two "STRING" controls to the middle of the "Group Footer(CUS:CustNumber)" band. The text for the first one should be "Invoice Summary for:" and the second one "Total Orders:".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLA-d2h8mHS-fd1K_Q57wQSmp_Yc4nKUUrEsbGlgzEl_XU-CgoQBVwiqgFAca_pRtEcYF9-JIgCxLhevPdC9nPUHqPS0-rMxODARue8rvDdhq4u5RDTM8Tb-soXuPxWcY-cv6B/s952/LC+Lesson+12-58.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="635" data-original-width="952" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLA-d2h8mHS-fd1K_Q57wQSmp_Yc4nKUUrEsbGlgzEl_XU-CgoQBVwiqgFAca_pRtEcYF9-JIgCxLhevPdC9nPUHqPS0-rMxODARue8rvDdhq4u5RDTM8Tb-soXuPxWcY-cv6B/s400/LC+Lesson+12-58.png" width="400" /></a></div>
Go to the "Data/Tables" pad, and click on the "Local Data InvoiceReport" section. Click on the "Add" button. Type in "LOC:InvoiceCount" in the "Column Name" entry. Change the "Data Type" to "LONG" and the "Screen Picture" to "@N3" and click "OK". Then click "Cancel" when the empty "Column Properties" dialog box comes up.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpf5hOF-hEDNnj-TnA3_38YvfgPeaUO2IAYHmAyE8-i1_Pcq7SjBuExKAxcLPqoSrk8iXM00DUNfGMX3mHW4Y7rISWz4-Fly4vIDnKvK__q5LguhYqT1v480IQ38-hsmuKop2S/s1044/LC+Lesson+12-59.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="677" data-original-width="1044" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpf5hOF-hEDNnj-TnA3_38YvfgPeaUO2IAYHmAyE8-i1_Pcq7SjBuExKAxcLPqoSrk8iXM00DUNfGMX3mHW4Y7rISWz4-Fly4vIDnKvK__q5LguhYqT1v480IQ38-hsmuKop2S/s400/LC+Lesson+12-59.png" width="400" /></a></div>
Drag the "LOC:InvoiceCount" control to the right of the second "STRING" control. Check that its "VariableString" property is "True". Set the "TotalType" to "Count" and select "CustNumberBreak" for the "Reset" property. This is the same type of total column that we placed in the "ORD:OrderNumber" group footer, but it will only reset when "CUS:CustNumber" changes. Select "OrderNumberBreak" for the "Tally" property. This total column will count the number of invoices that print for each customer. The Tally list allows you to select the point(s) at which the total increments. By selecting "OrderNumberBreak" from the list, the count will only increment when a new invoice begins.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXj3IrDqte0mr0peTXlRuIYTYsRbr3-LX4_dYbrPVRmh1uLFEjyHymarAemAjjrf4Gvpr8zH_Jd8NLxfrMEB4oBqNUtP25yunA7pXGuXVdMWdcBB4Q3IzzoBbMM-RSpUd1TS9/s1044/LC+Lesson+12-60.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="632" data-original-width="1044" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBXj3IrDqte0mr0peTXlRuIYTYsRbr3-LX4_dYbrPVRmh1uLFEjyHymarAemAjjrf4Gvpr8zH_Jd8NLxfrMEB4oBqNUtP25yunA7pXGuXVdMWdcBB4Q3IzzoBbMM-RSpUd1TS9/s400/LC+Lesson+12-60.png" width="400" /></a></div>
From the "Toolbox" control pad, drag a "STRING" control right of the Invoice Count string you just placed. Set the "VariableString" property to "True". Set the "Use" property to "LOC:ItemTotal", the "TotalType" to "Sum", and the "Reset" property to "CustNumberBreak". This is the same type of total column that we placed in the "ORD:OrderNumber" group footer, but it will only reset when "CUS:CustNumber" changes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbHJUSoYTaDjDCkU7wF32yN0zYsQpATqCGB7oHBk-gJCVGDqpISEbj8QB8u0shcphpo1vTN3ASDy0dOJAgBIqVHg6Tovm8PbNVe7Vd_RwDXnkCR2aDJ2pHpvlx6PQqx47H9Lb/s809/LC+Lesson+12-61.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="632" data-original-width="809" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWbHJUSoYTaDjDCkU7wF32yN0zYsQpATqCGB7oHBk-gJCVGDqpISEbj8QB8u0shcphpo1vTN3ASDy0dOJAgBIqVHg6Tovm8PbNVe7Vd_RwDXnkCR2aDJ2pHpvlx6PQqx47H9Lb/s400/LC+Lesson+12-61.png" width="400" /></a></div>
Go to the "Data/Tables" Pad. Select the "Customer" table and drag the "Company" control just right of the "Invoice Summary for:" string you placed. Tidy up the controls, and resize the bands to make them look neater. Click on the green "save and Close" button and the "Save and Exit" button. Then "Accept changes" to <b>save your work</b>.<br />
<br />
<h2>Adding a Formula</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5L_apl87QfX2jmIr7GTo30iikufdzwIMZb3lf9yeF9xhzWLFfPCVDDxJJt-o2StAQsabcsAU8VvKPd2Iu71IJYpNB1ueN3rsepAL0dW5NDiLW-5H82lpAJDIugcQsoG0eg-B8/s629/LC+Lesson+12-62.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="617" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5L_apl87QfX2jmIr7GTo30iikufdzwIMZb3lf9yeF9xhzWLFfPCVDDxJJt-o2StAQsabcsAU8VvKPd2Iu71IJYpNB1ueN3rsepAL0dW5NDiLW-5H82lpAJDIugcQsoG0eg-B8/s400/LC+Lesson+12-62.png" /></a></div>
Select the report once again and click on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEEVJnqRLi0YzQGBZwg5iKCx4SNY1cJx9Ye9BZzLFmh3_H1t71Z9pmtQmYwTr0zHu59IvDG3j17PYbnQprbV4WqxJMfWCON9_iPLgNoyVXrxVtp_93Nr4Bcwysen_qIg_zEUa/s631/LC+Lesson+12-63.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="631" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcEEVJnqRLi0YzQGBZwg5iKCx4SNY1cJx9Ye9BZzLFmh3_H1t71Z9pmtQmYwTr0zHu59IvDG3j17PYbnQprbV4WqxJMfWCON9_iPLgNoyVXrxVtp_93Nr4Bcwysen_qIg_zEUa/s400/LC+Lesson+12-63.png" /></a></div>
Click on the "Formulas" tab in the Procedure Properties dialog, and the "Insert" button to open the <b>Formula Editor</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoskTU1qLNYSmnMxhteJkf0nQjcZ0yugRnbdq6O49mWYQpZd5OW_1zKHhoatdkPZf3FX_HslUPDMBvtMyAPzOdGlqK3kBiiStTF3P2Wf1HvXTvQ0HapwWY96G8GKQBAflXCi2l/s821/LC+Lesson+12-64.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="682" data-original-width="821" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoskTU1qLNYSmnMxhteJkf0nQjcZ0yugRnbdq6O49mWYQpZd5OW_1zKHhoatdkPZf3FX_HslUPDMBvtMyAPzOdGlqK3kBiiStTF3P2Wf1HvXTvQ0HapwWY96G8GKQBAflXCi2l/s400/LC+Lesson+12-64.png" width="400" /></a></div>
The Formula Editor design dialog appears. Type "Item Total Formula" in the "Name" entry. In the "Class" entry, select "Before Print Detail" from the Template Classes list. The "Before Print Detail" class tells the Report template to perform the calculation each time it gets ready to print a Detail. Press the ellipsis button for the Result entry. Highlight "Local Data InvoiceReport" in the Tables list, select "LOC:ItemTotal" from the Columns list, then click the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9MrwGS8qocdsS_tUJZuSx6hF7SYsLs6u_XDrSUq0HY2Wp_EkY6po5omVOlQHPhqkGEgQWbQESsxf1cevWs73LfYVCbMWvtI_vLLjcEtliH1w2p5XmwDljXZi7NkNZiOdGBjJ3/s804/LC+Lesson+12-65.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="804" data-original-width="726" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9MrwGS8qocdsS_tUJZuSx6hF7SYsLs6u_XDrSUq0HY2Wp_EkY6po5omVOlQHPhqkGEgQWbQESsxf1cevWs73LfYVCbMWvtI_vLLjcEtliH1w2p5XmwDljXZi7NkNZiOdGBjJ3/s400/LC+Lesson+12-65.png" /></a></div>
Press the "Data" button in the Operands group. Highlight the "Detail" table in the Tables list, select "Quantity" from the Columns list, then click on the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Mo_cFVKLEBhBxkWbd-ccLN4ru1JnaF0quIHv6taRgUhZnBkolJWr36NMaug6zVglrMmm4rJQ1Ikpcrl9EkiGIFvTvZIqDfe-vqus4XUHqtWXCUZBmWtbZNHQCRvD3YvwUel9/s627/LC+Lesson+12-66.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="614" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Mo_cFVKLEBhBxkWbd-ccLN4ru1JnaF0quIHv6taRgUhZnBkolJWr36NMaug6zVglrMmm4rJQ1Ikpcrl9EkiGIFvTvZIqDfe-vqus4XUHqtWXCUZBmWtbZNHQCRvD3YvwUel9/s400/LC+Lesson+12-66.png" /></a></div>
This places the "DET:Quantity" column in the "Statement" entry for you. The Statement entry contains the expression being built, and you can also type directly into it to build the expression, if you wish. Click on the "*" button in the "Operators" group. Then click on the "Data" button in the "Operands" group.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6LYqhQzCYP08N6XTRo8XQH7MFsDN0KHEgIBDp7ERk7ncW79-I-cF0dKUPVeAjfju9Dd1dpnK9c6B29-PSO9knxybyc5RXady37U67JdbtpUUHhAgscUBq-3e31g0WQldgm1n/s801/LC+Lesson+12-67.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="801" data-original-width="718" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6LYqhQzCYP08N6XTRo8XQH7MFsDN0KHEgIBDp7ERk7ncW79-I-cF0dKUPVeAjfju9Dd1dpnK9c6B29-PSO9knxybyc5RXady37U67JdbtpUUHhAgscUBq-3e31g0WQldgm1n/s400/LC+Lesson+12-67.png" /></a></div>
Choose the "Detail" table in the Tables list, then the "ProdAmount" from the Columns list, and click on the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvCFyJy7eSE3QO4A1Qum7O3JNzwwTY8EL0h68pG59ifYhY5gvEHPUfgS47XM2BRuvKzgvaYCMOQ8vLKSeJwf2mK1VZxZccPGGmcoQoVV022NlJMWmN_QiPipvjX1eWk6ZKRQqw/s629/LC+Lesson+12-68.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="622" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvCFyJy7eSE3QO4A1Qum7O3JNzwwTY8EL0h68pG59ifYhY5gvEHPUfgS47XM2BRuvKzgvaYCMOQ8vLKSeJwf2mK1VZxZccPGGmcoQoVV022NlJMWmN_QiPipvjX1eWk6ZKRQqw/s400/LC+Lesson+12-68.png" /></a></div>
Now you should see the complete calculation in the statement entry: "DET:Quantity*DET:ProdAmount". Click on the "Check" button to check for syntax errors. Click on the green "OK" button to close the Formula Editor design window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ5xANOzHeSa2uQYeXklXBNAUyUPwxbLci3z67N2pbEoO6C5fE25jwzo3hUSnn0kHbJC2KgipbezzIbwLb7hE9lqLvInA42O6AmDTNc46eirLgKeNvAH5PP47XYXQpQWGVOkIm/s630/LC+Lesson+12-69.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="614" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ5xANOzHeSa2uQYeXklXBNAUyUPwxbLci3z67N2pbEoO6C5fE25jwzo3hUSnn0kHbJC2KgipbezzIbwLb7hE9lqLvInA42O6AmDTNc46eirLgKeNvAH5PP47XYXQpQWGVOkIm/s400/LC+Lesson+12-69.png" /></a></div>
Notice the new "Item Total Formula" has been added. Click on "Save and Exit" and "Accept changes" to <b>save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXiKsEcllsPwa22Shsi4OfSx3guW-h1YiEOoBdXedF3I1p8QXhF9lBZQzzJLUqwDL8K34qVTH6jnlQcIz6GoEPe39sss-_rSaR1l8irMNP9PnZCihxe8MqAFjk6JzUM3TGPwXx/s930/LC+Lesson+12-71.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="468" data-original-width="930" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXiKsEcllsPwa22Shsi4OfSx3guW-h1YiEOoBdXedF3I1p8QXhF9lBZQzzJLUqwDL8K34qVTH6jnlQcIz6GoEPe39sss-_rSaR1l8irMNP9PnZCihxe8MqAFjk6JzUM3TGPwXx/s400/LC+Lesson+12-71.png" width="400" /></a></div>
Try running the application by clicking on the "Start without Debugger (Builds Solution)" button. Select the "Print All Invoices" report and preview it. The first page is displaying the invoice correctly, but on the third page there are "ghost" invoices, with an invoice number of zero. We need to fix this.<br />
<br />
<h2>Row Filters vs Inner Joins</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9fydA17vvcngelI2T2Ahv3-szxwmeHZQsQb8q29UkZfjpe4kt1oIpDQLspISjU19dwQWM7shK9dulvAmQCKxsNp13ZMG7CSx253EOBr1ZBekwDeGrkrKXCYl2z37E9252t8mM/s828/LC+Lesson+12-70.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="815" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9fydA17vvcngelI2T2Ahv3-szxwmeHZQsQb8q29UkZfjpe4kt1oIpDQLspISjU19dwQWM7shK9dulvAmQCKxsNp13ZMG7CSx253EOBr1ZBekwDeGrkrKXCYl2z37E9252t8mM/s400/LC+Lesson+12-70.png" width="400" /></a></div>
One option would be to return to the report properties, and click on the "Actions" button. Then click on the "Report Properties" button and type in
"ORD:OrderNumber <> 0" in the "Record Filter" entry. It's not the best way to fix it, but click "OK" and "OK" and try the report now.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This will eliminate all the customers who have not ordered anything. Internally, the Report Template generates a VIEW structure for you. This VIEW structure, by default, performs an <i>outer join</i> on the tables you placed in the Table Schematic. Outer join is a standard term in Relational Database theory: it just means that the VIEW will retrieve all Parent table rows, whether there are any related Child table rows or not.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If it retrieves a Parent row without a Child, the columns in the Child table are all blank or zero, while the Parent table’s columns contain valid data. Therefore, this is the condition for which we test.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />"ORD:OrderNumber <> 0" checks to see if the ORD:OrderNumber column has any value in it other than zero. Since "ORD:OrderNumber" is the key column in the "Order" table that creates the link to the related Customer table row, it must contain a value if there are existing Order table rows for the current Customer.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If ORD:OrderNumber does not contain a value other than zero, the current Customer table row is skipped ("filtered out"). This eliminates printing Parent rows without related Children (in this case, any Customers without Orders).
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This means that a filter would work. However, since the VIEW structure can do the filtering required, there is a better way. This is the "inner join". What this means is that there is a Customer row only if there is a related Order row. This makes the VIEW smaller, and thus more efficient than a filter.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Return to the "Report Properties" dialog and remove the "Record Filter" entry.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_pYSPHTxsTVHFN-y2Dx73HHZwT3vA22t1P7A1RQf8peBZoRbE39CEXOPX1rWtYAe0dQIrtl9bJsH6n6GVQt0XcEcFuRU1y5ViNvsBb1fd6-MvlG-2AdBZqR9p_cLF0bbVj_aq/s816/LC+Lesson+12-72.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="415" data-original-width="816" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_pYSPHTxsTVHFN-y2Dx73HHZwT3vA22t1P7A1RQf8peBZoRbE39CEXOPX1rWtYAe0dQIrtl9bJsH6n6GVQt0XcEcFuRU1y5ViNvsBb1fd6-MvlG-2AdBZqR9p_cLF0bbVj_aq/s400/LC+Lesson+12-72.png" width="400" /></a></div>
Open the "Data/Tables" pad and select the "Order" table. Click on the "Change" button and check the "Inner" box. This changes the join type from an <i>Outer Join</i> to an <i>Inner Join</i> which only selects related rows from "Customer" and "Order". Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw3Twux97GNgUtLJ_BhcgKGzW-7FTEVvL9qRfbq2pVUn9xWlKai6cNAcMBwJXxbgQ32K4AoATEdsomFU9sx96OIkEsV8h7iH_qrvnVmCY4lrEp9BGeQRLfwNdE6mMsjKTpMYsD/s836/LC+Lesson+12-73.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="836" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw3Twux97GNgUtLJ_BhcgKGzW-7FTEVvL9qRfbq2pVUn9xWlKai6cNAcMBwJXxbgQ32K4AoATEdsomFU9sx96OIkEsV8h7iH_qrvnVmCY4lrEp9BGeQRLfwNdE6mMsjKTpMYsD/s400/LC+Lesson+12-73.png" width="400" /></a></div>
Click on the "Window" button in the properties tab. This will open the report progress window in the Window Designer. Click on the title bar on the window, and change the "Text" property to "Invoice Progress...". Click on the green "Save and Close" button, and then on the green "Save and Exit" button to return to the main Application Tree. Click on "Accept changes" to <b>save your work</b>. Try running the "Print all Invoices" report again.<br />
<br />
<h2>A Range Limited Report</h2>
Next, we will limit the range of rows that will print.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIcaOvY86CQ9-ucOgnfZI_7GFTCOB6AuqOYke4BnhvELw-xGgViBlOgzGIlsDfPV_E_Ya86FynKUGO6WEbu7-4ev2Di8r3jK-G9yWPEmQtl8_UXCmkY_AVM1vplBtUNz9La386/s824/LC+Lesson+12-74.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="727" data-original-width="824" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIcaOvY86CQ9-ucOgnfZI_7GFTCOB6AuqOYke4BnhvELw-xGgViBlOgzGIlsDfPV_E_Ya86FynKUGO6WEbu7-4ev2Di8r3jK-G9yWPEmQtl8_UXCmkY_AVM1vplBtUNz9La386/s400/LC+Lesson+12-74.png" width="400" /></a></div>
From the Application Tree, choose the "InvoiceReport" procedure. Go to the "Application" menu and select "Copy Procedure".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfh4Y9t-AB6iBL5VwStMPqXgYQsg0pM2qHa5bTPsRSrEWjD_6q-4BifOWoH47hZJn8gPcJeeqSXR9LEj_XnGJG0xtnYyBbZnobUM0xgwJAMp92HfsMDG5w1URRA99teQBudocz/s632/LC+Lesson+12-75.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="632" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfh4Y9t-AB6iBL5VwStMPqXgYQsg0pM2qHa5bTPsRSrEWjD_6q-4BifOWoH47hZJn8gPcJeeqSXR9LEj_XnGJG0xtnYyBbZnobUM0xgwJAMp92HfsMDG5w1URRA99teQBudocz/s400/LC+Lesson+12-75.png" /></a></div>
The New Procedure dialog appears. Type "CustInvoiceReport" in the entry box, then click "OK". Click on the "properties" button for the new (copied) procedure which has replaced the "<ToDo>" placeholder. Change the "Description" entry to "Print Customer Invoices".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFmp7bnUCVnDPGinIG6nS_Gh3HzmNCK9RZTPdjsUoTp3qz1xhc62-JinzayUxANdfwUP5qBWmisOgb-aHJZtaiQTMu7mVookwIcFE6opWQWDoc8colLgzQ1Qzq4fYm71zT69I9/s629/LC+Lesson+12-76.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="611" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFmp7bnUCVnDPGinIG6nS_Gh3HzmNCK9RZTPdjsUoTp3qz1xhc62-JinzayUxANdfwUP5qBWmisOgb-aHJZtaiQTMu7mVookwIcFE6opWQWDoc8colLgzQ1Qzq4fYm71zT69I9/s400/LC+Lesson+12-76.png" /></a></div>
Change to the "Embeds" tab and click on the "Collapse All" button. Then click on each of these entries to expand them: "Local Objects", "Abc Objects", "Window Manager (ReportManager)".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA2smoqVWSDGSOrEzSPQgqkdcUEjwfma1DYOS-fzr4i_hQOIvpHA4MUOhwBoJyhu0OOf-8LuNX9XlqXujRaFgBVGKlgV1xRdDH7VyF6fiKKi2-2-nlh4u8IXWreclQ70YsV4RI/s630/LC+Lesson+12-77.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="604" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA2smoqVWSDGSOrEzSPQgqkdcUEjwfma1DYOS-fzr4i_hQOIvpHA4MUOhwBoJyhu0OOf-8LuNX9XlqXujRaFgBVGKlgV1xRdDH7VyF6fiKKi2-2-nlh4u8IXWreclQ70YsV4RI/s400/LC+Lesson+12-77.png" /></a></div>
Find the first "Init" procedure, click on "CODE", then "Open Files". Click on the "Insert" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFR9UTVLY7fmGFP9nbKoxoVwA2YKckmCEDf-9yuY_N0imbz5Xz8CVolxIxygpfhxp9dmYIX5U1hlMSekc7o49pi2knVrpGS1DXbj8FrkBD7ulLgY0-EE93x-obZiSx4xPLQrol/s633/LC+Lesson+12-78.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="403" data-original-width="633" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFR9UTVLY7fmGFP9nbKoxoVwA2YKckmCEDf-9yuY_N0imbz5Xz8CVolxIxygpfhxp9dmYIX5U1hlMSekc7o49pi2knVrpGS1DXbj8FrkBD7ulLgY0-EE93x-obZiSx4xPLQrol/s400/LC+Lesson+12-78.png" width="400" /></a></div>
Choose "Source" and click "Select". This embed point is at the beginning of the procedure, before the report has begun to process. It’s important that the tables for the report already be open because we will call another procedure for the user to select a "Customer" row. If the tables for the report weren’t already open, the procedure we call would open the "Customer" table for itself then close it again and we would lose the data that we want to have for the report. This has to do with multithreading and the Multiple Document Interface (MDI). See "THREAD" in the Language Reference for more on this.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNZkAnbZIKyg_S00Lv4uV_EW3N-6vfvOPrXK5f1lx2c-8pBl3_o31-yp3C9e_RvQM86jFdUmweqVOxG6rgCcSa51bLPtpzPLli0-f4ed7vckr0LaBCoGK73Kdn3mmtW3Vht9nz/s598/LC+Lesson+12-79.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="226" data-original-width="598" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNZkAnbZIKyg_S00Lv4uV_EW3N-6vfvOPrXK5f1lx2c-8pBl3_o31-yp3C9e_RvQM86jFdUmweqVOxG6rgCcSa51bLPtpzPLli0-f4ed7vckr0LaBCoGK73Kdn3mmtW3Vht9nz/s400/LC+Lesson+12-79.png" width="400" /></a></div>
Type in "GlobalRequest = SelectRecord" and click on the green "Save and Close" button. This code sets up a Browse procedure to select a row (it enables the Browse procedure’s "Select" button).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV6aA3KDNoZyETu55-p3DtViyDeFlMGYXoxal9-3y0L03UC1ymAL9rLMqIIRjITaaqEzr9uAE5JL6xMoL71poD73V8Dk8L0BbpoRpxlzkcMhhyGMrgSR6JfRcXOCqmRoGBRyZX/s630/LC+Lesson+12-80.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="604" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhV6aA3KDNoZyETu55-p3DtViyDeFlMGYXoxal9-3y0L03UC1ymAL9rLMqIIRjITaaqEzr9uAE5JL6xMoL71poD73V8Dk8L0BbpoRpxlzkcMhhyGMrgSR6JfRcXOCqmRoGBRyZX/s400/LC+Lesson+12-80.png" /></a></div>
Make sure the SOURCE you just added is still selected. Then click on the "Insert" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6NEj-T_61hTxHVdcuxrefen7UkPl_i1KOISvN0FeQW2N8OxvqJjy-HSk6LbClmGJutM4dOA9djw9SbiZxfeXBdKJlAIAqnsKaR_fnTrq4d2XyUD3RF0Amw4zyynyYpFMpwjAt/s635/LC+Lesson+12-81.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="402" data-original-width="635" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6NEj-T_61hTxHVdcuxrefen7UkPl_i1KOISvN0FeQW2N8OxvqJjy-HSk6LbClmGJutM4dOA9djw9SbiZxfeXBdKJlAIAqnsKaR_fnTrq4d2XyUD3RF0Amw4zyynyYpFMpwjAt/s400/LC+Lesson+12-81.png" width="400" /></a></div>
Choose "Call a procedure" then click the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1SSpQy6FFHNLFIydVgRnQ4oy4OekAl7d_iJchg_hokGC7neyk32qO9KScqcHxou1n3sX7SmxvDcScVKCHOwKksHd3WLLbixfz2ha5-6jScK9RIWof9FNDnZU3SJp-ithsGoFt/s706/LC+Lesson+12-82.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="517" data-original-width="706" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1SSpQy6FFHNLFIydVgRnQ4oy4OekAl7d_iJchg_hokGC7neyk32qO9KScqcHxou1n3sX7SmxvDcScVKCHOwKksHd3WLLbixfz2ha5-6jScK9RIWof9FNDnZU3SJp-ithsGoFt/s400/LC+Lesson+12-82.png" width="400" /></a></div>
Select "BrowseCustomers" in the list, then press the "OK" button. This will generate a procedure call to the BrowseCustomers Browse procedure to allow the user to select which Customer’s Invoices to print.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Notice that there are now two entries displayed under the embed point. At each embed point you can place as many items as you want, mixing Code Templates with your own SOURCE or PROCEDURE Calls. You can also move the separate items around within the embed point using the arrow buttons, changing their logical execution order (the first displayed is the first to execute). Note well that moving them will change the assigned Priority option setting for the moved item if you attempt to move a higher priority item in front of another with a lower priority setting.<br />
<br />
<h2>Set the Range Limit</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDi2FB415WD_qaSLhrnfhXM242K7itMUuPN7UuHiTwtrtXZilq-sOuO4oEKcKp92U6F4NGFXEnM4pmRwhkT9XYIbbPriMl0UzZHNpQOFpEyiecvNgPgoV8PkXiaBjefg1NJpRg/s825/LC+Lesson+12-83.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="586" data-original-width="825" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDi2FB415WD_qaSLhrnfhXM242K7itMUuPN7UuHiTwtrtXZilq-sOuO4oEKcKp92U6F4NGFXEnM4pmRwhkT9XYIbbPriMl0UzZHNpQOFpEyiecvNgPgoV8PkXiaBjefg1NJpRg/s400/LC+Lesson+12-83.png" width="400" /></a></div>
Go to the "Properties" tab, and then press the "Actions" button. In the Properties dialog, press the "Report Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjbTJKXdjhoy3BhjjI9I6CUaLVxwO8OiVUxzZAQR-3CZd6FXjj0U4mvycaRGUVNAUlVctdiA2PPm-HlX9ngpRwQmD6Thw3vmESr1Bob5L3XbwdshTchXHIuKZjxHiMhGDoto2L/s829/LC+Lesson+12-84.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="425" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjbTJKXdjhoy3BhjjI9I6CUaLVxwO8OiVUxzZAQR-3CZd6FXjj0U4mvycaRGUVNAUlVctdiA2PPm-HlX9ngpRwQmD6Thw3vmESr1Bob5L3XbwdshTchXHIuKZjxHiMhGDoto2L/s400/LC+Lesson+12-84.png" width="400" /></a></div>
The Report Properties dialog appears. This dialog allows you to set either <i>Row Filters</i> or <i>Range Limits</i> (along with Hot Columns and Detail Filters).
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Row Filters and Range limits are very similar. A Row Filter is a conditional expression to filter out unwanted rows from the report, while a Range Limit limits the rows printed to only those matching specific key column values. They can both be used to create reports on a subset of your tables, but a <i>Range Limit requires a key</i> and a Row Filter doesn’t. This makes a <b>Row Filter</b> completely flexible, while a <b>Range Limit</b> is very fast. You can use both capabilities if you want to limit the range, then filter out unneeded rows from that range.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Select the "Range Limits" tab. Press the ellipsis button for the "Range Limit" entry. The "CUS:CustNumber" control, the only logical choice, is automatically populated. Leave "Current Value" as the "Range Limit Type". <i>Current Value </i>indicates that whatever value is in the column at the time the report begins is the value on which to limit the report. Since the user will choose a Customer row from the BrowseCustomer procedure, the correct value will be in the CUS:CustNumber column when the report begins. Now press the "OK" button. Press the next "OK" button, followed by the green "Save and Exit" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2vcdymol4EovgA1qT_kqFAKs_hPyunLQ-6CndO8EkHKEEBOoQgVIL6bNmzgwXmsVNHybQ_p2w7aNdstppppGGDffu4sJa6JytlL01n4FbCFbNosIaecl3LqH1zDHd_hOgvCp/s624/LC+Lesson+12-85.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="624" data-original-width="596" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhG2vcdymol4EovgA1qT_kqFAKs_hPyunLQ-6CndO8EkHKEEBOoQgVIL6bNmzgwXmsVNHybQ_p2w7aNdstppppGGDffu4sJa6JytlL01n4FbCFbNosIaecl3LqH1zDHd_hOgvCp/s400/LC+Lesson+12-85.png" /></a></div>
Press the "Accept changes" button to <b>save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP7WjFW8yuX-98aUMq06KQBcSWS4E0pk96Ds1cPf2foEIyYDhTmOlZqO51zfUAmMn9VzLzdNNAF05J2Ar2clPGhNBwIQLXBgpfzNiaXfZHKRdQ-YU7QTluT9aom_KfHBeAHW8_/s742/LC+Lesson+12-86.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="359" data-original-width="742" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP7WjFW8yuX-98aUMq06KQBcSWS4E0pk96Ds1cPf2foEIyYDhTmOlZqO51zfUAmMn9VzLzdNNAF05J2Ar2clPGhNBwIQLXBgpfzNiaXfZHKRdQ-YU7QTluT9aom_KfHBeAHW8_/s400/LC+Lesson+12-86.png" width="400" /></a></div>
Click on the "Start without Debugger (Builds Solution)" button to run the application. Use the "File" menu and click on "Print One Customer's Invoices". Double-click on Customer 1 to preview the report for the only customer with any invoices. "Exit" the application when done and return to the IDE. Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work.<br />
<br />
<h2>A Single Invoice Report</h2>
Next, we will print a single invoice from the Browse list of orders.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcJ_YEuvKE1hwUgwbRmHogjZF1T-swRBRE8HxvU1LreiamAV8fzhFSReuNajoUllO0gJchB-LjAOdn_ce62Z0t_BWXXPFi0Ww41EIyJOina0WPKCEsof6CTMjDDbi5jUTSE-z/s809/LC+Lesson+12-87.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="723" data-original-width="809" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcJ_YEuvKE1hwUgwbRmHogjZF1T-swRBRE8HxvU1LreiamAV8fzhFSReuNajoUllO0gJchB-LjAOdn_ce62Z0t_BWXXPFi0Ww41EIyJOina0WPKCEsof6CTMjDDbi5jUTSE-z/s400/LC+Lesson+12-87.png" width="400" /></a></div>
In the Application Tree, highlight the "CustInvoiceReport" procedure. Go to the "Application" menu and click on "Copy Procedure". Type "SingleInvoiceReport" in the entry box, then press the "OK" button.
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7mCSO6jDzVqVKMjZm3qzbbtUEogZH3WTZMQtK81JKD3_Nm8xQY-808E3s-bIzAx9zha3rsrkFzHsaGa_BfCC1tumrqfn0IeANxRUu4Jyzoh9BYndGVtBGEScLAnFaXBYBLVdn/s441/LC+Lesson+12-88.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="322" data-original-width="441" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7mCSO6jDzVqVKMjZm3qzbbtUEogZH3WTZMQtK81JKD3_Nm8xQY-808E3s-bIzAx9zha3rsrkFzHsaGa_BfCC1tumrqfn0IeANxRUu4Jyzoh9BYndGVtBGEScLAnFaXBYBLVdn/s400/LC+Lesson+12-88.png" width="400" /></a></div>
Welcome to the (wild and) wonderful world of <i>Clarion</i> programming. If you didn't get this message, you are fortunate. My <a href="https://clarionhub.com/" target="_blank">colleagues at <i>Clarion Hub</i></a> tell me it has something to do with <a href="https://clarionhub.com/t/copy-procedure-causes-c11-crash-alternate-way-to-copy/3996" rel="nofollow" target="_blank">using a formula</a>. It is better to "just code it". More on that later. For now, we will use a workaround, by deleting the formula, and then putting it back later, after we have copied the report. Click on "Close Application".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCOL03aFr2SfTAkdcsXfpiMtvVy3T4B7akRic3Jl33KhCLdJb0nm8ylfeXdFR6E7adXK0-8lA4Ef-j3NObEjWZcBN8hOOqWWrFl2_VHUMmjYkT3uBy3n_BEGtwgaL3ypNkh7OH/s774/LC+Lesson+12-89.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="311" data-original-width="774" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCOL03aFr2SfTAkdcsXfpiMtvVy3T4B7akRic3Jl33KhCLdJb0nm8ylfeXdFR6E7adXK0-8lA4Ef-j3NObEjWZcBN8hOOqWWrFl2_VHUMmjYkT3uBy3n_BEGtwgaL3ypNkh7OH/s400/LC+Lesson+12-89.png" width="400" /></a></div>
Run the <i>Clarion IDE</i> and open "LCLesson" once again. Since we have been diligent about saving our work, click on "Last Saved" to recover the application.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBGdfS0cN4v1jSWgOZLq2dkWoYiFtkM83rKKrTluHAEATwBeuYfjIsBVP4vz1CsMjwhhmQdD5AI4-n00OMBRW8pfxEtX79fpD9regExzJddCmcPLFdtj-h6wDj_-r-l3VZoH_3/s652/LC+Lesson+12-90.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="521" data-original-width="652" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBGdfS0cN4v1jSWgOZLq2dkWoYiFtkM83rKKrTluHAEATwBeuYfjIsBVP4vz1CsMjwhhmQdD5AI4-n00OMBRW8pfxEtX79fpD9regExzJddCmcPLFdtj-h6wDj_-r-l3VZoH_3/s400/LC+Lesson+12-90.png" width="400" /></a></div>
Select "CustInvoiceReport" and then click on the "Formulas" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijSzNRfKV1Sqcc9wCkg9RXwMvr_JZMR5kVccYrnUsX05un-8_-bBUvgZSEG1xHmbsKD0aHIIbuuHNrDkoP6N_bdt07ID_pNu1TyKXHYnIMeGU-4VnoewW4kOQqKXRaO_JBZkhj/s662/LC+Lesson+12-91.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="529" data-original-width="662" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijSzNRfKV1Sqcc9wCkg9RXwMvr_JZMR5kVccYrnUsX05un-8_-bBUvgZSEG1xHmbsKD0aHIIbuuHNrDkoP6N_bdt07ID_pNu1TyKXHYnIMeGU-4VnoewW4kOQqKXRaO_JBZkhj/s400/LC+Lesson+12-91.png" width="400" /></a></div>
Select the "Item Total Formula" and click on the "Delete" button, followed by "Yes". Click on the green "Save and Exit" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcJ_YEuvKE1hwUgwbRmHogjZF1T-swRBRE8HxvU1LreiamAV8fzhFSReuNajoUllO0gJchB-LjAOdn_ce62Z0t_BWXXPFi0Ww41EIyJOina0WPKCEsof6CTMjDDbi5jUTSE-z/s809/LC+Lesson+12-87.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="723" data-original-width="809" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwcJ_YEuvKE1hwUgwbRmHogjZF1T-swRBRE8HxvU1LreiamAV8fzhFSReuNajoUllO0gJchB-LjAOdn_ce62Z0t_BWXXPFi0Ww41EIyJOina0WPKCEsof6CTMjDDbi5jUTSE-z/s400/LC+Lesson+12-87.png" width="400" /></a></div>
In the Application Tree, highlight the "CustInvoiceReport" procedure. Go to the "Application" menu and click on "Copy Procedure". Type "SingleInvoiceReport" in the entry box, then press the "OK" button.
<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtMUTLk_yldGaaGgMg87OQXn8VZzajeWV3NYSsuSPmjR6UkoA30YzlZMV5jc_iy11_8X7DXe989ukcrxJXdJTba0o9ZdcxBWg8vceRYK7Bbw2i5rwJnYR5YcOME1TJvsd7KN-h/s540/LC+Lesson+12-92.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="152" data-original-width="540" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtMUTLk_yldGaaGgMg87OQXn8VZzajeWV3NYSsuSPmjR6UkoA30YzlZMV5jc_iy11_8X7DXe989ukcrxJXdJTba0o9ZdcxBWg8vceRYK7Bbw2i5rwJnYR5YcOME1TJvsd7KN-h/s400/LC+Lesson+12-92.png" width="400" /></a></div>
When we copy a procedure that calls other procedures, we have the option to call other procedures or not. In this case, we want to continue to use the procedures that "CustInvoiceReport" procedure is using, so click on the "Same" button.<br />
<br />
<h2>Adding the Formula again. Twice</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBGdfS0cN4v1jSWgOZLq2dkWoYiFtkM83rKKrTluHAEATwBeuYfjIsBVP4vz1CsMjwhhmQdD5AI4-n00OMBRW8pfxEtX79fpD9regExzJddCmcPLFdtj-h6wDj_-r-l3VZoH_3/s652/LC+Lesson+12-90.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="521" data-original-width="652" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBGdfS0cN4v1jSWgOZLq2dkWoYiFtkM83rKKrTluHAEATwBeuYfjIsBVP4vz1CsMjwhhmQdD5AI4-n00OMBRW8pfxEtX79fpD9regExzJddCmcPLFdtj-h6wDj_-r-l3VZoH_3/s400/LC+Lesson+12-90.png" width="400" /></a></div>
Select the "CustInvoiceReport" once again and click on the "Formulas" button, and the "Insert" button to open the <b>Formula Editor</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoskTU1qLNYSmnMxhteJkf0nQjcZ0yugRnbdq6O49mWYQpZd5OW_1zKHhoatdkPZf3FX_HslUPDMBvtMyAPzOdGlqK3kBiiStTF3P2Wf1HvXTvQ0HapwWY96G8GKQBAflXCi2l/s821/LC+Lesson+12-64.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="682" data-original-width="821" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoskTU1qLNYSmnMxhteJkf0nQjcZ0yugRnbdq6O49mWYQpZd5OW_1zKHhoatdkPZf3FX_HslUPDMBvtMyAPzOdGlqK3kBiiStTF3P2Wf1HvXTvQ0HapwWY96G8GKQBAflXCi2l/s400/LC+Lesson+12-64.png" width="400" /></a></div>
The Formula Editor design dialog appears. Type "Item Total Formula" in the "Name" entry. In the "Class" entry, select "Before Print Detail" from the Template Classes list. The "Before Print Detail" class tells the Report template to perform the calculation each time it gets ready to print a Detail. Press the ellipsis button for the Result entry. Highlight "Local Data CustInvoiceReport" in the Tables list, select "LOC:ItemTotal" from the Columns list, then click the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9MrwGS8qocdsS_tUJZuSx6hF7SYsLs6u_XDrSUq0HY2Wp_EkY6po5omVOlQHPhqkGEgQWbQESsxf1cevWs73LfYVCbMWvtI_vLLjcEtliH1w2p5XmwDljXZi7NkNZiOdGBjJ3/s804/LC+Lesson+12-65.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="804" data-original-width="726" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9MrwGS8qocdsS_tUJZuSx6hF7SYsLs6u_XDrSUq0HY2Wp_EkY6po5omVOlQHPhqkGEgQWbQESsxf1cevWs73LfYVCbMWvtI_vLLjcEtliH1w2p5XmwDljXZi7NkNZiOdGBjJ3/s400/LC+Lesson+12-65.png" /></a></div>
Press the "Data" button in the Operands group. Highlight the "Detail" table in the Tables list, select "Quantity" from the Columns list, then click on the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Mo_cFVKLEBhBxkWbd-ccLN4ru1JnaF0quIHv6taRgUhZnBkolJWr36NMaug6zVglrMmm4rJQ1Ikpcrl9EkiGIFvTvZIqDfe-vqus4XUHqtWXCUZBmWtbZNHQCRvD3YvwUel9/s627/LC+Lesson+12-66.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="614" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-Mo_cFVKLEBhBxkWbd-ccLN4ru1JnaF0quIHv6taRgUhZnBkolJWr36NMaug6zVglrMmm4rJQ1Ikpcrl9EkiGIFvTvZIqDfe-vqus4XUHqtWXCUZBmWtbZNHQCRvD3YvwUel9/s400/LC+Lesson+12-66.png" /></a></div>
This places the "DET:Quantity" column in the "Statement" entry for you. The Statement entry contains the expression being built, and you can also type directly into it to build the expression, if you wish. Click on the "*" button in the "Operators" group. Then click on the "Data" button in the "Operands" group.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6LYqhQzCYP08N6XTRo8XQH7MFsDN0KHEgIBDp7ERk7ncW79-I-cF0dKUPVeAjfju9Dd1dpnK9c6B29-PSO9knxybyc5RXady37U67JdbtpUUHhAgscUBq-3e31g0WQldgm1n/s801/LC+Lesson+12-67.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="801" data-original-width="718" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN6LYqhQzCYP08N6XTRo8XQH7MFsDN0KHEgIBDp7ERk7ncW79-I-cF0dKUPVeAjfju9Dd1dpnK9c6B29-PSO9knxybyc5RXady37U67JdbtpUUHhAgscUBq-3e31g0WQldgm1n/s400/LC+Lesson+12-67.png" /></a></div>
Choose the "Detail" table in the Tables list, then the "ProdAmount" from the Columns list, and click on the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvCFyJy7eSE3QO4A1Qum7O3JNzwwTY8EL0h68pG59ifYhY5gvEHPUfgS47XM2BRuvKzgvaYCMOQ8vLKSeJwf2mK1VZxZccPGGmcoQoVV022NlJMWmN_QiPipvjX1eWk6ZKRQqw/s629/LC+Lesson+12-68.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="622" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvCFyJy7eSE3QO4A1Qum7O3JNzwwTY8EL0h68pG59ifYhY5gvEHPUfgS47XM2BRuvKzgvaYCMOQ8vLKSeJwf2mK1VZxZccPGGmcoQoVV022NlJMWmN_QiPipvjX1eWk6ZKRQqw/s400/LC+Lesson+12-68.png" /></a></div>
Now you should see the complete calculation in the statement entry: "DET:Quantity*DET:ProdAmount". Click on the "Check" button to check for syntax errors. Click on the green "OK" button to close the Formula Editor design window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ5xANOzHeSa2uQYeXklXBNAUyUPwxbLci3z67N2pbEoO6C5fE25jwzo3hUSnn0kHbJC2KgipbezzIbwLb7hE9lqLvInA42O6AmDTNc46eirLgKeNvAH5PP47XYXQpQWGVOkIm/s630/LC+Lesson+12-69.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="614" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ5xANOzHeSa2uQYeXklXBNAUyUPwxbLci3z67N2pbEoO6C5fE25jwzo3hUSnn0kHbJC2KgipbezzIbwLb7hE9lqLvInA42O6AmDTNc46eirLgKeNvAH5PP47XYXQpQWGVOkIm/s400/LC+Lesson+12-69.png" /></a></div>
Notice the new "Item Total Formula" has been added. Click on "Save and Exit" and "Accept changes" to <i>save your work</i>.<br />
<b>Now repeat the same process</b> to add the missing formula to the new report, "SingleInvoiceReport".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRcPWtKSKKFkRTcmUeIUz69MtrjJzwVXUjkItozWcUVxUtG4rCIccfdPmPvR4x816zR4dqXk2vAJSf7508A5BLex_Msp4_U9RPpT787V1X8b6y-0_cK9aCspWgT7MWrN7FJS4E/s654/LC+Lesson+12-93.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="525" data-original-width="654" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRcPWtKSKKFkRTcmUeIUz69MtrjJzwVXUjkItozWcUVxUtG4rCIccfdPmPvR4x816zR4dqXk2vAJSf7508A5BLex_Msp4_U9RPpT787V1X8b6y-0_cK9aCspWgT7MWrN7FJS4E/s400/LC+Lesson+12-93.png" width="400" /></a></div>
Notice how the copied procedure appears unattached at the bottom of the application tree. We'll "connect the lines" after we finish with the report.<br />
<br />
<h2>A Single Invoice Report (Continued)</h2>
With "SingleInvoiceReport" selected, click on the "Properties" button and change the description to read "Print Single Invoice" and then click on the green "Save and Exit" button. Click on the "Embeds" button because we want to remove some embedded code.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpJV4xiArkE_B88jhFLoMkG1uQAJhH4O9oOIWE327UxFbZrUmhhhUz_p6NOLl9aXOkPCEy5mwxYt-CtFwrlVUqAXn0k36nYy47-vAVumMXCScQo53kW0ks6EQ1Kg6NSFdFjC5U/s839/LC+Lesson+12-94.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="839" data-original-width="644" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpJV4xiArkE_B88jhFLoMkG1uQAJhH4O9oOIWE327UxFbZrUmhhhUz_p6NOLl9aXOkPCEy5mwxYt-CtFwrlVUqAXn0k36nYy47-vAVumMXCScQo53kW0ks6EQ1Kg6NSFdFjC5U/s400/LC+Lesson+12-94.png" /></a></div>
Click on the "Expand filled nodes" button to show the user's added code to the generated code. The red highlights at each node will tell you that there is some embedded code further down the tree. At the bottom, you can see two entries of embedded code, which we want to remove.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigjVaX3cTzKVhyphenhyphenJtTsvkYCx8oyobFQ-HhyQLNanMTzFt23rTd6YCYJLYUNnAhERoBEZtoQ3wTgext7j57K-svB53xOnxm_-ZJ8boql7UCR_P4h6SzVyJVRoDheX2oINgn4NNGH/s775/LC+Lesson+12-95.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="496" data-original-width="775" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigjVaX3cTzKVhyphenhyphenJtTsvkYCx8oyobFQ-HhyQLNanMTzFt23rTd6YCYJLYUNnAhERoBEZtoQ3wTgext7j57K-svB53xOnxm_-ZJ8boql7UCR_P4h6SzVyJVRoDheX2oINgn4NNGH/s400/LC+Lesson+12-95.png" width="400" /></a></div>
Click on the "Show Filled Only" button, and un-click the adjacent "Show Priority Labels" button. This will just show the stuff we want to remove. Click on the line that reads "SOURCE (GlobalRequest = SelectRecord)" and then click on the "Delete" button, followed by "Yes". Do the same for the next line that reads "PROCEDURE BrowseCustomers".<br />
<br />
<h2>Change the Table Schematic</h2>
We need to change the order of the tables in the Table Schematic. We’ll end up with all the same tables, but instead of the "Customer" table as the primary table (first table in the Table Schematic), we need the "Order" table to be the primary table for the procedure, so we can easily limit the range to a single invoice.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNpfghtLB2GrVsWgfo48G6lrhcqjaRMmvgb5RYJGaNkADwkVwDxu3uu2uuAUbJeMUG13Por6njBkeQCNmJhA1YbS3wOh7Egq9YfRdtjmBWOksNP7m7u3gpR002-Ra_-XkQFktt/s810/LC+Lesson+12-96.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="494" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNpfghtLB2GrVsWgfo48G6lrhcqjaRMmvgb5RYJGaNkADwkVwDxu3uu2uuAUbJeMUG13Por6njBkeQCNmJhA1YbS3wOh7Egq9YfRdtjmBWOksNP7m7u3gpR002-Ra_-XkQFktt/s400/LC+Lesson+12-96.png" width="400" /></a></div>
Highlight the "SingleInvoiceReport" procedure, and select the "Data / Tables" Pad. Click on the "Customer" table, then press the "Delete" button. The tables disappear, and are replaced by "<ToDo>".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6tKsL4yFBuezw3MJ-QL2ADsq9ic0By2kM73ZjNi66Qo3BHTU4H1hjndbBrTsEdZXjBe1CT-uk8hWRmhEhYrYWSAe0dqlDlQRmsChSQITHWW3CZnLoE1Ul0qVBIx2o9gpnDvEg/s813/LC+Lesson+12-97.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="496" data-original-width="813" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6tKsL4yFBuezw3MJ-QL2ADsq9ic0By2kM73ZjNi66Qo3BHTU4H1hjndbBrTsEdZXjBe1CT-uk8hWRmhEhYrYWSAe0dqlDlQRmsChSQITHWW3CZnLoE1Ul0qVBIx2o9gpnDvEg/s400/LC+Lesson+12-97.png" width="400" /></a></div>
Click on the "<ToDo>" and then click on the "Add" button. Choose the "Order" table from the list, and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8TpLGdttgWEePI6I0OLjaz42m5vWMQCzZa9QOr1ABvvZNGuWVtaW-T4-gu4kNCvVVeFLGnPYHKt4Qd9XiX6aushW1RQDEfkktKVOfuubCQ4ZhF6MW5b6jwBk7DBQRqE6Ce7Q7/s807/LC+Lesson+12-98.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="491" data-original-width="807" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8TpLGdttgWEePI6I0OLjaz42m5vWMQCzZa9QOr1ABvvZNGuWVtaW-T4-gu4kNCvVVeFLGnPYHKt4Qd9XiX6aushW1RQDEfkktKVOfuubCQ4ZhF6MW5b6jwBk7DBQRqE6Ce7Q7/s400/LC+Lesson+12-98.png" width="400" /></a></div>
Next, click on the "Order" table and then the "Change" button. Select the key called "KEYORDERNUMBER" and click on the "Select" button. So now we can use the key to find the Order number we want to print out.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJqYTLKfk9B5l-nQzGyoz-s05iAwpBT5ZpJcO0-tcl-Bc1_85YJtgDsDxyvXIFF0KOrFp32ex3VsOsxSjDUzAd9tb7QY9bnET-xKigZTbIugKxPbpl1dwDS9FcTwe9YcHvPNvM/s810/LC+Lesson+12-99.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="504" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJqYTLKfk9B5l-nQzGyoz-s05iAwpBT5ZpJcO0-tcl-Bc1_85YJtgDsDxyvXIFF0KOrFp32ex3VsOsxSjDUzAd9tb7QY9bnET-xKigZTbIugKxPbpl1dwDS9FcTwe9YcHvPNvM/s400/LC+Lesson+12-99.png" width="400" /></a></div>
Click on the "Order" table again, and then the "Add" button. Select the "Detail" table and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEdB-lnWY6B96VGYmp-QSRHc-1mVoQmjkn_GAnXMXpMpDLCNCBHs00Zkq5Wai6o0JBFucOnVl7DN44GjZ8BVVkCYy5fsHIWs3pKJ0XXVggzwbXJoCmfNysOHzMW-9oE4jIV2e5/s810/LC+Lesson+12-100.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="497" data-original-width="810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEdB-lnWY6B96VGYmp-QSRHc-1mVoQmjkn_GAnXMXpMpDLCNCBHs00Zkq5Wai6o0JBFucOnVl7DN44GjZ8BVVkCYy5fsHIWs3pKJ0XXVggzwbXJoCmfNysOHzMW-9oE4jIV2e5/s400/LC+Lesson+12-100.png" width="400" /></a></div>
Now repeat the same process to add the "Product" table as a related table to "Detail".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwtdfhC7hIlf2GCYYEZN7tYalZze7KUwWwK5XVCkann73d1arW7eKDA4LZz6p4-zA1XQ1Dd093bJpTafBV5eKOQZFTtLmNJFeobzfubZqBpes60HBM0pcDv-t5jPsQ2yixU250/s804/LC+Lesson+12-101.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="495" data-original-width="804" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwtdfhC7hIlf2GCYYEZN7tYalZze7KUwWwK5XVCkann73d1arW7eKDA4LZz6p4-zA1XQ1Dd093bJpTafBV5eKOQZFTtLmNJFeobzfubZqBpes60HBM0pcDv-t5jPsQ2yixU250/s400/LC+Lesson+12-101.png" width="400" /></a></div>
Go back to the "Order" table, click "Add" and choose the "Customer" table. Click the "Select" button. Now we have all the related tables needed to display the data in an invoice, and we have the correct key on the "Order" table to be able to specify exactly which single invoice to print.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_MZ0UaD1kH11jky5rcET2-l6fqAr3faY0ypVto9-v2NWdl4XAJn2Urfw1uB55gftua2ZRQyBE1z2U7bKwNTUQjNkGUTaX6e3OGPESh8b3V1-Lq55cWBCWX6tut2wERh4ZGsq/s752/LC+Lesson+12-102.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="492" data-original-width="752" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji_MZ0UaD1kH11jky5rcET2-l6fqAr3faY0ypVto9-v2NWdl4XAJn2Urfw1uB55gftua2ZRQyBE1z2U7bKwNTUQjNkGUTaX6e3OGPESh8b3V1-Lq55cWBCWX6tut2wERh4ZGsq/s400/LC+Lesson+12-102.png" width="400" /></a></div>
Return your attention to the "SingleInvoiceReport" procedure in the main window, and then click on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDd6FDelArO31pdAxugdsntVFvoc6Zd0TbGq6VhDssqxu7XU9lVYEDynCbO9i83wXTb0L-UwTdPISnRxOO9SjJYoiR6NW9NZz0O2Q7oSS-bZCTuFhxhygFCzuskZ-5eZ3ic1z9/s852/LC+Lesson+12-103.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="852" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDd6FDelArO31pdAxugdsntVFvoc6Zd0TbGq6VhDssqxu7XU9lVYEDynCbO9i83wXTb0L-UwTdPISnRxOO9SjJYoiR6NW9NZz0O2Q7oSS-bZCTuFhxhygFCzuskZ-5eZ3ic1z9/s400/LC+Lesson+12-103.png" width="400" /></a></div>
From the "properties" tab click on the "Actions" button. Click on the "Report Properties" button and change to the "Range Limits" tab. Use the ellipsis button to select "ORD:OrderNumber" as the Range Limit Field, and leave the Range Limit Type as "Current Value". This indicates that whatever value is in the column at the time the report begins is the value on which to limit the report. Since the user will run this report from the BrowseOrders procedure, the correct value will be in the ORD:OrderNumber column when the report begins. Click "OK", and "OK" again.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgND5qaI58Vo48MfmwT75Z0VKFvCPFr3gZpRoK-jfbAe9-diQP0oZqe4T79vB85CN__TNXc44_Gfp9fDCfGZubWSGNWtaYAFTe_K05nWNDsMTwWao37xgvCK_mXC0WbPWIobdM0/s757/LC+Lesson+12-104.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="492" data-original-width="757" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgND5qaI58Vo48MfmwT75Z0VKFvCPFr3gZpRoK-jfbAe9-diQP0oZqe4T79vB85CN__TNXc44_Gfp9fDCfGZubWSGNWtaYAFTe_K05nWNDsMTwWao37xgvCK_mXC0WbPWIobdM0/s400/LC+Lesson+12-104.png" width="400" /></a></div>
Press the "Accept changes" button to save your work. Click on the "Report" button because we need to make a few changes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60qAsX0xL3e7w0mfxj7mhmtV01n4eNRhYYnxMKaGghgSbE5SzNzQGlEDM84QZFC50gzCaG3xaIAp-_0OVOod5GilLMku4o7PAHFTlJBU6G98tCo2nQSSKTAmFErSXV_nQpBjC/s755/LC+Lesson+12-105.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="492" data-original-width="755" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh60qAsX0xL3e7w0mfxj7mhmtV01n4eNRhYYnxMKaGghgSbE5SzNzQGlEDM84QZFC50gzCaG3xaIAp-_0OVOod5GilLMku4o7PAHFTlJBU6G98tCo2nQSSKTAmFErSXV_nQpBjC/s400/LC+Lesson+12-105.png" width="400" /></a></div>
Select the "Break(CUS:CustNumber)" band and use the delete key to remove it. This removes not only the Group Break, but also the Group Footer that was associated with it. Click on the green "Save and Close" button to return to the Procedure Properties dialog. Click on the green "Save and Exit" button in the Procedure Properties dialog to close it. Click on the "Accept Changes" button to save your work.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilIIH05rxhTWid-xQ25_iR2KkMSW5P9CrBIrMGn3atNhaBJ95rNZKDxiecuQxDeVAH8lQ6xbGX_TQUdJacebLTEk4aceWDb47KFlSd0p8XLDmN64LYV_mxzNY5qZl3lYbL4Uw_/s747/LC+Lesson+12-106.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="481" data-original-width="747" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilIIH05rxhTWid-xQ25_iR2KkMSW5P9CrBIrMGn3atNhaBJ95rNZKDxiecuQxDeVAH8lQ6xbGX_TQUdJacebLTEk4aceWDb47KFlSd0p8XLDmN64LYV_mxzNY5qZl3lYbL4Uw_/s400/LC+Lesson+12-106.png" width="400" /></a></div>
Now that we have a report, we need to connect it to the rest of the application, so it can be used. Click on the "BrowseOrders" procedure, and then on the "Window" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyIX1SGORZgoLb3yJ-PIWS9O6z-YMUqn1wJRvIjcykNJsSNcwc9xOPZq5SM7WjnEq4kuoCx1dfd08w9hd4vhHV8ZCDmuDa005pJbq8cU57W4umOdHqyoGg5usF3isNYi-Jves_/s980/LC+Lesson+12-107.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="495" data-original-width="980" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyIX1SGORZgoLb3yJ-PIWS9O6z-YMUqn1wJRvIjcykNJsSNcwc9xOPZq5SM7WjnEq4kuoCx1dfd08w9hd4vhHV8ZCDmuDa005pJbq8cU57W4umOdHqyoGg5usF3isNYi-Jves_/s400/LC+Lesson+12-107.png" width="400" /></a></div>
From the "Control Templates" Pad, find the "BrowsePrintButton" collection and drag the "Browse on Order" control to the right of the "Delete" button as shown. Right-click on the new button and select "Properties" from the pop-up menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYyov9DajbWCZ37qb6r7CyQMjs0MQ0mjXGfk3hKqYN_YFItB3qUiU7EGO0B3Nc37QGUn9CP1NmE0IKRQuDWw76mEqlk-5VRvByfu5WZChjVCDuOwlL-MBJuYpJGmq9dLxVH8Y8/s956/LC+Lesson+12-108.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="607" data-original-width="956" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYyov9DajbWCZ37qb6r7CyQMjs0MQ0mjXGfk3hKqYN_YFItB3qUiU7EGO0B3Nc37QGUn9CP1NmE0IKRQuDWw76mEqlk-5VRvByfu5WZChjVCDuOwlL-MBJuYpJGmq9dLxVH8Y8/s400/LC+Lesson+12-108.png" width="400" /></a></div>
Change the Text property to "&Print Invoice". Change the "Use" property to "?PrintInvoice". Click on the "Actions ..." link as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhLXCkNexxsEztLMHSuK7HlkTS1e2FiD99Kv5H91mvxyNf_l6Trv5pO161aeCF3H7vaUCrG0mdSaF31g_XpC3tES0UrvkzvP1jOk8vTB6Yx5jrUsAQlwdDpl2pjnkCPxCnKcq/s832/LC+Lesson+12-109.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="489" data-original-width="832" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhLXCkNexxsEztLMHSuK7HlkTS1e2FiD99Kv5H91mvxyNf_l6Trv5pO161aeCF3H7vaUCrG0mdSaF31g_XpC3tES0UrvkzvP1jOk8vTB6Yx5jrUsAQlwdDpl2pjnkCPxCnKcq/s400/LC+Lesson+12-109.png" width="400" /></a></div>
Change the "When Pressed" property to "Call a Procedure" and then use the drop-down list to select "SingleInvoiceReport". Click "OK".<br />
<img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This Control Template is specifically designed to run a range-limited report based on the currently highlighted row in the list box we selected (Browse on Orders). The Order table row buffer will contain the correct value to allow the Current Value Range Limit on the "SingleInvoiceReport" to work. It also automatically adds this button's action to the popup menu for the browse.<br />
<img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Click on the green "Save and Close" button, and then on the "Accept Changes" button to save your work.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKVUxxXCoPGwln1YrOdyRdx5-tMrn4LSSALPRIQXecTtRp07jKgEtdjdiKap-tfK2aNN5ZlULKXe1Npy540hlKrpElv7adxp29KILF3ecNolDZ1vvaMCdlIr6QF19BTHnN4jux/s631/LC+Lesson+12-110.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="586" data-original-width="631" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKVUxxXCoPGwln1YrOdyRdx5-tMrn4LSSALPRIQXecTtRp07jKgEtdjdiKap-tfK2aNN5ZlULKXe1Npy540hlKrpElv7adxp29KILF3ecNolDZ1vvaMCdlIr6QF19BTHnN4jux/s400/LC+Lesson+12-110.png" width="400" /></a></div>
Notice how the "SingleInvoiceReport" procedure is now connected to the "BrowseOrders" procedure. Try running the application by clicking on the "Start without Debugger (Builds Solution)" button, or press Ctrl-F5. Then <b>make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here's a quick recap of what you just accomplished:<ul>
<li>You added several menu items to your main menu.</li>
<li>You created a simple Customer List report.</li>
<li>You created a relational report to print all Invoices.</li>
<li>You range-limited a report to print Invoices for a single customer.</li>
<li>You range-limited a report to print a single Invoice from the current row highlighted in a Browse list.</li></ul>
Now we'll look at where to go next.<br />
<br />
<h2>What's Next?</h2>
Here is the completed application, created from scratch and without the help of the wizards:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2WWNfLdD2jsKNtCWHgF5PnOoO-yEbfUSsqdYvg6h0TkS63e2eQ7CxQqIsS_uxr3hpsI_ZfHZhacm5beAuDdoF3nqyd6cvfGzD9RwQAAr-rG5XEO1WUc0Y9rxfLKqTRMq97RDL/s576/LC+Lesson+12-111.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="505" data-original-width="576" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2WWNfLdD2jsKNtCWHgF5PnOoO-yEbfUSsqdYvg6h0TkS63e2eQ7CxQqIsS_uxr3hpsI_ZfHZhacm5beAuDdoF3nqyd6cvfGzD9RwQAAr-rG5XEO1WUc0Y9rxfLKqTRMq97RDL/s400/LC+Lesson+12-111.png" width="400" /></a></div>
While this lesson application is by no means a "shrink-wrap" program, it has demonstrated the normal process of using the Application Generator and all its associated tools to create an application that actually performs some reasonably sophisticated tasks. Along the way, you have used most of <i>Clarion</i>’s high-level tool set, and seen just how much work can be done for you without writing source code. You have also seen how just a little embedded source can add extra functionality to the template-generated code, and how you can easily override the default ABC Library classes.<br />
<br />
<h2>A Short Resource Tour</h2>
You have many resources at your disposal to help you with your <i>Clarion</i> programming. Here is a short tour of two of the more important ones that you have right at your fingertips:<ul>
<li>Choose "<b>Context Help</b>" from the "help" menu.<br />
This is the Contents page for <i>Clarion</i>’s extensive on-line Help system.</li>
<li>Press the "<b>Contents</b>" tab in the left pane. Examine the FAQ sections.<br />
This opens <i>Clarion</i>’s on-line Help file and takes you to a section of commonly asked questions and their answers. This list of topics is the first place you should look whenever you ask yourself any question about <i>Clarion</i> programming that starts with "How do I ... ?" These topics answer many of the most common questions that newcomers to <i>Clarion</i> have, so quite often, you’ll find the answer is here.</li>
<li>Examine the "<b>Guide to Examples</b>" section.<br />
This topic provides jumps to the discussions of all the example programs that come with <i>Clarion</i>. Here you’ll find the various tips, tricks, and techniques that the examples demonstrate, so you can adapt them for use in your own programs.</li>
<li>Examine the "<b>What's New?</b>" section.<br />
This topic always gives you the latest, up-to-date information about the most current release of <i>Clarion</i> you have installed. You should always go through this section any time you get a major upgrade or interim release. There are generally a few last-minute details which you will find are only documented in this section. That makes it well worth the reading.</li></ul><br /><br>
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br>
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ Learning Clarion (Part 7) ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Learning Clarion (Part 6)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">Learning Clarion (Part 5)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/12/learning-clarion-part-4.html">Learning Clarion (Part 4)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html">Learning Clarion (Part 3)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-22846288719795766822021-07-22T12:57:00.011+02:002021-08-09T18:41:38.001+02:00MTN is *insane*, everywhere you go!<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFkeuEAk2JxUS06OL7LLvjWa1If5kYqqun6mHTIEJiNzCNs7zhXw_8dvwbb6I2AtflqVFkXCUeGSnx3ff9ShfNXGQ4lUVr4XopAeu2NLSGEBPcbmzP2-iVmbLZhZ5x_1z8N6Cn/s1600/MTN.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 388px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFkeuEAk2JxUS06OL7LLvjWa1If5kYqqun6mHTIEJiNzCNs7zhXw_8dvwbb6I2AtflqVFkXCUeGSnx3ff9ShfNXGQ4lUVr4XopAeu2NLSGEBPcbmzP2-iVmbLZhZ5x_1z8N6Cn/s400/MTN.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5620269890353046610" /></a><img src="http://www.mustang.co.za/img/saflag.png" border="0" hspace="4" vspace="4" width="39" height="27" align="left" />“The definition of insanity is<b> doing the same thing over and over again</b> and expecting different results.” This is falsely attributed to Albert Einsten and/or Benjamin Franklin, but it is nonetheless a pretty accurate description of the human condition. It certainly describes my recent experience with MTN and their call centres.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>One of the things you have to understand about South African culture is that most people have endured a really poor education system, where rote learning (memorization) is the norm, and people are not given the tools to understand the problem they are dealing with, but are just given a few standard scripts to follow. If your problem falls outside of those scripts, the wheels fall off. This is particularly true with call centres and "customer service" centres. The people employed in these places are trained to deal with 90% of the standard problems they encounter. If you have a problem that doesn't fall into those categories, then the results can be somewhat bizarre.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Recently I have been badgered by an MTN call centre whose sole job is to "upgrade" clients from one contract to another. What they can't cope with, is a customer who has more than one cellphone contract. At the start of the year I had three: my own, my domestic worker, and my mom-in-law. The latter was a birthday present a few years ago. So in March/April they started sending me text messages to say that "my" contract was up for renewal. Then they called me and we talked about "my" contract and it was only at the point near the end of the call where they were confirming all the details that they mentioned the phone number in question. Seriously? I told them I would chat to my mom-in-law and let them know.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Last month they started bugging me about my own phone contract. I would get a call from a call centre and if I answered it I would be put on hold. After about the fifth time I actually got to speak to an agent who explained to me that my existing contract (which ends in January next year) had been "phased out" (which is probably illegal) and for an extra R9 per month they could offer me a better contract for the balance of the contract period. Since it supposedly gives me more talk time I decided to give it a go.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>During the legalese that followed I was told that all existing services and subscriptions would be cancelled and replaced with the new contract. What they didn't tell me was that migrating to the "Mega Talk XS" contract would also break the Caller Line Identification (CLID) service on my phone. So from 7 July all incoming calls show up as "Unknown", unless they go to voicemail, in which case I get to be told what the number is. Naturally I called 135, their useless "Customer Service" number. So far I cave called at the following times:<ul>
<li>Thursday 8 July 08:34. 9 minutes. They said it would be fixed in 24 hours.</li>
<li>Friday 9 July 15:10. 5 minutes.</li>
<li> 9 July 15:36. 7 minutes.</li>
<li> 9 July 15:46. 2 minutes.</li>
<li> 9 July 15:48. 8 minutes.</li>
<li> 9 July 15:57. 5 minutes.</li>
<li> 9 July 16:30. 5 minutes.</li>
<li> 9 July 16:36. 9 minutes. Retentions department.</li>
<li>Saturday 10 July 11:54. 16 minutes.</li>
<li>Monday 12 July 10:51. 59 minutes. REQ000002520843</li>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtgNTQwBDn9owhmRgOP63LYbpNBHDucA64ErtMoZTvOOPW2JtRK0SNuVNbSy5CImjh6HoSWGg_4tivnn_VHzcmIAxYK61C7Pt744xKApJZGAJquSEIm4xk9GVXoLsPpKi-6y2b/s1920/2021-07-12+11.29.24.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="320" data-original-height="1920" data-original-width="1080" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtgNTQwBDn9owhmRgOP63LYbpNBHDucA64ErtMoZTvOOPW2JtRK0SNuVNbSy5CImjh6HoSWGg_4tivnn_VHzcmIAxYK61C7Pt744xKApJZGAJquSEIm4xk9GVXoLsPpKi-6y2b/s320/2021-07-12+11.29.24.png"/></a></div>
<li>Saturday 17 July 11:51. 16 minutes. Retentions department. "Can't cancel a contract on the weekend".</li>
<li>Wednesday 21 July 13:29. 4 minutes. REQ000002533152</li>
<li>Thursday 21 July 10:25. 9 minutes. "I'm getting an error message".</li>
<li>Friday 22 July 09:57. 1 minute. "Our computers are offline. Please call back later".</li>
<li>22 July 19:15. 15 minutes. "Please email a copy of the error message to us". <b>They don't call the customer</b> to request this information. After all, they are only <b>a phone company</b>. No, they wait until you call back to give you the good news that they don't have a clue what they are doing and don't understand the problem.</li>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlK1dyB5jQN-M4NEukpnN3z7GFNzXi5H9bc8q2rlRO-O_wxMdwIEPHY7UeYM9oQcEHJHnXwEHSP5cEJJ8RbrQmMjyK4Cpx_lgIelx8Me9On_2Mi1wbYur8Kr_7mqq6VTa8WyTN/s1920/2021-07-23+19.27.28.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" height="320" data-original-height="1920" data-original-width="1080" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlK1dyB5jQN-M4NEukpnN3z7GFNzXi5H9bc8q2rlRO-O_wxMdwIEPHY7UeYM9oQcEHJHnXwEHSP5cEJJ8RbrQmMjyK4Cpx_lgIelx8Me9On_2Mi1wbYur8Kr_7mqq6VTa8WyTN/s320/2021-07-23+19.27.28.png"/></a></div>
<li>Tuesday 27 July 15:56. 5 minutes. While on hold to find out the status, I received an incoming call from MTN showing that CLID is now working.</li>
</ul>
I have tried almost every option on the 135 number, from "Customer Service" to Accounts, to "Technical Support" to "Retentions". Basically the script is the same: we will reactivate the service and it will take 24 hours to show up on the system. Even after it was "referred to the Back Office" the reply on REQ000002520843 was to activate the service. On a few occasions on Friday 9 July they <b>reactivated CLID on the wrong number</b>: my domestic worker's number, which was working just fine.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Obviously I can't read what was written in the first REQ query, but it either didn't say that this tactic had been tried multipe times by multiple departments, or the moron who replied didn't comprehend that this had been done before and wasn't working. Or he was tired and just hit F7 to send the closest canned reply he could think of. Needless to say the instructions didn't work, which is why we have the next REQ number, which is still "open" while everyone leves it for someone else to solve.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>One of the "helpful" call centre ladies suggested I visit the nearest MTN store. During a pandemic. Wonderful. Like they are going to magically be able to press the same computer keys and get a different result. The lunatics are running the asylum. I think that's what "Bozza" means.<br>
<b>Update Tues 27 July</b>: I get a phone call that shows the CLID if the incoming call. It's from the MTN Twitter team. 19 days after the problem was first reported. I don't know whether to be grateful or angry. I guess I'm glad I'm not insane.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0><br>
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-71008377727131953732021-06-11T18:26:00.016+02:002021-08-06T17:35:43.543+02:00Discovery Medical "Scheme" is not a Medical "Aid"<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimHikFsy4jLFnLaESv9zVjcAt_Yfq8hTUqfnsuAKQPggrwVs72GjvinMa-dJjyD0uDnevt53kPsiy6qjEao6v60p5MHpaGzFZU0wIIC5PvGG1OM1X3B7DltCiz6XEsQNlhgIp5/s299/paid.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="217" data-original-width="299" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimHikFsy4jLFnLaESv9zVjcAt_Yfq8hTUqfnsuAKQPggrwVs72GjvinMa-dJjyD0uDnevt53kPsiy6qjEao6v60p5MHpaGzFZU0wIIC5PvGG1OM1X3B7DltCiz6XEsQNlhgIp5/s400/paid.jpg" width="400" /></a></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />Whenever I visit my Cardiologist, I remember that he doesn't like medical "aids" because they don't actually help their customers, they are there to collect contributions and keep it for themselves. That's why it is called a Medical <i>Scheme</i>, not a Medical Aid. I always pay him on the spot. Then he stamps the invoice with a "paid" stamp. That's when the fun starts.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />To submit the claim and for the MEMBER to be refunded, it has to have a "paid" stamp. You can't write "paid" and sign it. It has to be a stamp. Never mind if the doctor sent you the invoice via email because of the pandemic. <i>Discovery</i> simply <b>won't believe you</b> if you <i>write</i> "paid", it has to be a stamp. And the member has to <b>sign the invoice</b>. No signature, no pay. No stamp, and the doctor gets paid instead of the member. Go figure. Why would a member claim on behalf of the doctor? Oh, because honest doctors hate <i>Discovery</i>. You only find out AFTER the doctor has been paid, and by then it's too late. <i>Screw the customer</i>, when he calls to find out what is going on, just stonewall him and don't tell him why. Tell him to tell the doctor to contact <i>Discovery</i>. After much coaxing, they finally admit that the doctor can waste his time with a call centre, or email <a href="mailto:healthpartnerinfo@discovery.co.za">healthpartnerinfo@discovery.co.za</a>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />When you send a claim to <a href="mailto:claims@discovery.co.za">claims@discovery.co.za</a> you are sending a document to a <b>moron</b>. You get an automated message giving you a reference number. That's it. If you follow up with a query, <i>it is ignored</i>. After all, <b>the customer is not to be trusted</b>. Even if he is simply requesting a refund from his own Medical Savings Account, which is, after all, <i>his own money</i>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><i>Discovery</i> used to be a world-class medical aid, recommended by most medical professionals because they paid promptly, and they didn't get in the way between doctor and patient. They had innovative ideas like subsidising gym membership and rewarding people for looking after their health. Now they are just a medical SCHEME that is only interested in themselves. They deliberately make it difficult for the customer to claim: that's company policy. They try at all costs to avoid responsibility for anything going wrong, and prefer to <i>deflect and deny</i>, blaming the customer if at all possible, and if not, then making unreasonable demands on the doctor.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />They are arrogant and inflexible, and no longer think they need to listen to their customers. It will be their downfall. They are worse than the government, and one day the government will take all their money and call it the NIH.<br />
<br />
<b>Update</b>: I got a call from Nicole Deveroux, and asked her to follow up with an email. She left out most of what I asked, but sent me the email from noreply@discovery.co.za. Exactly what I expected from <i>Discovery</i>.<br />
<b>Update Tues 15 June</b>: I sent through a R1600 claim for a visit to the Cardiologist. They paid R132.20 from the medical scheme, and R668.40 from my own money (MSA). Not bad since I pay them a piffling R2,241 per month. That means that R799.40 wasn't paid at all. I must just suck it up, even through R581.60 could have been paid to me from my own MSA. They just decided not to, because <i>Discovery</i> knows best how to spend <b>my</b> money. Just like the government.<br />
<b>Update Thurs 22 July</b>: "Chronic" medication costs R527.31 per month. Discovery pays R110 out of their Chronic Benefit; I have to pay R417.31. Now you know why they have a glittering new steel and glass building in the expensive part of Sandton.<br />
<br />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-30552398450703550482021-04-11T20:54:00.017+02:002021-07-28T20:27:57.020+02:00Living Next Door to Carvers (Part 1)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiai4a91J9KKqe1k8W2LzSgcO1ioIOaQDoRcFnV5Mo9NmlrqKQ-GMoYWnn325IjIAg013OP1Z_tKpmArikbVsag6R69DegFqfHOva_ZDouA5e5oXES_WpTc_QzJJV16p7sJaKFG/s808/Carvers+Google+Earth.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="614" data-original-width="808" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiai4a91J9KKqe1k8W2LzSgcO1ioIOaQDoRcFnV5Mo9NmlrqKQ-GMoYWnn325IjIAg013OP1Z_tKpmArikbVsag6R69DegFqfHOva_ZDouA5e5oXES_WpTc_QzJJV16p7sJaKFG/s400/Carvers+Google+Earth.PNG" width="400" /></a></div><img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />We moved into Aldara Park on Saturday 31st May 2003, and immediately <i><a href="https://carvers.co.za/" rel="nofollow" target="_blank">Carvers Restaurant</a></i> became part of our lives: on the day we moved in, my father-in-law celebrated his 60th birthday at the restaurant. In those days, it was a classy restaurant with a Belgian chef and an all-you-want-to-eat buffet carvery. Even the pub had some imported beers and Belgian items on the menu. I celebrated my 50th birthday there in 2011. My 60th is coming up, and I can't fathom why the new owners, who have obviously invested a lot of money in the place, think they can behave in the arrogant, irresponsible and inconsiderate way that they have. It's not a good way to gain or keep patrons. Surely, a restaurant owner would know this? Evidently not.<br /><br />
<iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/qi2bYaRiHNw" title="Carver's Restaurant" width="560"></iframe><br />
<br /><!--https://www.facebook.com/officialcarversrestaurant/videos/3918117458206549/-->
<br />
<h2>Aleit Street Park</h2>
Our flat looks out over the Aleit Street park (shown by the white lines in the Google Earth image above) onto the restaurant building. Sadly, the park has been allowed to run down by the incompetence and mismanagement of <a href="https://www.jhbcityparksandzoo.com/" target="_blank">Joburg City Parks</a> and the <a href="https://www.joburg.org.za/departments_/Pages/City%20directorates%20including%20departmental%20sub-directorates/Metropolitan-Police-Department.aspx" target="_blank">Johannesburg Metropolitan Police Department</a> (JMPD) who are supposed to enforce the <a href="https://www.joburg.org.za/documents_/Documents/By-Laws/prom%20public%20open%20spaces%20by-laws.pdf" target="_blank">Public Open Spaces Bylaws</a>. <i>City Parks</i> is supposed to mow the lawn in the park (a basic minimum) and empty the rubbish bins regularly. They are supposed to remove dead trees and maintain the facilities in the park. I guess they couldn't be bothered. The gardener for our block of flats has mowed the lawn on the side of the park closest to the flats, between the fence and the stream. As far as I know, he has done this for as long as the flats have been there, and certainly for the last 18 years.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFDx8j0NCHfxQCw9kaG86MDUhiiDeG5sc1vHbXDXAxPmz7am3cYMweo-jQp11TQ0FUibF4RpnfLFcW-iGMD6PM8yyJIYBZaxuySAkBOxH6QcT-IBBpaGIOy479fuT-QTyZsHMf/s1017/27+Jan+2015+c.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFDx8j0NCHfxQCw9kaG86MDUhiiDeG5sc1vHbXDXAxPmz7am3cYMweo-jQp11TQ0FUibF4RpnfLFcW-iGMD6PM8yyJIYBZaxuySAkBOxH6QcT-IBBpaGIOy479fuT-QTyZsHMf/s320/27+Jan+2015+c.jpg" width="320" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRbY3exVRYy6zUkzuJ1z8vswkL4WDjkXf30b0bL46gHkqFPDy15kCUGoIOKnccKLw185oPx6LqXGGee3VKKCvTyE4JeS3B2FlglpEClukND8S-ZQsuqD0FVy4-AKyOh0xTKal/s1090/27+Jan+2015.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="818" data-original-width="1090" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaRbY3exVRYy6zUkzuJ1z8vswkL4WDjkXf30b0bL46gHkqFPDy15kCUGoIOKnccKLw185oPx6LqXGGee3VKKCvTyE4JeS3B2FlglpEClukND8S-ZQsuqD0FVy4-AKyOh0xTKal/s320/27+Jan+2015.jpg" width="320" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz9113eWiZNIrQInLzCjA-X5dtnYEB0OWPkaKl_Ij9-mTLLC_DwqeFK5ZkeBwOsOeNnmplneYogiRZ0oZ3twP_7nhEaTMQOFTT1yojUfwSwlqzI0Vx1mR7wYwrTFsFzkFEcNfj/s1017/30+Dec+2014.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz9113eWiZNIrQInLzCjA-X5dtnYEB0OWPkaKl_Ij9-mTLLC_DwqeFK5ZkeBwOsOeNnmplneYogiRZ0oZ3twP_7nhEaTMQOFTT1yojUfwSwlqzI0Vx1mR7wYwrTFsFzkFEcNfj/s320/30+Dec+2014.jpg" width="320" /></a></div>
The JMPD has a special "Bylaw Management Unit" (BMU) to enforce the municipal bylaws. They did no such thing, despite the public sign saying "Transgressors will be prosecuted". The vagrants figured that out long before the ratepayers did. The BMU "managed" the bylaws by <i>turning a blind eye</i> and using every trick in the book to not respond to complaints of bylaw violations in the park:<ul>
<li>Not being able to "find the park" at the address given;</li>
<li>Not being able or willing to provide a reference number when you phoned them;</li>
<li>Arriving hours or even days later;</li>
<li>Simply not showing up;</li>
<li>Not taking the names or photographs of the vagrants who violate the bylaws.</li></ul>
Of course, <a href="https://donnedwards.openaccess.co.za/2013/08/transgressors-will-be-prosecuted.html" target="_blank">prosecuting anyone</a> for violating the bylaws is simply out of the question. When I challenged the head of the BMU on this issue, he stated quite categorically that it was his prerogative as to how or whether the bylaws would be enforced, if at all. ANC Cadre deployment at its finest.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />A few years ago things started to change. In 2016 the DA took over management of the Joburg City Council for a while. And I managed to find the contact numbers to the new Acting Head of the JMPD BMU. So now I could send <i>WhatsApp </i>messages and photos. I was also able to send messages directly to Sergeant Borias of the JMPD, starting in June 2018. That helped a great deal.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdzYfW0JI_bBxNChbxAnPO4PScL6dvmfGNu-MjzDPfYFVJjzm6hONoMzUfOyF3KfSPypnaGJDy9lU4G1Plo31jL3CidGyFmmb3JoxSRxCtvmGS9dS41uCfaVu6PBlfBmCrPb2/s1090/2019-01-15.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="613" data-original-width="1090" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqdzYfW0JI_bBxNChbxAnPO4PScL6dvmfGNu-MjzDPfYFVJjzm6hONoMzUfOyF3KfSPypnaGJDy9lU4G1Plo31jL3CidGyFmmb3JoxSRxCtvmGS9dS41uCfaVu6PBlfBmCrPb2/s400/2019-01-15.jpg" width="400" /></a></div>
His team eventually persuaded the rubbish pickers and vagrants that it wasn't OK to live in the park or bring their rubbish there. Mostly.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQrJpxDgB5dccc8By_BcSZmLg2ZknGqSG0R46hrFEvDuw6w_dhTcfgu7psrTOHbh8Z6gYUgfqW0S8BVz2TGb5JJzbVCxim5-w2TkSUqwhOdAbc29sCRoJ2M7Od_C5hn2w3cK2b/s1017/27+Jan+2015+b.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQrJpxDgB5dccc8By_BcSZmLg2ZknGqSG0R46hrFEvDuw6w_dhTcfgu7psrTOHbh8Z6gYUgfqW0S8BVz2TGb5JJzbVCxim5-w2TkSUqwhOdAbc29sCRoJ2M7Od_C5hn2w3cK2b/s320/27+Jan+2015+b.jpg" width="320" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOEdMmx3UH8iJslwn8PRsDV7TMJz8cUxv1rMFbDwVKrILDOAqG0BImHifgkWtfrSZbPr68Jvn9HeR3OJTNWEYkfZaBi8BBpl83HO69cv851HoWXPPHSTlKSG5R493uBltEHv2S/s1017/28+Jan+2015.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOEdMmx3UH8iJslwn8PRsDV7TMJz8cUxv1rMFbDwVKrILDOAqG0BImHifgkWtfrSZbPr68Jvn9HeR3OJTNWEYkfZaBi8BBpl83HO69cv851HoWXPPHSTlKSG5R493uBltEHv2S/s320/28+Jan+2015.jpg" width="320" /></a></div>
The previous owners of <i>Carvers</i> (or maybe the ones before that) used to mow the park lawn if it got really bad. They also used to send someone to empty the rubbish bins in the park from time to time because the <i>City of Joburg</i> certainly didn't.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGvat15rh0nA3-H4WGC3EWjE1nftO-z3IU0dS3qsSy82bCSy0q5IFPoYFLtpwI47FFAQoorMneG6PapiCobaDU8PccztfG3ma47y_8roI6OeM_yiiLxqX_-tNBZnZ20f7oiypv/s1357/Park+Cleanup.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1357" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGvat15rh0nA3-H4WGC3EWjE1nftO-z3IU0dS3qsSy82bCSy0q5IFPoYFLtpwI47FFAQoorMneG6PapiCobaDU8PccztfG3ma47y_8roI6OeM_yiiLxqX_-tNBZnZ20f7oiypv/s400/Park+Cleanup.jpg" width="400" /></a></div>
When the suburb organised a park clean up, they were happy to supply some trolley bins and volunteers to help with the clean up. So generally, their attitude to the suburb was helpful and friendly. As a result, many people in the suburb came to the restaurant and pub.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />At some point we started noticing fewer cars in the parking lot, and the restaurant started closing at 7pm instead of 10pm because there just weren't enough patrons. We have our own theories as to why this happened, but we simply don't know for sure. Their best pub waiter, Patrick, left after many years of working there, and eventually <i>Carvers</i> was sold, either at the end of 2019 or early 2020. <a href="https://www.tripadvisor.co.za/Restaurant_Review-g319720-d3378892-Reviews-Carvers_Restaurant-Randburg_Greater_Johannesburg_Gauteng.html" target="_blank">TripAdvisor</a> had them rated as #148 out of #156 of restaurants in Randburg. It deserves to be better than that.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHO0y8PeT2ass5PvTTng_PAzQ_kONMOIzePptm34ciW8xBC1HrsTshk6hqsihEleUBpNIUFYuMFn0JTw6b4GxpSSQ1_akK84DHZy4AFQK8VKmitjbG_ijWdO1gpVxriRgK5axT/s817/TripAdvisor.JPG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="163" data-original-width="817" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHO0y8PeT2ass5PvTTng_PAzQ_kONMOIzePptm34ciW8xBC1HrsTshk6hqsihEleUBpNIUFYuMFn0JTw6b4GxpSSQ1_akK84DHZy4AFQK8VKmitjbG_ijWdO1gpVxriRgK5axT/s400/TripAdvisor.JPG" width="400" /></a></div>
<br />
<h2>Taking Back the Park</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZvtW0lStApfoJqoKnsS4T1HqMXjD_nFFQO18WZS4uhaCotLioEhtK-pGrQ03E6CV5RGG59I4GoEzsDn9eZyEehXuW7vNpQaKa2N6o_oCmXZD10PO_Lbf8A25XAJi2Odiden8/s1017/10+Feb+2020+b.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZvtW0lStApfoJqoKnsS4T1HqMXjD_nFFQO18WZS4uhaCotLioEhtK-pGrQ03E6CV5RGG59I4GoEzsDn9eZyEehXuW7vNpQaKa2N6o_oCmXZD10PO_Lbf8A25XAJi2Odiden8/s400/10+Feb+2020+b.jpg" width="400" /></a></div>
Some suburb residents decided to intervene in the park, and an APRA member sent Morgan to mow the lawn every few weeks. It made a huge difference because <i>City Parks</i> hadn't shown up to mow the lawn since the start of the lockdown in March 2020.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOP3UCKdsPayi8VMW39E2ALySyU_d3FoH6xRoLVZORNjtK9lp7GOzEL0JEnjpaU2PwNHPpPRrDcDw4kst4xTxGUX3E53-yRgljGFf7U_dsitccPKnfYZN0-DSPBw3XaHd7_C3Q/s763/10+Feb+2020.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOP3UCKdsPayi8VMW39E2ALySyU_d3FoH6xRoLVZORNjtK9lp7GOzEL0JEnjpaU2PwNHPpPRrDcDw4kst4xTxGUX3E53-yRgljGFf7U_dsitccPKnfYZN0-DSPBw3XaHd7_C3Q/s400/10+Feb+2020.jpg" /></a></div>
Morgan was the most energetic and tireless gardener I have ever known. He just seemed unstoppable.<br />
<br />
<h2>Some Renovations</h2>
There was cautious optimism in 2020 when we noticed renovations under way at <i>Carvers</i>. A new sign was put up outside, and other improvements were observed. The entire suburb was relieved to see our favourite local restaurant showing signs of life once more, even though there were piles of builders rubble left lying in the park's parking lot. Then the Coronavirus lockdown happened, and the rubbish stayed there. For nearly 4 months.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUelgpJgOmGxREmtMJm4YERtSNVkHEnDYMYIvmOJxe-bcZsrcaJp6Ngbqgyrzrka0dobzNze0s9dxXVFCxNleOXgi_0ufXl1wZdsvMAsUiblOfJRfczJ1zSYL5cBQlWy2owM0r/s1090/18+April+2020.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="613" data-original-width="1090" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUelgpJgOmGxREmtMJm4YERtSNVkHEnDYMYIvmOJxe-bcZsrcaJp6Ngbqgyrzrka0dobzNze0s9dxXVFCxNleOXgi_0ufXl1wZdsvMAsUiblOfJRfczJ1zSYL5cBQlWy2owM0r/s400/18+April+2020.jpg" width="400" /></a></div>
This was early in the lockdown. The rubbish pile became a favourite spot for the vagrants to congregate and sleep. I guess the new owners are unaware of the vagrant problem in our suburb.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jl2iF2WxX0Btx2bzJw-chQ5EX0UBqKZFUCvNnXRqWMo9jAjKvc8JXdylWn7V0l_225LGoGJFQQGDLOATfvZwLP3sJxOP2aURxt03ZRUqHS3SetWwpVicWVg_jIGBQp4oACfv/s789/24+May+2020.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="580" data-original-width="789" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jl2iF2WxX0Btx2bzJw-chQ5EX0UBqKZFUCvNnXRqWMo9jAjKvc8JXdylWn7V0l_225LGoGJFQQGDLOATfvZwLP3sJxOP2aURxt03ZRUqHS3SetWwpVicWVg_jIGBQp4oACfv/s400/24+May+2020.jpg" width="400" /></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicdbbhLrAAa_ZsQoFrnokeYo7mn-EOLqpwkcmFZDWVGZS6ktZMTk-VJXqM2_nI6q8Qj3gPHgDvpnSqijxx1aRlJJN_KmM4jjK_bIOqkia9inoI8UJPaIwP41M_Z6Z4M3LgiexZ/s1032/25+May+2020.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="1032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicdbbhLrAAa_ZsQoFrnokeYo7mn-EOLqpwkcmFZDWVGZS6ktZMTk-VJXqM2_nI6q8Qj3gPHgDvpnSqijxx1aRlJJN_KmM4jjK_bIOqkia9inoI8UJPaIwP41M_Z6Z4M3LgiexZ/s400/25+May+2020.jpg" width="400" /></a></div>
We tried to remove some litter, such as glass bottles, cardboard boxes, plastic, and empty cement bags, but the bigger stuff such as broken toilets, pieces of concrete, mattresses, and piles of broken bricks, we just couldn't manage.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVAO81rh6JEfRyI8hRV_Tlk0u_24CVDy9UsLDwiSIOdYs16o9yzf_UwxyONWLMX1ossB_0il-wMg0qVzq82LWw2nEgxAcAbZholCKNXxRu0pZe-EF05FW2Ery46dD-3hVJrpRH/s1017/15+June+2020.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="1017" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVAO81rh6JEfRyI8hRV_Tlk0u_24CVDy9UsLDwiSIOdYs16o9yzf_UwxyONWLMX1ossB_0il-wMg0qVzq82LWw2nEgxAcAbZholCKNXxRu0pZe-EF05FW2Ery46dD-3hVJrpRH/s400/15+June+2020.jpg" width="400" /></a></div>
Eventually, after over 3 months, a truck arrived to remove the bulk of the stuff, as the lockdown restrictions were eased. We were still too optimistic and naive to realise they really didn't care about the park or their neighbours in the suburb.<br />
<br />
<h2>Park Cleanup</h2>
A few days into the lockdown my wife decided to start cleaning up the park. We needed the exercise as all the gyms were closed, along with most shops, restaurants and pretty much everything else. So, every day we went to the park and spent half an hour to an hour emptying the rubbish bins, and picking up litter. Some of it had been there for years. The vagrants had cleverly stashed stuff in trees, under bushes, along the river bank, and so on. We removed about 8 trolley bins of bottles, cans, electronics, metal junk, ceramics, plastic, syringes, utensils, cooking pots, and so on.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhQv-MOyVEbTrdN5f92BdOceabtlZ8crY6CVGNGURgrADScOaE2qKLY9DGY0JNu8m-7RFvfg6H-OTS7BcocKqYiog8s-KFC6XWWvjKwfzLwEDRZNT8r_wNRYW2S3OLQoIEDupY/s763/2020-06-11.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhQv-MOyVEbTrdN5f92BdOceabtlZ8crY6CVGNGURgrADScOaE2qKLY9DGY0JNu8m-7RFvfg6H-OTS7BcocKqYiog8s-KFC6XWWvjKwfzLwEDRZNT8r_wNRYW2S3OLQoIEDupY/s400/2020-06-11.jpg" /></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-jy8_wA5Ff-I0BXvcsm8IgoEsCK5P67gxdEsuEmcRXWVDdSv7QWDaJxFngGQdFQXNBPuTunxLgno9YNRLV-alWqwKsoPOPUJFGL8ANa2gbiFnMV56JVO0rlUCDdF1oLRWzE8i/s763/2020-06-15.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-jy8_wA5Ff-I0BXvcsm8IgoEsCK5P67gxdEsuEmcRXWVDdSv7QWDaJxFngGQdFQXNBPuTunxLgno9YNRLV-alWqwKsoPOPUJFGL8ANa2gbiFnMV56JVO0rlUCDdF1oLRWzE8i/s400/2020-06-15.jpg" /></a></div>
Morgan helped us remove all the <i><a href="https://fossilagro.com/info/details/thorn-apple-stinkblaar" target="_blank">stinkblaar</a></i> bushes (an invasive species) along the banks of the stream. He also cut up and removed a tree branch that had fallen across the stream. That took several days of hard work. After 5 months, the park was looking a lot better, and people had started to visit it again.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />We put up signs at each rubbish bin that all rubbish placed in the bins would be removed. Sounds obvious, but the vagrants had been using the bins to stash stuff that they would come back and collect later. One enterprising vagrant also used the bins as drop-off and collection points for the drugs he was selling. We put a stop to this practice by keeping the bins clean.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Even now, over a year later, we go to the park almost every day to empty the bins and pick up the litter that people leave lying around on the pavement or in the park, including cigarette butts, matchboxes, sweet wrappers, <i>Stilpane</i>, beer bottles, etc. It's amazing how many litterbugs there are who visit our suburb and leave bottles, food wrappings and plastic on the pavement and grass.<br />
<br />
<h2>The Parking Lot</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tuqMfJH9-7W9BwOM-FEV29gmze7nfwt_jlNTxBhibepaUNF4pNe3VzAPbRksdZeU6mH_VpyD4MrpkrZfvepiL4GS3Zmp_6YpUMljIYcksVuTq-sw1ATXX0mwNwASDAj9CfNg/s820/2020-08-04.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="820" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0tuqMfJH9-7W9BwOM-FEV29gmze7nfwt_jlNTxBhibepaUNF4pNe3VzAPbRksdZeU6mH_VpyD4MrpkrZfvepiL4GS3Zmp_6YpUMljIYcksVuTq-sw1ATXX0mwNwASDAj9CfNg/s400/2020-08-04.jpg" /></a></div>
We started becoming annoyed with the builders and other workmen who worked on the <i>Carvers</i> renovations because of the amount of mess they made in the parking lot. Not just building rubble, but ordinary rubbish too. <i>Carvers</i> has its own internal parking lot. It has space for roughly 15 vehicles, and is a tarred surface. It is surrounded by a low wall and an a metal fence above the wall. If they wanted to conceal their builders' rubble from the eyes of the public, their own parking lot would be perfect.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />But outside their property, between their buildings and the park, is another much bigger parking lot, visible to everyone driving or walking past. It has a shady willow tree in the middle. <i>Papamani</i> security vehicles often park near or under the tree. That is where <i>Carvers</i> decided to dump all their builders' rubble, even after the restaurant reopened and their patrons parked in this parking area as "overflow" parking.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRLvaqvQOn84jncaGNqJjPIZZimkkC8F_tS8xCjOZJIbZB-Is5Briox9Of6brATkE_vp6D9ASxNJxEchVk13y6INywKVExRt6rcEoV57T4QS3lwFtYEBbNLNPWWxOloM2fegzZ/s763/2020-07-23.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRLvaqvQOn84jncaGNqJjPIZZimkkC8F_tS8xCjOZJIbZB-Is5Briox9Of6brATkE_vp6D9ASxNJxEchVk13y6INywKVExRt6rcEoV57T4QS3lwFtYEBbNLNPWWxOloM2fegzZ/s400/2020-07-23.jpg" /></a></div>
There is also a water leak, either under the parking lot, or from water flowing into the park from <i>Carvers</i>' drains or run-off. The northern end of the parking lot is basically a swamp. On the night of 22 July 2020 one of the <i>Papamani</i> security vehicles got stuck in the mud, and it took them several attempts to get it out. Much revving of the engine didn't help, and eventually it was towed out. I sent this picture to Arnold (one of the owners) so he could report it to <i>Joburg Water</i> and get it fixed.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht4Px7kYYE4wKVz4AQhyGxJmJfzIXabWBZtiUVOJFgHKfyZrgVow_20Ytq99kwEhYcyILPNf5kHDnO6F43HiQBbApuIbN3ncj-Sii4aDbsoetObdxbrFM-RHVpu-opL8IRYDb1/s820/2021-03-26b.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="820" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht4Px7kYYE4wKVz4AQhyGxJmJfzIXabWBZtiUVOJFgHKfyZrgVow_20Ytq99kwEhYcyILPNf5kHDnO6F43HiQBbApuIbN3ncj-Sii4aDbsoetObdxbrFM-RHVpu-opL8IRYDb1/s400/2021-03-26b.jpg" /></a></div>
On 26 March 2021 I took this photo of the track marks where another vehicle (presumably a patron) got stuck in the swamp. So either <i>Joburg Water</i> hasn't arrived yet, or they were never called.<br />
<br />
<h2>The Grand <del>Reopening</del> Rebuff</h2>
By October 2020 it was clear that the restaurant was nearly ready to open. I made enquiries from Arnold when their opening day was, so I could let the suburb know. He didn't reply. Weird for someone in the hospitality industry. A day or two later they had a big function with lots of people. It was either the <i>Grand Reopening</i> or a trial run, we will never know. No one from the suburb was invited. Despite the obvious snub, we decided to go the following evening to see what it was like.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBTdkhEcISv49Tqg_TCX_NUNgln7glRwChZTr6sD4xcXAObTTcHFAcW_mN2Lyz78G2526UFTavi5FSH5ogo_jADC3n0GBu70iQPOh7fagI0ikOWFGG4rYocynO83IVSW6kA3sq/s1032/2020-10-08.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="1032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBTdkhEcISv49Tqg_TCX_NUNgln7glRwChZTr6sD4xcXAObTTcHFAcW_mN2Lyz78G2526UFTavi5FSH5ogo_jADC3n0GBu70iQPOh7fagI0ikOWFGG4rYocynO83IVSW6kA3sq/s400/2020-10-08.jpg" width="400" /></a></div>
The waiters were friendly and professional, and they explained they were running on a minimal menu for now. The sushi bar and the carvery were still being set up, but the pizza oven was working. We sat outside in the garden and enjoyed a very good Quattro Stagioni pizza to share and a glass of wine each. The prices were reasonable and we enthusiastically shared our photos on the suburb's APRA Community WhatsApp Group.<br />
<br />
<h2>The Bright Lights</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7DntJGA1U4TCIAnOt9M-AZ7MT3Di4Tt6xdOgMFZFfa4qMUhSF4y2pNkOboeG8Lqo8jFaM4bZFFuhyphenhyphen2xf99gwojuLNNnxYkkB683fVZFH93bHZf3SwZHVdohN33MoFEBDQYYG7/s763/2020-10-21.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7DntJGA1U4TCIAnOt9M-AZ7MT3Di4Tt6xdOgMFZFfa4qMUhSF4y2pNkOboeG8Lqo8jFaM4bZFFuhyphenhyphen2xf99gwojuLNNnxYkkB683fVZFH93bHZf3SwZHVdohN33MoFEBDQYYG7/s400/2020-10-21.jpg" /></a></div>
You may notice all the bright lights around the trees in our photo of the garden area. There was also a spotlight shining out over the Darrenwood Dam, and another shining into the park. One of the neighbours complained they were too bright, and were scaring away the owls and other birdlife. The dam is a nature reserve and heritage site. The one shining in the park is great for security, but it is positioned so badly that it also shines into the windows of 15 out of 21 flats that are over 100m away, plus the gardens of several neighbours.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The Aldara Park Residents Association (APRA) made contact with Arnold, who promised that something would be done to fix the lights. As with all of Arnold's other promises to APRA, nothing has changed. So much for hospitality.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvBEX42yTKQCg4OqfBwKKGRbPAtfMH_C-TdBkn5rni_U-3Nu4dd6zl4vDx21sXsPUatChEnJ5yBh0aOJCvad52ebMp8mS0bXWk5MgpizEO88hslLCv2tWA81iloxWALBUW3Zbt/s763/2021-03-25.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvBEX42yTKQCg4OqfBwKKGRbPAtfMH_C-TdBkn5rni_U-3Nu4dd6zl4vDx21sXsPUatChEnJ5yBh0aOJCvad52ebMp8mS0bXWk5MgpizEO88hslLCv2tWA81iloxWALBUW3Zbt/s400/2021-03-25.jpg" /></a></div>
This is the view from my bedroom window. If it wasn't for special curtain lining, my bedroom would be lit up at night. Other flat residents have also complained.<br />
<br />
<h2>The Noisy Neighbours</h2>
I fully understand that restaurants have functions that involve live music, public address systems, and so on. In November and December they had a "band" playing in the pub every Friday for 4 weeks in a row (13 Nov to 4 Dec 2020). See the yellow circle on the very first picture: it's a 100m diameter according to Google Earth. At 100m away from the source of the noise, with all the doors and windows closed, I could hear every word that the band "sung". All their songs were cover songs, and they started in the late afternoon and carried on until after 10pm at night. They managed to play the songs so badly that they were barely recognisable.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />They also decided that it was okay to sing rude songs in the early evening when children were still around. They had a disgusting pub version of Smokey's "<a href="https://www.azlyrics.com/lyrics/smokie/livingnextdoortoalice.html" target="_blank">Living Next Door To Alice</a>" which included the line "Who the f*** is Alice?" and mentioned wanting to "get into her pants". I never liked the original song, because the guy in the song was a bit of a loser, but this new version was just pathetic. They included it in their repertoire each week.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />I decided to call the band T.K.O.: <b>T</b>ourette's (because of the bad language) <b>K</b>araoke (because of the bad singing) <b>O</b>verdose (because they didn't stop at a reasonable time). After the APRA committee met with <i>Carvers</i> management, they agreed to lower the volume and cut the bad language. But the terrible singing still remains, and the volume is only marginally softer, probably because the pub windows are closed because of the cooler weather. They need to get a band that can actually sing.<br />
<br />
<h2>The Helicopters</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH5bWKAju6WKQGTXg8wxzBXYoVZBZvAPLuPO7FUnlt3CtTGuTzOIu49fqiaEVhLZb_cQTTQDPsSg4jCECqfvFsquprWsol2tT1RgE7_0_JvEccAOvaBVPW6IGq7-DZ_eyxrwHi/s1152/Darrenwood+Dam+from+Carvers+Aug+2018.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="Darrenwood Dam viewed from Carvers Aug 2018" border="0" data-original-height="864" data-original-width="1152" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjH5bWKAju6WKQGTXg8wxzBXYoVZBZvAPLuPO7FUnlt3CtTGuTzOIu49fqiaEVhLZb_cQTTQDPsSg4jCECqfvFsquprWsol2tT1RgE7_0_JvEccAOvaBVPW6IGq7-DZ_eyxrwHi/s400/Darrenwood+Dam+from+Carvers+Aug+2018.jpg" width="400" /></a></div>
Just after we had recovered from the noisy pub music, a small group of patrons arrived <b>by helicopter</b> and landed in <i>Stonemill Office Park</i>. The small party then walked from the office park to <i>Carvers</i> through the gate in the fence. They did not have permission to land in the office park, but apparently got permission from the Civil Aviation Authority to fly there. I guess the CAA wasn't aware of how closely they landed to people sitting out in the open, or that they landed within 100 feet of a park or people in the open. CAA rules are they should be no closer than 2000 feet from any obstacle.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ZB1j79w4ZJ-L9W7-4EDYcc5WhfceEdDp5-GNQWFSXs9JSCu1uymZ9SuIOc3GPlRujqvsHkVHXa406KWvy_fGlmS4LjdlvNHV2hH9L-nLNj4KCWj8DCz_yF4MT9RH559tYIuX/s763/2020-12-12.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8ZB1j79w4ZJ-L9W7-4EDYcc5WhfceEdDp5-GNQWFSXs9JSCu1uymZ9SuIOc3GPlRujqvsHkVHXa406KWvy_fGlmS4LjdlvNHV2hH9L-nLNj4KCWj8DCz_yF4MT9RH559tYIuX/s400/2020-12-12.jpg" /></a></div>
This picture was taken from the park, looking through the park fence to the nature reserve and office park. I didn't get close enough to read the registration of the helicopter. Why the CAA would permit joy rides over a residential area is not clear to me or anyone else in the suburb.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWvBgos4YiA2Sdy_33mU79VsP1Pmg9wP6Y2wnZkZ2vkNgxUeN4N8nEHSoNZTsoiZPfjE_kromrmygLkuDJUpvNam1HRbrd3_vdWsCrWfyBcvVJpUp4-37pvZCz_1TQsXH2tWsQ/s763/2021-01-23a.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWvBgos4YiA2Sdy_33mU79VsP1Pmg9wP6Y2wnZkZ2vkNgxUeN4N8nEHSoNZTsoiZPfjE_kromrmygLkuDJUpvNam1HRbrd3_vdWsCrWfyBcvVJpUp4-37pvZCz_1TQsXH2tWsQ/s400/2021-01-23a.jpg" /></a></div><div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZu8Y6oU4u-1q-RmGbx1kxAgqOqVMG2j4jrAcJxsADJJtEeGKsSHWAddN-nBBUsU5HWbD_zUB8TvTeLq1tOc9i8BfczyQKjhnIKx552lqV7LnqQRetI3zE-L62dtvFqg6xrWoc/s763/2021-01-23b.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZu8Y6oU4u-1q-RmGbx1kxAgqOqVMG2j4jrAcJxsADJJtEeGKsSHWAddN-nBBUsU5HWbD_zUB8TvTeLq1tOc9i8BfczyQKjhnIKx552lqV7LnqQRetI3zE-L62dtvFqg6xrWoc/s400/2021-01-23b.jpg" /></a></div>
But never fear, they repeated the same stunt in January. ZS-HXV is a Bell Textron 206B helicopter, and is apparently owned by <a href="https://www.liquidwaterproofing.co.za/" rel="nofollow" target="_blank">Professional Liquid Waterproofing (Pty) Ltd</a>, of 57 Kalkheuwel St, Broederstroom, Brits, Gauteng. This is according to public records. I have been able to confirm with the manager of <i>Stonemill Office Park</i> that the landings were done without the knowledge or permission of the office park. They do not have permission to return. Hopefully, they will keep their dangerous and noisy aircraft away. We have enough problems with noisy helicopters flying overhead at 1000 feet tracking stolen vehicles.<br />
<br />
<h2>Rowdy Patrons</h2>
If noisy helicopters and loud music wasn't enough, some patrons decided to have a VERY LOUD fight at 10pm on Friday 26th February. Lots of yelling and drunken noise. There was also another disturbance the night before. This particular incident managed to upset several neighbours closest to the restaurant. It is notable that while the old restaurant had signs inside their parking lot asking patrons to be considerate of the neighbours, these were removed during the revamp, reflecting the new attitude of the owners to their neighbours. They are tone deaf, if not completely deaf.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />On the Saturday morning one of the neighbours and his wife went to speak to the manager at Carvers. The wife spoke first, and by some accounts the manager swore at her. This did not sit well with her husband, who drove all the way to the JMPD Head Office and spoke to both the director and superintendent. He was not the only one who had enough. Another neighbour has three children aged 15, 9 and 4. They don't go out on Friday and Saturday nights because of the rowdy behaviour from the pub.<br />
<br />
<h2>Whose Parking Lot Is It Anyway?</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOiea24DUf_1o-y0yfhdHSnfhtzV3ddbQULIk_B89-xe0u3V-UJ3u-3ZvJVgCgUH5tbSk6JQMBPwAfjX5Al5oVFAippKl_1I8Pib0GhdCel2blBkYdologXHdP1tfUAZhvxe38/s763/2021-01-12.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOiea24DUf_1o-y0yfhdHSnfhtzV3ddbQULIk_B89-xe0u3V-UJ3u-3ZvJVgCgUH5tbSk6JQMBPwAfjX5Al5oVFAippKl_1I8Pib0GhdCel2blBkYdologXHdP1tfUAZhvxe38/s400/2021-01-12.jpg" /></a></div>
Another "stunt" we noticed from <i>Carvers</i> was the way they treat the outside parking lot as their own back garden. It isn't. It's part of the park. So when I noticed their empty rubbish bins lying around in the park I sent a WhatsApp message to their public number 082 572 2611 with the photo asking them if they noticed anything wrong.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The answer was as illuminating as it was off-track. The manager thought I was referring to the spelling of Tulbach as in "Tulbach Pub".<blockquote>"That's our name. Not the town <a href="https://en.wikipedia.org/wiki/Tulbagh" target="_blank">Tulbagh</a>"</blockquote>
Seriously? I'm beginning to wonder whether he has ever actually noticed the park at all. When I pointed out the rubbish bins in the photo I got no further reply. It's weird: <i>City Parks</i> can't spell Aleit (The one sign says Alet and the other Alett) and now the pub can't spell Tulbagh. Not even on their <a href="https://carvers.co.za/the-tulbach-pub/" target="_blank">website</a>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic6JvnMLls1xL2Us-ZQZ5oOvmqI44ovGyJTGLwqCGpl-lQVbXcWVXlhlcmPHWpthUWdpDukl1jBHsSGKAw5w9560qCIsOL2XZU7brpFKzqwZBdXmr8_zB083wFMtqulJTdpLnR/s406/Tulbach.PNG" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="305" data-original-width="406" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic6JvnMLls1xL2Us-ZQZ5oOvmqI44ovGyJTGLwqCGpl-lQVbXcWVXlhlcmPHWpthUWdpDukl1jBHsSGKAw5w9560qCIsOL2XZU7brpFKzqwZBdXmr8_zB083wFMtqulJTdpLnR/s400/Tulbach.PNG" width="400" /></a></div>
For reasons known only to the <i>City Power</i> "loadshedding" timetable, <a href="https://census2011.adrianfrith.com/place/798016053" target="_blank">Aldara Park</a> is known as ANDARA park. The word "Aldara" is made from the combination of <b>Al</b>eit, <b>Da</b>nie and <b>Ra</b>chel, which are street names in the suburb, named after the people who created the suburb.
<br />
<br />
<h2>Part 2 to follow</h2>
I have left out the story of the jumping castle, the <i>WhatsApp</i> groups, and many other anecdotes. In a future episode I will tell of Werner's threats of a lawyer's letter (it must be still in the mail), some visits by JMPD and Linden SAPS, some special wine bottles, and of course more rubbish dumped in the parking lot. And they have a <a href="https://carvers.co.za/restaurant/" rel="nofollow" target="_blank">special menu in latin</a> with prices in US$.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYGFmYqqj-s1ynPh7T_se-YrLDjIEdw1GxuGjMqoxu6wtFjNm9HPmLM_kWh4rDHk-dtstbxJLkTz9hj7JYarTuPj5hQczz8i83M_z3Gu_IhIkMsx8ifke-RQYk74fdSlFfJGpE/s763/2020-11-06.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="572" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYGFmYqqj-s1ynPh7T_se-YrLDjIEdw1GxuGjMqoxu6wtFjNm9HPmLM_kWh4rDHk-dtstbxJLkTz9hj7JYarTuPj5hQczz8i83M_z3Gu_IhIkMsx8ifke-RQYk74fdSlFfJGpE/s400/2020-11-06.jpg" /></a></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.comtag:blogger.com,1999:blog-19298483.post-66191277736529597252021-04-03T19:50:00.025+02:002023-10-02T20:25:40.168+02:00Backing up your Clarion projects<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
Whenever you start work on a new project, it's too easy to forget to make backups. Even if you save your work often, what do you do if <i>Clarion</i> crashes, or you break something and need to go back to the previous version of the project? For US$99 <a href="https://developerteam.com.ar/" target="_blank">DeveloperTeam</a> has a <a href="https://developerteam.com.ar/FormProductos?Pro__Guid=N70B4BCS8WVU74Cx" target="_blank">nifty template</a> you can use for automatic backups every time you do a compile. It's pretty automatic once you set it up, but it doesn't back up everything, just the really important bits (app file as txa, dictionary file as dctx) so it is very fast.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MCIkQZfJpyU1I4WIt1FYYr6lUfQLQQu2wVK78pzNjX3F9uPNrHRerLWvBdNjf-MCRv2J5X1AVQQya4RLxgZi85QEa2hYSb72H38rthjjGC2yymknqihEBrkzb9-hLsVIzHnF/s532/Zippy4.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="178" data-original-width="532" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MCIkQZfJpyU1I4WIt1FYYr6lUfQLQQu2wVK78pzNjX3F9uPNrHRerLWvBdNjf-MCRv2J5X1AVQQya4RLxgZi85QEa2hYSb72H38rthjjGC2yymknqihEBrkzb9-hLsVIzHnF/s400/Zippy4.png" width="400" /></a></div>
Another option is to use <a href="https://www.openaccess.co.za/BlackAndWhiteInc/zippy.htm" target="_blank">Zippy Backup Assist</a>, a free utility I wrote for my <i>Access97</i> development work after I threw away a whole day's work by mistake. You copy the <a href="https://www.mustang.co.za/exe/Zippy.exe" target="_blank">Zippy.exe</a> program into your project folder, as well as <a href="https://www.mustang.co.za/exe/zip-daily.bat" target="_blank">zip.bat</a>, which does most of the work. Then you edit the zip.bat file and assign a name for the project. In this case, the name is "learn" and the project is called "Learning Clarion".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib1T8uy7Vh7Cs0LwKcI0BVibpXsOD1TzGY3z2d4piBexwhXLIiho7s2k46ihtwcy-qJJk6INeee7M3mLH1vZik707D8fNiGpRgXFzTthWsHQcrCxZJbE5bOzsKYrwxVY3FCIJw/s730/Zippy2.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="579" data-original-width="730" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib1T8uy7Vh7Cs0LwKcI0BVibpXsOD1TzGY3z2d4piBexwhXLIiho7s2k46ihtwcy-qJJk6INeee7M3mLH1vZik707D8fNiGpRgXFzTthWsHQcrCxZJbE5bOzsKYrwxVY3FCIJw/s400/Zippy2.png" width="400" /></a></div>
<b>Zippy.exe</b> calls the <b>zip.bat</b> file in the same folder as it is running from, and passes it a parameter, comprising the project name (set this using the ZIPPY= command in zip.bat) plus today's date (and time). It's written in <i>Visual Basic 6</i>, and runs fine in Windows 10 and 11.<br />
<br />
<h2>Installation</h2>
Please download <a href="https://www.mustang.co.za/exe/ZippySetup.exe" target="_blank">ZippySetup.exe</a> which will also install the command line version of PKZIP called PKZIPC. (My installer and Zippy.exe is not signed. Sorry! But you can upload it to <i><a href="https://www.virustotal.com/" target="_blank">VirusTotal</a></i> to check for malicious code.) There are two versions of the zip.bat file available:<ul>
<li><a href="https://www.mustang.co.za/exe/zip-daily.bat" target="_blank">zip-daily.bat,</a> which creates a new file for each day it is run; and</li>
<li><a href="https://www.mustang.co.za/exe/zip-hourly.bat" target="_blank">zip-hourly.bat,</a> which creates a new file for each (even numbered) hour of the day it is run. Use "Zippy.exe HOURLY" in the command line when you use this file.</li></ul>
Whichever one you choose, <b>rename it to zip.bat</b>, or it won't work. The backup files are stored in a "zip" folder <br />
<b>Update</b>: I discovered that Clarion has installed 7z.exe in the Clarion\bin folder, so instead of using pkzipc.exe you can use 7z instead. I have updated the batch files to reflect this.
<br />
<h2>Backup with every build</h2>
If you want to make a backup after every successful build, then there is an additional step you should take:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDy7bBHuhStxVVjSwKAcY_9A6sdKgY1alzp6A-Nlte0xzHJfYJn-EzcitWj2vybWGLZ6Rnurev56td7BpLQJzXpdpm9hBuqnKzBciPTHHw4_axK8VVhOfJNMkE6EHfL_oQKhpt/s825/Zippy6.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="444" data-original-width="825" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDy7bBHuhStxVVjSwKAcY_9A6sdKgY1alzp6A-Nlte0xzHJfYJn-EzcitWj2vybWGLZ6Rnurev56td7BpLQJzXpdpm9hBuqnKzBciPTHHw4_axK8VVhOfJNMkE6EHfL_oQKhpt/s400/Zippy6.png" width="400" /></a></div>
From the "Project" menu, select "Project Options..." and go to the "Build Events" tab. Use the Ellipsis button to select the Zippy.exe <b>in the same folder</b> as your project. Make sure the post-build event is set to "On Successful Build" so you don't back up a bad set of data. If you do a lot of builds in a day, then it may be a backup too often. The <a href="https://developerteam.com.ar/FormProductos?Pro__Guid=N70B4BCS8WVU74Cx" target="_blank">Developer Team template</a> makes a <i>backup before the build</i>, and it gives each backup a sequential number, so you can work backwards if needed. Or you can do both.<br />
<br />
<h2>Another Option: Batch file</h2>
<a href="https://gist.github.com/CarlTBarnes" target="_blank">Carl Barnes</a> told me of his solution: a single batch file that you copy and modify for each project. It uses RoboCopy and PowerShell to do some of the heavy lifting. These are included in Windows, so no extra installation required. He has shared it on <a href="https://gist.github.com/CarlTBarnes/bbb936e418226d55ff8651bb1bfbf7e4" target="_blank">GitHub</a>. He offers various options, including a batch file that copies all your stuff to another drive. Worth checking out.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />He also includes another batch file contributed by Rich Fulham during a ClarionLive webinar, which uses 7-Zip. So there are plenty of options.<br>
<br>
<h2>Backup to the Cloud or another PC</h2>
Making zip copies of the project is a good way to keep a timeline, but if your hard drive crashes, you don't have a backup. <b>A backup is only a backup</b> if you have <b>two other copies</b> of the file, one on another media like a CD ROM or external hard drive (try <a href="https://github.com/canton7/SyncTrayzor" target="_blank">SyncTrayzor</a> or <a href="https://freefilesync.org/" target="_blank">FreeFileSync</a>), and one in the cloud or offline storage somewhere. Something like Google Drive, Dropbox, <a href="https://www.idrive.com/" target="_blank">iDrive</a>, <a href="https://www.carbonite.com/" target="_blank">Carbonite</a>, etc.<br />
<br><br>
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/12/introducing-clarion-filemanager-part-1.html">Introducing Clarion FileManager (Part 1 of 2)</a> ]<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/how-to-keep-your-useful-capesoft.html">How to keep your useful CapeSoft accessories up to date</a> ]<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1 of 7)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1 of 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br />
<br>
[ <a href="https://donnedwards.openaccess.co.za/2022/10/clarion-resources-and-products.html"><b>Clarion Resources</b> and Products</a> ]<br>
[ <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> ]<br>
</div>
<br>
<b>Update Tuesday 2 October 2023:</b> Newer version of <a href="https://www.mustang.co.za/exe/Zippy.exe" target="_blank">Zippy.exe</a> which allows you to kill or run applications using a file called <b>zippy.ini</b> in the same folder as zippy.exe. The file structure is simple. Each program you may want to run starts on a line by itself:<pre>run="C:\Program Files (x86)\DebugView++\DebugView++.exe"
</pre> and each program/process to kill is just on a line without anything further:<pre>iexplorer.exe
</pre>Use this in conjunction with the <a href="https://donnedwards.openaccess.co.za/2023/09/clarion-build-events.html">Clarion Build Events</a> technique. You can automatically stop and start the debug program when you build your app.<br>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-48490129140862279172021-03-31T15:37:00.003+02:002021-07-29T15:10:39.781+02:00AARTO Traffic Fine Payment Fiasco
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyzjm-vSbsRKDCfg-CntqAbLxIxJDD7plJU7FuIsUz_4mHuUAlrouGvl-xSb3YOgjFUIR4KoCJRSiJmYyTlLxbuU_kDrnsRfRRnLWDU9KvwDtZdZ77mcZVc_OVWNBbfsEzHBo_/s2048/FineFileData.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="2048" data-original-width="2048" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyzjm-vSbsRKDCfg-CntqAbLxIxJDD7plJU7FuIsUz_4mHuUAlrouGvl-xSb3YOgjFUIR4KoCJRSiJmYyTlLxbuU_kDrnsRfRRnLWDU9KvwDtZdZ77mcZVc_OVWNBbfsEzHBo_/s400/FineFileData.jpg" width="400" /></a></div>
<img align="left" border="0" height="27" hspace="4" src="https://www.mustang.co.za/img/saflag.png" vspace="4" width="39" />Last Wednesday was not my best day. I went to the Post Office and waited in the queue to pick up an AARTO Infringement Notice. It's the fancy name for a traffic fine. The incident took place on the 15th January, and the notice was posted on 2nd February. It arrived in my post box on 19th March. Well done SA Post Office! Really speedy delivery for a State Owned Enterprise.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />But wait, there's more! The notice says I must pay within 32 days, ie. on 6th March, even through I finally received the notice on 19th March. If not, then the fine doubles from R125 to R250. So I log in to FNB banking and look for the notice under their nifty "Pay Traffic Fines" section. Not found. So I look for "AARTO" under "Public Recipients". Not found. So I emailed "enquiries@aartosa.co.za" as instructed on the notice:<blockquote>Dear AARTO<br />
I tried to pay infringement notice no 02-4099-xxxxxxxxxxxxx via FNB.<br />
Firstly, I received the notice dated 02-Feb-2021 a week ago from the Post Office.<br />
Secondly, the notice doesn’t appear on FNB’s “Pay Traffic Fines” search, either on my ID number or the infringement notice no.<br />
Thirdly, a search for AARTO in the FNB Public recipients list failed.<br />
Finally, your banking details do not appear on the notice.<br />
If you would like me to pay the fine, please send me the required banking details so I can pay.<br />
Thanks in advance,<br />
Donn Edwards</blockquote>Naturally, the email bounced: "Unrouteable address". We can't expect anything organised by the ANC government to actually work.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />So I tried dialling 086 122 7861, which <i>TrueCaller </i>identifies as RTIA. Of course all the operators are busy, so I decided to do a <i>Google </i>search for RTIA as well. That eventually led me to <a href="http://www.rtia.co.za/faq.php" target="_blank">www.rtia.co.za/faq.php</a>:<blockquote>Cash payments can be made at<ul>
<li>ABSA</li>
<li>Post office</li>
<li>Relevant issuing authorities; and</li>
<li>Checkers, Shoprite, SPAR, Usave</li>
<li>Makro, Game, Builders Warehouse</li>
</ul>
Online payment can be made through<ul>
<li>FNB</li>
<li>Standard Bank</li>
<li>ABSA</li>
<li>www.payfine.co.za</li>
<li><b>www.aarto.gov.za</b></li></ul></blockquote>After waiting for 8 minutes on the phone I decided to hang up. Neither AARTO nor RTIA is listed as a public recipient by FNB, and the www.aarto.gov.za site mentioned another site called <a href="https://www.paycity.co.za" target="_blank">www.paycity.co.za</a>. They had my infringement number and the photo above. I used it to pay R125 plus R10 service fee using my credit card.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Why am I beginning to get the feeling that the ANC government is essentially a failed state?
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-3138038521071729192021-02-26T19:43:00.012+02:002022-10-06T20:01:59.180+02:00Learning Clarion (Part 6)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This follows on from <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">Learning Clarion (Part 5)</a>. In the lesson below, we’ll create the procedures that will maintain the "Order" and "Detail" data tables.<br />
<br />
<h1>Lesson 11: Advanced Topics</h1>
For the "Order Update" form, we’ll place the columns from the "Order" table on an update form, perform an automatic lookup to the "Customer" table, add a BrowseBox Control template to show and edit the related "Detail" items, calculate each line item detail, then calculate the order total.<br />
<br />
<h2>Set Up the UpdateOrder Form</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwfFIJIuv7auuoC8-GqeNbTxPqQ55Trj1-Zw-OL2dfYZttdLk9WPOTSMbAetJBhLMqdn1sIjAekk6821gSotFREflhe4I0NsnO7mx3cvlyHNqB833Zecka912xhC9Jjw1fHDUp/s676/LC+Lesson+11-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="676" data-original-width="646" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwfFIJIuv7auuoC8-GqeNbTxPqQ55Trj1-Zw-OL2dfYZttdLk9WPOTSMbAetJBhLMqdn1sIjAekk6821gSotFREflhe4I0NsnO7mx3cvlyHNqB833Zecka912xhC9Jjw1fHDUp/s400/LC+Lesson+11-01.png" /></a></div>
Highlight the "UpdateOrder" procedure in the Application Tree dialog, then click on the "Properties" button. In the "Defaults" tab, choose "FORM(Add/Change/Delete)", then press the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ7auT_WAca5mEkXfCN3wD50cMRkK8umcQIJY7O_RPO_eY2cf4JAoPtCZFIr96KVC56cbmx0HSxS44x-OEjA5lOCo_tQNIBn1yK4b3Avy0EwYAl_e-AeXm4caR3-taHe6jNLKT/s563/LC+Lesson+11-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="406" data-original-width="563" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ7auT_WAca5mEkXfCN3wD50cMRkK8umcQIJY7O_RPO_eY2cf4JAoPtCZFIr96KVC56cbmx0HSxS44x-OEjA5lOCo_tQNIBn1yK4b3Avy0EwYAl_e-AeXm4caR3-taHe6jNLKT/s400/LC+Lesson+11-02.png" width="400" /></a></div>
Type in a suitable description ("Order Form"), and then click on the ellipsis next to the Window button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghCu5Ey_i9AvGa8JAFeCz5aMG8JKciid1vfEDEIva1FBHZhQcuvB5sFsRRIroOPNtoE5UK3DTHBz3mc2M46m67IHHiyiirNJokbIv2k82I2vBh_YVTw8dxNraFbYj5hSfG37z4/s788/LC+Lesson+11-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="203" data-original-width="788" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghCu5Ey_i9AvGa8JAFeCz5aMG8JKciid1vfEDEIva1FBHZhQcuvB5sFsRRIroOPNtoE5UK3DTHBz3mc2M46m67IHHiyiirNJokbIv2k82I2vBh_YVTw8dxNraFbYj5hSfG37z4/s400/LC+Lesson+11-03.png" width="400" /></a></div>
Set the WINDOW caption to 'Order Form' and add ",FONT('Segoe UI')" to the end of line 1. Click the green "Save and Close" button, and then click on the "Window" button to open the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTa7bM2cjfwtfYGVX0vGzyeHkDt2ew306pmRvLTgYRF4a4MnqZk26CFd3IJn97rkJdquxwyLfp4LgL2Vp8noaY211rYPL2SnU-J5ayKDNAsT5gdvLsT6nkY2fasHcvlLfD9goo/s860/LC+Lesson+11-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="641" data-original-width="860" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTa7bM2cjfwtfYGVX0vGzyeHkDt2ew306pmRvLTgYRF4a4MnqZk26CFd3IJn97rkJdquxwyLfp4LgL2Vp8noaY211rYPL2SnU-J5ayKDNAsT5gdvLsT6nkY2fasHcvlLfD9goo/s400/LC+Lesson+11-04.png" width="400" /></a></div>
Go to the "Data / Tables" pad, and double-click on the "<ToDo>" entry, highlight the "Order" table and click on "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTdlvvlnakEw52KpQObs5Zx6k4ppwVuEKBcWEt2CYAPz3crNSUTdJtrCnUPc7ZWHjqzD_ZFHPwxMSZwY2JEym_f0J9CC34xD25JbffnQijqBMpTRT07nuEk8p2oX0Cyyuktmz/s795/LC+Lesson+11-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="795" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjTdlvvlnakEw52KpQObs5Zx6k4ppwVuEKBcWEt2CYAPz3crNSUTdJtrCnUPc7ZWHjqzD_ZFHPwxMSZwY2JEym_f0J9CC34xD25JbffnQijqBMpTRT07nuEk8p2oX0Cyyuktmz/s400/LC+Lesson+11-05.png" width="400" /></a></div>
Drag and drop the "OrderDate" and "OrderNote" fields from the "Data / Tables" pad to the top of the form, as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk-IsBWHvnCiGegY0wrJ3Zwt3mvCfnQ285vLFVjpQHPjk0eU_5FnB9n-2kGyuQ6s92qk4WEYrOhYGwXwhQzbZhkSBNY_mLVmNY89wfeGBsmcxFiSodPxxo6abBoKT8s6lSQYXE/s1032/LC+Lesson+11-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="638" data-original-width="1032" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhk-IsBWHvnCiGegY0wrJ3Zwt3mvCfnQ285vLFVjpQHPjk0eU_5FnB9n-2kGyuQ6s92qk4WEYrOhYGwXwhQzbZhkSBNY_mLVmNY89wfeGBsmcxFiSodPxxo6abBoKT8s6lSQYXE/s400/LC+Lesson+11-06.png" width="400" /></a></div>
Change over to the "Toolbox" pad, select the "ENTRY" control and drag it to a spot below the "OrderDate" input field. Then go to the "Properties" pad on the right, click on the ellipsis to the right of the "Use" property, and choose "CustNumber" from the "Order" table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_I7ijPqEX1-3ocgq6WHj5haQB2zq_oqYpjiRkeB8eKtoCl8vo4jWUQmOqMM2DzIc2UkM4PV5zmrWqhFuWyIYhcer9cdkrV0NxSMN4e-03ahK4f4Ks5-ArtS4ofxun8Z16jCk/s790/LC+Lesson+11-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="790" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_I7ijPqEX1-3ocgq6WHj5haQB2zq_oqYpjiRkeB8eKtoCl8vo4jWUQmOqMM2DzIc2UkM4PV5zmrWqhFuWyIYhcer9cdkrV0NxSMN4e-03ahK4f4Ks5-ArtS4ofxun8Z16jCk/s400/LC+Lesson+11-07.png" width="400" /></a></div>
Return to the toolbox, and drag a "PROMPT" control to the left of the "CustNumber" entry control, as shown. Click on the "Edit Value" smart tag. If you miss it, you can find "Edit Value" in the right-click popup menu. Change the value to "&Cust Number:" and click "Accept".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl39bSjvzPs4pt2-QwvX8XKuPOZpl4rTxZUeq_kheQ0Ej29guJC5szjjl2q_NJrtpG-GnP2mh0JYOf8d7q7jbmZdRsOEg-rI6cWwJnCSb62z879G5mV4GCICwlOsHWAmBoaYPG/s823/LC+Lesson+11-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="823" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl39bSjvzPs4pt2-QwvX8XKuPOZpl4rTxZUeq_kheQ0Ej29guJC5szjjl2q_NJrtpG-GnP2mh0JYOf8d7q7jbmZdRsOEg-rI6cWwJnCSb62z879G5mV4GCICwlOsHWAmBoaYPG/s400/LC+Lesson+11-08.png" width="400" /></a></div>
In the "Properties" pad, change the "Use" property to "?CustomerPrompt".<br />
<br />
<h2>Add a lookup procedure call into the Customer list</h2>
The standard actions for any entry control allow you to perform data entry validation against a row in another table, either when the control is Selected (just before the user can enter data) or when the control is Accepted (right after the user has entered data).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9tS-fZdpKb_bBKiZNNMsSSU0hQ2UPgwC3Y3zzndjsYyNDjpKbbP4pxbA3doVZz49Un3-gWe8zUc2IkY-31lxCCbxQXMka5tJXCPshHAkv_chzis4zMD0AznaYwSB4ukDSU3cJ/s624/LC+Lesson+11-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="488" data-original-width="624" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9tS-fZdpKb_bBKiZNNMsSSU0hQ2UPgwC3Y3zzndjsYyNDjpKbbP4pxbA3doVZz49Un3-gWe8zUc2IkY-31lxCCbxQXMka5tJXCPshHAkv_chzis4zMD0AznaYwSB4ukDSU3cJ/s400/LC+Lesson+11-09.png" width="400" /></a></div>
Right-click on the "CustNumber" entry control and select "Actions..." from the menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOHlKCaUTHj6_Mc_LoUvC20nLaTzgYkk3-bJKfjRqXycssUbjJKsQmfQEYR_IES8uZEZwNOfhxPkatFkJ43ntLGGo1B9NiSoGOMz5D_13jEhNrrsCSAkhTRttVufVrCgKrnMhB/s900/LC+Lesson+11-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="541" data-original-width="900" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOHlKCaUTHj6_Mc_LoUvC20nLaTzgYkk3-bJKfjRqXycssUbjJKsQmfQEYR_IES8uZEZwNOfhxPkatFkJ43ntLGGo1B9NiSoGOMz5D_13jEhNrrsCSAkhTRttVufVrCgKrnMhB/s400/LC+Lesson+11-10.png" width="400" /></a></div>
Click on the ellipsis to the right of the "<b>Lookup Key</b>" for "When the Control is Selected". Click on the "Order" table and then the "Add" button to highlight the related "Customer" table and "Select" it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC_tsjfyF-uc4_MDhnzBoOGCciZu34VHjqez8sxQu4SQRKIxKOnvBYQLK-_edYsfGhefXXcFybuVaL3goPCxH5UAj8kJwPSk3R6pdSSROuvgMnvRA4qkFwW9cTZNOpr-qxzvpN/s726/LC+Lesson+11-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="449" data-original-width="726" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhC_tsjfyF-uc4_MDhnzBoOGCciZu34VHjqez8sxQu4SQRKIxKOnvBYQLK-_edYsfGhefXXcFybuVaL3goPCxH5UAj8kJwPSk3R6pdSSROuvgMnvRA4qkFwW9cTZNOpr-qxzvpN/s400/LC+Lesson+11-11.png" width="400" /></a></div>
Click on the "Customer" table, choose the "KeyCustNumber" key and click "Select". Now we have the Lookup Key.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjByCJHiZJzHUPHGjz6PtrIQYQQ6v3CmFbNc_4Gj16thmF8DPpkpjDMi660UgQm7JWT50k2kp4fb3tuFw_DbQD-s8dYVDS9smU2fmtg_OzY26aoUupRsoNHSLElI9GzVYt9tKMr/s827/LC+Lesson+11-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="431" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjByCJHiZJzHUPHGjz6PtrIQYQQ6v3CmFbNc_4Gj16thmF8DPpkpjDMi660UgQm7JWT50k2kp4fb3tuFw_DbQD-s8dYVDS9smU2fmtg_OzY26aoUupRsoNHSLElI9GzVYt9tKMr/s400/LC+Lesson+11-12.png" width="400" /></a></div>
Now we move to the "<b>Lookup Field</b>", click on the ellipsis on the right, and choose the related "CUS:CustNumber" field from the "Customer" table. Click "Select". Now we have the Lookup Field.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAMN0HsxaxosyuDn6vlMLYyRCdGK_h2zJmd50vY1uEkLIJ_1OupZLKYvsYhAv9pduBt-qZAYwGZiXNFLjJ0eUNcATqBrhVCFmY2_S0GL1UyN9mn_97Vhqa7Xnj-sqmBk1CoGJz/s827/LC+Lesson+11-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="431" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAMN0HsxaxosyuDn6vlMLYyRCdGK_h2zJmd50vY1uEkLIJ_1OupZLKYvsYhAv9pduBt-qZAYwGZiXNFLjJ0eUNcATqBrhVCFmY2_S0GL1UyN9mn_97Vhqa7Xnj-sqmBk1CoGJz/s400/LC+Lesson+11-13.png" width="400" /></a></div>
Next, we need the "<b>Lookup Procedure</b>". From the drop-down list choose "BrowseCustomers". Make sure the checkbox for "Force Window Refresh when Accepted" is checked. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0O6oATkHF2SEea2dTqjy7CCcHz-xwXooVe4rNUdpRJgdQ1Wzj-jSpIqjWeDavTkquShlExIM-eKH7yxLddv1u7kl1oBZ5v0feZ-yyqJDOlUHinRPeuFMEGalouT0qWJuo_OOG/s553/LC+Lesson+11-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="478" data-original-width="553" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0O6oATkHF2SEea2dTqjy7CCcHz-xwXooVe4rNUdpRJgdQ1Wzj-jSpIqjWeDavTkquShlExIM-eKH7yxLddv1u7kl1oBZ5v0feZ-yyqJDOlUHinRPeuFMEGalouT0qWJuo_OOG/s400/LC+Lesson+11-14.png" width="400" /></a></div>
Once again, right-click on the "CustNumber" control and choose "Embeds..." from the popup menu. This displays a list of just the embed points associated with this one control. This is the quickest way to get to a specific control’s embed points, and it’s the second way you’ve seen so far to get to an embed point. There is a third method that’s still to come.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt2X39lQEy6rHHcI6bFybmjW1bTLOPZy96KjQ-zdJKCNIBR1vB8du5R7Y0xd2OaGBpedluJ8AbDc2FImljyOrhHUVB-IuiTQ3u94XAwTNFuz2MsuhzSiN5vtsZpzYn-uOk6cA1/s827/LC+Lesson+11-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="662" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt2X39lQEy6rHHcI6bFybmjW1bTLOPZy96KjQ-zdJKCNIBR1vB8du5R7Y0xd2OaGBpedluJ8AbDc2FImljyOrhHUVB-IuiTQ3u94XAwTNFuz2MsuhzSiN5vtsZpzYn-uOk6cA1/s400/LC+Lesson+11-15.png" width="400" /></a></div>
Click on the "Selected" event and press the "Insert" button. Highlight "Source" and click "Select". This opens the Embeditor.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZrgS8HhB_zpgqrCUqBzvAJlzk0TMEhqZYbz_JyDXkkZZOQpQNQ273Dz0n49BVwK1yn3Lboc4SnGUrYh_UZGu0LPGH9RVLDB_ukM1vopffS5U4-yEX5NU9pW_LazXMu4v4rgGN/s607/LC+Lesson+11-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="305" data-original-width="607" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZrgS8HhB_zpgqrCUqBzvAJlzk0TMEhqZYbz_JyDXkkZZOQpQNQ273Dz0n49BVwK1yn3Lboc4SnGUrYh_UZGu0LPGH9RVLDB_ukM1vopffS5U4-yEX5NU9pW_LazXMu4v4rgGN/s400/LC+Lesson+11-16.png" width="400" /></a></div>
Start typing "?" and the floating "Populate Column" toolbox appears. This is to assist with speed and accuracy, so you don't introduce errors from typing mistakes. We need to type "?ORD:CustNumber{PROP:Touched} = TRUE".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi_ltsDwDEoK9PFyG47VhziHL6hgxo6Ep8swW0eetJhEypHLwb9ECXfxPAiwR-lKFHXZeozLqhRXA67Z_V_RPG2FtAQKgdpauukRrdP7DekuB0ZsBYs1uIGbsX8Trg-qrNs0Q1/s587/LC+Lesson+11-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="153" data-original-width="587" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi_ltsDwDEoK9PFyG47VhziHL6hgxo6Ep8swW0eetJhEypHLwb9ECXfxPAiwR-lKFHXZeozLqhRXA67Z_V_RPG2FtAQKgdpauukRrdP7DekuB0ZsBYs1uIGbsX8Trg-qrNs0Q1/s400/LC+Lesson+11-17.png" width="400" /></a></div>
It is "standard Windows behaviour" that, if the user does not enter data into a control and just presses tab (or CLICKs the mouse) to go on to another control, an Accepted event does not happen. This allows users to easily tab through the window’s controls without triggering data-entry validation code on each control. However, sometimes you need to override this "Windows standard behaviour" to ensure the integrity of your database. The <blockquote>?ORD:CustNumber{PROP:Touched} = TRUE</blockquote> statement uses the <i>Clarion</i> language Property Assignment syntax. By setting "PROP:Touched" to TRUE in the Selected event for this control, an Accepted event is always generated, whether the user has entered data or not. This forces the lookup code generated for you into the Accepted event for this control (from the information you entered on the Actions tab on the previous page) to execute. This ensures that the user either enters <i>a valid Customer number</i>, or the Customer list pops up to allow the user to <i>select a Customer</i> for the Order. Click the green "Save and Close" button when done. <br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4qxn5TzpDSKzLmY2KhocIT3ARxXAlNRdgjdVfzFJmR364ZCzQPv3VNAO1yweJlkig4kk_zeH0ZxJVRoRVvb1ZzrS5CUXfAV5LMIOMZUQRaHwdfa_bkxkNMUjDtK2Iu9JK_CkC/s630/LC+Lesson+11-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="625" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4qxn5TzpDSKzLmY2KhocIT3ARxXAlNRdgjdVfzFJmR364ZCzQPv3VNAO1yweJlkig4kk_zeH0ZxJVRoRVvb1ZzrS5CUXfAV5LMIOMZUQRaHwdfa_bkxkNMUjDtK2Iu9JK_CkC/s400/LC+Lesson+11-18.png" /></a></div>
Notice how the SOURCE entry has been added in. Click on the green "Save and Exit" button to return to the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVrLwXRsgfQe6MHbFrzQnFGvcAR7DsZmZfaA1kRHM_wQtnQNvhHSs7qD1cmsY3jEXvlebAXo8464u99VQNTneJWKjoTgrnUKlieQk0tP6OJx2xgFMXrgqgq4QjVqzaspYgeurL/s802/LC+Lesson+11-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="802" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVrLwXRsgfQe6MHbFrzQnFGvcAR7DsZmZfaA1kRHM_wQtnQNvhHSs7qD1cmsY3jEXvlebAXo8464u99VQNTneJWKjoTgrnUKlieQk0tP6OJx2xgFMXrgqgq4QjVqzaspYgeurL/s400/LC+Lesson+11-19.png" width="400" /></a></div>
Drag a "STRING" control from the Toolbox and place it to the right of the "CustNumber" control. We are going to use this to display the Customer name as a read-only field.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh477kxZjZiv4aiLH8carelxeWpCYwIVg6EWrSj95gBMXmuwAD9Gjlgrie0mgIv6FYkiHUy2kNJBaQ9QIGT3IT2YeEgYllk6BPOIvpWJQo5dOAUv7MhOBw4AVuxSM1V34z862gs/s826/LC+Lesson+11-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="631" data-original-width="826" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh477kxZjZiv4aiLH8carelxeWpCYwIVg6EWrSj95gBMXmuwAD9Gjlgrie0mgIv6FYkiHUy2kNJBaQ9QIGT3IT2YeEgYllk6BPOIvpWJQo5dOAUv7MhOBw4AVuxSM1V34z862gs/s400/LC+Lesson+11-20.png" width="400" /></a></div>
In the "Properties" pad, click on the ellipsis to the right of the "Use" property and select the "Company" field from the "Customer" table. Then change the "IsPicture" property to "True" and set the "Picture" value to "@s30". Spend a few minutes adjusting the fields and aligning them, so they are neat and tidy.<br />
<br />
<h2>Placing the Detail Table's Control Templates</h2>
The next key element in this window is a browse list box control, synchronized to the Order Number of this form. This will show all the rows in the "Detail" table related to the currently displayed "Order" table row.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM4oPFdrvTngrDRX-j2nvwXovY0FrkSANtC_17HbHMbUr48jycZpP0i-bODUNpE4wxbTTI8vKpTuNm2L79yWRH_RGlzKR5FJiOcflFPhSyCLdRhozVeW1bPqI1erBYdARbM3ay/s1025/LC+Lesson+11-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="678" data-original-width="1025" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM4oPFdrvTngrDRX-j2nvwXovY0FrkSANtC_17HbHMbUr48jycZpP0i-bODUNpE4wxbTTI8vKpTuNm2L79yWRH_RGlzKR5FJiOcflFPhSyCLdRhozVeW1bPqI1erBYdARbM3ay/s400/LC+Lesson+11-21.png" width="400" /></a></div>
Switch to the "Control Templates" pad and drag a "BrowseBox" template just below the "CustNumber" controls. When the "Select Column" dialog box opens, double-click on the "<ToDo>" entry and choose "Detail". Click on "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMs61DD72hd7qZgjzCIbvic3eSGhG2seyQhyphenhyphenuyQ_ATwYqbqfJ8bArvVjYu0Cv605cvLfjU6b037-oLGnLA-M7qTF386RhneFxiwtldsLYgEusY1WXAMd9OK6GVEA9zyC9nJDr8/s690/LC+Lesson+11-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="446" data-original-width="690" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMs61DD72hd7qZgjzCIbvic3eSGhG2seyQhyphenhyphenuyQ_ATwYqbqfJ8bArvVjYu0Cv605cvLfjU6b037-oLGnLA-M7qTF386RhneFxiwtldsLYgEusY1WXAMd9OK6GVEA9zyC9nJDr8/s400/LC+Lesson+11-22.png" width="400" /></a></div>
Now select the "Detail" table and click on the "Change" button to choose the "KeyOrderNumber" key. Click "Select". Finally, click on the "ProdNumber" field and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHrXHpBIS8oSdtR-dZ1NUSNdZJLmt7wRSESoK99npPQvPQl1ni2tGMB8mMnuXmZE1XrUFhfCj95Vwb7oYqJ6tHmpBEYqqffbwnf5VsaOyLlH3ewbeKqrIg9JOS09xylHe1K-uO/s633/LC+Lesson+11-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="633" data-original-width="565" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHrXHpBIS8oSdtR-dZ1NUSNdZJLmt7wRSESoK99npPQvPQl1ni2tGMB8mMnuXmZE1XrUFhfCj95Vwb7oYqJ6tHmpBEYqqffbwnf5VsaOyLlH3ewbeKqrIg9JOS09xylHe1K-uO/s400/LC+Lesson+11-23.png" /></a></div>
Adjust the shape of the list box and then right click to choose "List Box format ..."<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jj8QhgMUgX_vNlbI4GBPOjRfd22fYxRNUlDLNwYHXLK5iOzFjzzPV3WXKiY9ZDnrO_dMOzY1QBbuzkCza-QXbK7H-Oofk80VOhzSz-ZYiOeDN8ZHDiBuxqoe1Q7qUZBZ1s9I/s562/LC+Lesson+11-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-jj8QhgMUgX_vNlbI4GBPOjRfd22fYxRNUlDLNwYHXLK5iOzFjzzPV3WXKiY9ZDnrO_dMOzY1QBbuzkCza-QXbK7H-Oofk80VOhzSz-ZYiOeDN8ZHDiBuxqoe1Q7qUZBZ1s9I/s400/LC+Lesson+11-24.png" width="400" /></a></div>
Change the Header "Indent" property to "2" and the "DataJustification" setting to "Center".<br />
Use the "Add Field" button to select the "Quantity" field, and check that its "DataJustification" property is "Center".<br />
Use the "Add Field" button to select the "ProdAmount" field, and check that its "DataJustification" property is "Center".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzbRQlHjDAfTC_DSdMi8ZVJYW1BwJTwsxLpX4W9PMkD07sbhXi4-yIG6VbH9muE06Cro6OC5bRPCQEfEiKtdDnhOpj7PVVS_UIM2Op9PX-l10xwvf77RYyIvzsM502iLO3XXXh/s903/LC+Lesson+11-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="588" data-original-width="903" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzbRQlHjDAfTC_DSdMi8ZVJYW1BwJTwsxLpX4W9PMkD07sbhXi4-yIG6VbH9muE06Cro6OC5bRPCQEfEiKtdDnhOpj7PVVS_UIM2Op9PX-l10xwvf77RYyIvzsM502iLO3XXXh/s400/LC+Lesson+11-25.png" width="400" /></a></div>
We want to create a new variable to display the total price for each line item (the quantity multiplied by the unit price). Click on the "Insert Field" button, click on the "Local Data UpdateOrder" item, and click "New".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr_GwZ7QSjXFNx1Z4mAGUffhwHmOvmBhggCjfOmeCLowcFzojESdRycUsMTTgB9Kp2S8Syj4Tgkg_xZqzAX0g-sruYfAnEJBt4lPIDFrI1kgMKXfL9nHMOXpq5R0vMRp3IKdHg/s701/LC+Lesson+11-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="562" data-original-width="701" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr_GwZ7QSjXFNx1Z4mAGUffhwHmOvmBhggCjfOmeCLowcFzojESdRycUsMTTgB9Kp2S8Syj4Tgkg_xZqzAX0g-sruYfAnEJBt4lPIDFrI1kgMKXfL9nHMOXpq5R0vMRp3IKdHg/s400/LC+Lesson+11-26.png" width="400" /></a></div>
The column name is "ItemTotal". Give it a suitable description. Change the Data Type to "DECIMAL", with 7 characters and 2 places. Click "OK". Check that its "DataJustification" property is "Center".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs9xUVBZHSMAcNgEkDmdUXXK-vSYSOkz7C6H28KKS9T0NVxe7x17WZbHALjNKX7hleztrl96qPUBDsKC14IRPBQg4XvzbuIVS7cDOP0hCcbXaCE1T1oTuXI9G6EnAu9KFa39D4/s867/LC+Lesson+11-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="607" data-original-width="867" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjs9xUVBZHSMAcNgEkDmdUXXK-vSYSOkz7C6H28KKS9T0NVxe7x17WZbHALjNKX7hleztrl96qPUBDsKC14IRPBQg4XvzbuIVS7cDOP0hCcbXaCE1T1oTuXI9G6EnAu9KFa39D4/s400/LC+Lesson+11-27.png" width="400" /></a></div>
Click on the "Add Field" button, select the "Detail" table, click "Add", choose "Product" and click "Select". This adds the Products table to the Control template’s table schematic as a lookup table. The related row from the Products table is automatically retrieved for you so you can display the product description in the list.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5vUmt6QU3A9LowZMzmhL33yjMtUlATBRS0QLU7zSa_Dyzj8CQOG1HboxSBtpSO91eEtl0gQA7WZnEQR5DE2sjoYZ6D_hqdZcqDBCjOLHTM2iZmr51pNrsrJVs3ql1ILqjnnXL/s722/LC+Lesson+11-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="446" data-original-width="722" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5vUmt6QU3A9LowZMzmhL33yjMtUlATBRS0QLU7zSa_Dyzj8CQOG1HboxSBtpSO91eEtl0gQA7WZnEQR5DE2sjoYZ6D_hqdZcqDBCjOLHTM2iZmr51pNrsrJVs3ql1ILqjnnXL/s400/LC+Lesson+11-28.png" width="400" /></a></div>
Choose the "Product" table, highlight the "ProdDesc" field, and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ejWA7_q1jWYZWQ2K82N6IhySVcmdwh3j1S-X4ucOBnjqAzUX-DhPRBOJRXRUfxXnPxtL4w86Ni70uGV2pUACoq_uLSxQeXaBzMMooNn5wuk02F9EjBDOIFYw2gjV4B2pA7xh/s562/LC+Lesson+11-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4ejWA7_q1jWYZWQ2K82N6IhySVcmdwh3j1S-X4ucOBnjqAzUX-DhPRBOJRXRUfxXnPxtL4w86Ni70uGV2pUACoq_uLSxQeXaBzMMooNn5wuk02F9EjBDOIFYw2gjV4B2pA7xh/s400/LC+Lesson+11-29.png" width="400" /></a></div>
Adjust the field widths, change the Header "Justification" settings to "Left", and the Header "Indent" settings to "1", except for the first field, where it should be "2". Adjust the Header Text as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs0aEJfI7URlAsNC1IJA4acXW4DY5KgOWuVGaYzaz714QaOm8vSMX5ylBBJIiw9YFIYj5Rtu91LYkPsPPR8InlCW39Exghq3pVhABfzXLGzhuW5_ZamcyTuNSo2oyulZhoYCKl/s574/LC+Lesson+11-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="574" data-original-width="539" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs0aEJfI7URlAsNC1IJA4acXW4DY5KgOWuVGaYzaz714QaOm8vSMX5ylBBJIiw9YFIYj5Rtu91LYkPsPPR8InlCW39Exghq3pVhABfzXLGzhuW5_ZamcyTuNSo2oyulZhoYCKl/s400/LC+Lesson+11-30.png" /></a></div>
We want this list to only display the "Detail" table rows that are related to the "Order" table row currently being edited. Therefore, we need to specify a Range Limit. Right-click on the list box and select "Actions..." from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7whNXf15VHtgrLtkLc5bFehI-hLlQYCFy7Gjd8tUvk5EaHH5DXG4N804Abo8Op33iPy09ULUoOtgfdBr92q7HQbptGjWR3jlkpk0RVHw2ShQo3WL03dtD7aeE8OuNGzvWFaGN/s831/LC+Lesson+11-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="509" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7whNXf15VHtgrLtkLc5bFehI-hLlQYCFy7Gjd8tUvk5EaHH5DXG4N804Abo8Op33iPy09ULUoOtgfdBr92q7HQbptGjWR3jlkpk0RVHw2ShQo3WL03dtD7aeE8OuNGzvWFaGN/s400/LC+Lesson+11-31.png" width="400" /></a></div>
In the "Range Limit Field" use the ellipsis to specify the Detail table's "OrderNumber". Change the "Range Limit Type" to "File Relationship" and the "Related file" to "Order". Don't click "OK" yet because we haven't finished here yet.<br />
<br />
<h2>Add an Order Invoice Total calculation</h2>
Now we want to calculate the order total and save it in the Orders table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCMryniVlnB84gIecudHWGPc8xx8mpghB8xhU1eR7wnznZqnYCurO6zurGVOyJ4rJFHJ0l432fXych8fU9x8JQLMmHhcTiuoDh5apJVjWk-KS9ralJ_yRMd0-DfU4V78o8cGBL/s828/LC+Lesson+11-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="719" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCMryniVlnB84gIecudHWGPc8xx8mpghB8xhU1eR7wnznZqnYCurO6zurGVOyJ4rJFHJ0l432fXych8fU9x8JQLMmHhcTiuoDh5apJVjWk-KS9ralJ_yRMd0-DfU4V78o8cGBL/s400/LC+Lesson+11-32.png" width="400" /></a></div>
Go to the "Totaling" tab and click on the "Insert" button. The "Total Target Field" is "InvoiceAmount" in the Order table. Use the dropdown list to set the "Total Type" to "Sum" and then click on the "E" button to open the expression builder.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivrUWorRX95PHw1qOXqtp9-14vPw8uCSAD1lKrsgvXI3WSrZHCZgnT5NeDvLKoISQnz_ImLzvbGdtGW8Ngph_yA1vInmFd2JBt-4yO3hCGiU9DkE5sXWpalxnYG9T6_lGnS-0n/s739/LC+Lesson+11-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="626" data-original-width="739" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivrUWorRX95PHw1qOXqtp9-14vPw8uCSAD1lKrsgvXI3WSrZHCZgnT5NeDvLKoISQnz_ImLzvbGdtGW8Ngph_yA1vInmFd2JBt-4yO3hCGiU9DkE5sXWpalxnYG9T6_lGnS-0n/s400/LC+Lesson+11-33.png" width="400" /></a></div>
Double-click on the "ItemTotal" field to add it to the "Expression" list at the bottom. This is the column whose contents will be used in the total calculation. So far, we’ve only declared this column and not done anything to put any value into it, but we’ll get to that soon. Click on the green "Save and Exit" button. Then click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvZ5m1DSUa84iIxFrRnlzRVpNjuSZphtlt59lcWOIEW0WtmuhF8tKEovIj3y8icYiHojfUIDraK4ffM48u2th7Bf1O4ZLP-n7sDXNezdoJ_OyzZ7WpG7nIctgHGgG98LsTbdTe/s826/LC+Lesson+11-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="509" data-original-width="826" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvZ5m1DSUa84iIxFrRnlzRVpNjuSZphtlt59lcWOIEW0WtmuhF8tKEovIj3y8icYiHojfUIDraK4ffM48u2th7Bf1O4ZLP-n7sDXNezdoJ_OyzZ7WpG7nIctgHGgG98LsTbdTe/s400/LC+Lesson+11-34.png" width="400" /></a></div>
Go to the "Classes" tab because we want to give the object a more useful name. Change it to read "BrowseDET" and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4Wju8tax5G7WD0615HEYV7fuN0sDW9GSGgQ2gV2YnNiRRwKBKwghDn3CGCGhOZYs8vtyDPotD155jdcXNVglAL9JVmMyu7s9AvksuZpi0Zl4oAtmYgBEn34SMvQiNamJHaH5/s824/LC+Lesson+11-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="824" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_4Wju8tax5G7WD0615HEYV7fuN0sDW9GSGgQ2gV2YnNiRRwKBKwghDn3CGCGhOZYs8vtyDPotD155jdcXNVglAL9JVmMyu7s9AvksuZpi0Zl4oAtmYgBEn34SMvQiNamJHaH5/s400/LC+Lesson+11-35.png" width="400" /></a></div>
With the list box still selected, go to the "Properties" pad and set the "Horizontal" and "Vertical" scroll bar values to "True". Click on the "Save and Close" button, and the "Accept changes" button to <b>save your work</b>. Then click on the "Window" button to return to the window designer.<br />
<br />
<h2>Add the standard table update buttons</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHkfq2yFUGqN3hzRKMVXUe71CO_yoUdgIXX93uXggzIgyc869_WzL1lQtSzzP498OZTCsm80NnENA-3fGOnGsKKq9dgfhJaKam0GQSCwEUycoKps27KEMAfjVypziTzY-tt5K4/s765/LC+Lesson+11-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="507" data-original-width="765" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHkfq2yFUGqN3hzRKMVXUe71CO_yoUdgIXX93uXggzIgyc869_WzL1lQtSzzP498OZTCsm80NnENA-3fGOnGsKKq9dgfhJaKam0GQSCwEUycoKps27KEMAfjVypziTzY-tt5K4/s400/LC+Lesson+11-36.png" width="400" /></a></div>
Click on the list box, and then find the "BrowseUpdateButtons" control template and drag it to the bottom left of the list box.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSYAI17NGAHtAnJ2S7nF9aRZ1UXsTXIJNi_UVpHW9OPViAkEMmRWUHx-UKjFXjVVzFMIKtzTpDho06RJhzMCtcJRlE-KJVHZjBDuG3Lp4wGLnnYHgreV91JAT3MHReHuck3O5/s627/LC+Lesson+11-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="627" data-original-width="565" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQSYAI17NGAHtAnJ2S7nF9aRZ1UXsTXIJNi_UVpHW9OPViAkEMmRWUHx-UKjFXjVVzFMIKtzTpDho06RJhzMCtcJRlE-KJVHZjBDuG3Lp4wGLnnYHgreV91JAT3MHReHuck3O5/s400/LC+Lesson+11-37.png" /></a></div>
Select just the "Delete" button, right-click and choose "Actions..." from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDoxOKUWbdppwSwoT7xTS9aFE7I_cPoosmyDZih8URoL7KyhyphenhyphenBvLR2h7u26cFj60u4Jewk8E6ryAMeuuL-zZErR31df7eAHXtdvKohKhHbBaHIYmkKRIiK-NAOs5mOt0TkySPA/s829/LC+Lesson+11-38.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDoxOKUWbdppwSwoT7xTS9aFE7I_cPoosmyDZih8URoL7KyhyphenhyphenBvLR2h7u26cFj60u4Jewk8E6ryAMeuuL-zZErR31df7eAHXtdvKohKhHbBaHIYmkKRIiK-NAOs5mOt0TkySPA/s400/LC+Lesson+11-38.png" width="400" /></a></div>
Check the "Use Edit in Place" box. Checking this box for one button in the Control template checks it for all three. We will be using the Edit in Place technique to update the "Detail" table rows instead of an update Form procedure. This will allow us to demonstrate some fairly advanced programming techniques and show just how easy they are to perform within the Application Generator. Click "OK".<br />
<br />
<h2>Add a "display-only" Control for the Invoice Total</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx0SigF2X2_G8RGzL28nG2kJ6dCtshOe9dYotsX4omO6R0LjnnD8rVRGpsTsnv7ZyFSg0DIAP0z7qBchTO0V6SLgr-pJ8Fn0EZIMLxCZk3t6YIpQ-ZkgFCOUXBN-yPRzBvvs3x/s1027/LC+Lesson+11-39.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="771" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx0SigF2X2_G8RGzL28nG2kJ6dCtshOe9dYotsX4omO6R0LjnnD8rVRGpsTsnv7ZyFSg0DIAP0z7qBchTO0V6SLgr-pJ8Fn0EZIMLxCZk3t6YIpQ-ZkgFCOUXBN-yPRzBvvs3x/s400/LC+Lesson+11-39.png" width="400" /></a></div>
From the "Toolbox" pad, drag the "STRING" control to the bottom-right corner of the list box. Change the "IsPicture" property to "True". Click on the ellipsis to the right of the "Use" property to select the "InvoiceAmount" field from the "Order" table. This specifies the control will display data from a variable, not just a string constant. Change the "Picture" property to "@n$10.2". Click on the green "Save and Close" button to close the Window Designer and <b>save your work</b>.<br />
<br />
<h2>Making it all Work</h2>
There are a couple of things we need to do to make this procedure fully functional: add a <i>Formula</i>, and configure the <i>Edit in Place</i>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis3-RpYO6-l3-4fssKL9tZ46nnOPILNsT6jf93riA46KNuKhbDZ1ALOs4kGXs-EobBmuxrp1RwuHtENBT-FWQ3oBc3WcrOnuwJNhdJQpuIbPJ-UFFkM5CWMh2qGBeHbP3xmxuQ/s623/LC+Lesson+11-40.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="623" data-original-width="607" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis3-RpYO6-l3-4fssKL9tZ46nnOPILNsT6jf93riA46KNuKhbDZ1ALOs4kGXs-EobBmuxrp1RwuHtENBT-FWQ3oBc3WcrOnuwJNhdJQpuIbPJ-UFFkM5CWMh2qGBeHbP3xmxuQ/s400/LC+Lesson+11-40.png" /></a></div>
To make the "ItemTotal" calculate the correct amount for each "Detail" row in the browse list box, we need to add a Formula to the procedure. This will also allow the browse totalling to correctly place the invoice total in the "ORD:InvoiceAmount" column. Click on the "Formulas" button to open the Formulas tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhduaC_gVmQjijwoGeoHOjvcEhVF6lIjA1cyL3eeyC1yyuXuGQYKZ7x2Yv3_CZkjfqknM7FBs7HKOQ1qWqP9gjQ0-Z888Lt9T0RSZC4BG_TpMKNlkVno81rruFJ79kBQPPaBSZ7/s626/LC+Lesson+11-41.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="626" data-original-width="612" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhduaC_gVmQjijwoGeoHOjvcEhVF6lIjA1cyL3eeyC1yyuXuGQYKZ7x2Yv3_CZkjfqknM7FBs7HKOQ1qWqP9gjQ0-Z888Lt9T0RSZC4BG_TpMKNlkVno81rruFJ79kBQPPaBSZ7/s400/LC+Lesson+11-41.png" /></a></div>
Choose the "Format Browse" template class, and click on "Insert".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiupoLxuW1WFw-EYe3Z7tSunWVYmAMz9HmIUVLX5l6eppB4ZRS7iBGhhTMpXcEW_GqWpAJmmSfr67rjOtQlr3ejuFU-ICCjxphj4xEZHuqoVRM8u31taKUFyPKJkExWjEehHoLD/s749/LC+Lesson+11-42.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="673" data-original-width="749" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiupoLxuW1WFw-EYe3Z7tSunWVYmAMz9HmIUVLX5l6eppB4ZRS7iBGhhTMpXcEW_GqWpAJmmSfr67rjOtQlr3ejuFU-ICCjxphj4xEZHuqoVRM8u31taKUFyPKJkExWjEehHoLD/s400/LC+Lesson+11-42.png" width="400" /></a></div>
The <b>Formula Editor</b> design dialog appears. Type "Item Total Formula" in the "Name" field. Select "Format Browse" for the "Class" Field if it isn't already selected. Click on the ellipsis to the right of the "Result" field. Choose "Local Data UpdateOrder" and then "ItemTotal". This names the column that will receive the <i>result</i> of the calculation. This is the column we defined earlier through the List Box Formatter. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit1KtXG9PAcj0Mf3eOyPUWDmcAeZLmAi9vIPM2LIYsnm215F-QT2IvR2H1MUTHkdoppkawNkkpFFZ8ygIibkk6L8x5fSS4_Df3MDzqD8qQvUqEYROVXIXMvxvTXy0MmmMiql2L/s1003/LC+Lesson+11-43.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="672" data-original-width="1003" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit1KtXG9PAcj0Mf3eOyPUWDmcAeZLmAi9vIPM2LIYsnm215F-QT2IvR2H1MUTHkdoppkawNkkpFFZ8ygIibkk6L8x5fSS4_Df3MDzqD8qQvUqEYROVXIXMvxvTXy0MmmMiql2L/s400/LC+Lesson+11-43.png" width="400" /></a></div>
Click on the "Data" button on the right under "Operands". Choose the "Detail" table and the "Quantity" field. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMbALDyWqA5aS7uM8GZZMd0gXoGguzmvUUpHg3simXFe7GohWj6rDTLOUFBbF9pJrKY96TGCQJ0NWnWkjJ09Jk_3Uk-KpKtP_0hFuRFrbnPM6aOVuE82jdqSQWkLAW1cvjfVKg/s615/LC+Lesson+11-44.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="451" data-original-width="615" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMbALDyWqA5aS7uM8GZZMd0gXoGguzmvUUpHg3simXFe7GohWj6rDTLOUFBbF9pJrKY96TGCQJ0NWnWkjJ09Jk_3Uk-KpKtP_0hFuRFrbnPM6aOVuE82jdqSQWkLAW1cvjfVKg/s400/LC+Lesson+11-44.png" width="400" /></a></div>
This places "DET:Quantity" into the "Statement" field for you. It contains the expression being built. You can type directly into the "Statement" field to build the expression, if you wish. Click the "*" button in the Operators group. This is the multiplication operator. Notice how it has added the "*" to the Statement field. Click on the "Data" button again, and select the "ProdAmount" from the "Detail" table. Click the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqErqYqygNh72lFljYpCDUIfpzwlKDfoO_Fj3Fu4iOrBZ3MqGgAOajiyrKGvFnBhb7tRC_U08uG2daMnbO2pDIY61-lNV0aUiq0pv6mi_7M5uH6xyALQn_uDEWcwNMAXA3231/s617/LC+Lesson+11-45.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="526" data-original-width="617" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWqErqYqygNh72lFljYpCDUIfpzwlKDfoO_Fj3Fu4iOrBZ3MqGgAOajiyrKGvFnBhb7tRC_U08uG2daMnbO2pDIY61-lNV0aUiq0pv6mi_7M5uH6xyALQn_uDEWcwNMAXA3231/s400/LC+Lesson+11-45.png" width="400" /></a></div>
Use the "Check" button to check the syntax of the Statement line. A green checkmark appears left of the button, indicating the syntax is correct. If a red X appears, the expression’s syntax is incorrect and the highlighted portion of the statement is what you must change. Click on the green "OK" button.<br />
<br />
<h2>Configuring Edit in Place</h2>
Now we need to configure the <i>Edit in Place</i> characteristics. We previously used Edit in Place for the "Phone" table and simply took all the default behaviours because that was a fairly simple table. However, now we’re editing a line item "Detail" row for an order entry system, which means we need to do some data entry validation beyond simply ensuring the user types in a number that fits the display picture. To do this, we’ll need to <b>extend</b> the simple Edit in Place functionality provided by the Application Builder Class (ABC) Library.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdnmVDK2P5lk1iadK352KJXARychEWidRTuW7hEUfKjUyJyzdy0aEasZ_uZcllYMtNB1OAjeocYqdnF4JitJLKJBBUWl2simZ7BxMXBTY6LuD-uzyhZMzUjiYlFyz95loa-uRM/s615/LC+Lesson+11-46.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="401" data-original-width="615" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdnmVDK2P5lk1iadK352KJXARychEWidRTuW7hEUfKjUyJyzdy0aEasZ_uZcllYMtNB1OAjeocYqdnF4JitJLKJBBUWl2simZ7BxMXBTY6LuD-uzyhZMzUjiYlFyz95loa-uRM/s400/LC+Lesson+11-46.png" width="400" /></a></div>
Change to the "Extensions" tab, select "Update a Record from Browse Box on Detail" and click on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZtEHPX7UxuZvPjztmCdKU38NDWbq5iPpa6n6nbrykp93j3XLnqHe8f0nQXAWoRVUaA6eG_2tecbYsEpYEOHADXKVuXeCoATDdwHWGtsO8Oh1ZTiCd60JV6bb0DwHoeR7R8scl/s1027/LC+Lesson+11-47.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="648" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZtEHPX7UxuZvPjztmCdKU38NDWbq5iPpa6n6nbrykp93j3XLnqHe8f0nQXAWoRVUaA6eG_2tecbYsEpYEOHADXKVuXeCoATDdwHWGtsO8Oh1ZTiCd60JV6bb0DwHoeR7R8scl/s400/LC+Lesson+11-47.png" width="400" /></a></div>
Click on the "Configure Edit in place" button. Double-click on the "DET:Quantity" field, and change to the "Class" tab. The ABC Library’s EditEntryClass defaults to using an ENTRY control, and for this column we want to use a SPIN control, so the user can just spin to the quantity they want to order. Therefore, we need to override some methods for this column too, to have a SPIN instead of an ENTRY control. Clear the "Use Default ABC" check box. Change the "Base Class" to "EditSpinClass". Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFzipsXfU59NrWqrikZbGUH989fjNxfsRNE4qUnpY0ZhwFkZngzn6GgkoA4S2AoFrSJfo9WJySYHsEKFNh1pj76fMlw_0KNB1NiVZIoHFayg2dh2iQ7SSqHpHQBHuEvfvhl0kv/s993/LC+Lesson+11-48.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="993" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFzipsXfU59NrWqrikZbGUH989fjNxfsRNE4qUnpY0ZhwFkZngzn6GgkoA4S2AoFrSJfo9WJySYHsEKFNh1pj76fMlw_0KNB1NiVZIoHFayg2dh2iQ7SSqHpHQBHuEvfvhl0kv/s400/LC+Lesson+11-48.png" width="400" /></a></div>
Double-click on "DET:ProdAmount" and clear the "Allow Edit-In-Place" check box. For this procedure we do NOT want the user to be able to edit the "DTL:ProdAmount" column because we’re going to get its value directly from the "Product" table, and we don’t want the user to be able to change it. That’s why we turned off the "Allow Edit-in-Place" box. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZyG6WZxNS98CleVE8r3bzreDvVgCFLaVSXJ4SiQCU_JjBBrLqMAp-9KWDyg4oA9iV77w6RglOdYbjteksoR5t6mMF12LGDuv4ZpkvnT5d-MBVXusj27_vS-GpDY3VdDAtCNwa/s825/LC+Lesson+11-49.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="375" data-original-width="825" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZyG6WZxNS98CleVE8r3bzreDvVgCFLaVSXJ4SiQCU_JjBBrLqMAp-9KWDyg4oA9iV77w6RglOdYbjteksoR5t6mMF12LGDuv4ZpkvnT5d-MBVXusj27_vS-GpDY3VdDAtCNwa/s400/LC+Lesson+11-49.png" width="400" /></a></div>
Repeat these steps for the "ItemTotal" and "PRO:ProdDesc" fields. Their "Edit-In-Place" facility should be disabled, as shown. Click "OK", "OK", "Save and Exit", and "Accept changes" to <b>save your work</b>.<br />
<br />
<h2>Using the Embeditor</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbn4pvSMbmbJIW3is0te2d7ZIXTV9Ct9M3U3_BD3TcK4T1F2xWRtNudr9L6V7G-dEumhI5nA5oUWI66l_kQC0iMsmXIybRYZA2L6tTNt6mOIRKgbgE9HVwCnhRQKj2LZuAQlpM/s626/LC+Lesson+11-50.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="626" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbn4pvSMbmbJIW3is0te2d7ZIXTV9Ct9M3U3_BD3TcK4T1F2xWRtNudr9L6V7G-dEumhI5nA5oUWI66l_kQC0iMsmXIybRYZA2L6tTNt6mOIRKgbgE9HVwCnhRQKj2LZuAQlpM/s400/LC+Lesson+11-50.png" /></a></div>
Highlight the "UpdateOrder" procedure and click on the "Embeditor" button on the right.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNDWGXEdgz-LT3j2hhYczzZC9dmA_uIFKyvEUm8peedOi26FK_pIg3kvb7Z7-TJ-XKK16SCIE_a_eMe-w5z1LlXCMt8eSWYv7kc-q4LWJphKAc0siYLOkcm6rwYvF7LW4Ac4CE/s621/LC+Lesson+11-51.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="621" data-original-width="610" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNDWGXEdgz-LT3j2hhYczzZC9dmA_uIFKyvEUm8peedOi26FK_pIg3kvb7Z7-TJ-XKK16SCIE_a_eMe-w5z1LlXCMt8eSWYv7kc-q4LWJphKAc0siYLOkcm6rwYvF7LW4Ac4CE/s400/LC+Lesson+11-51.png" /></a></div>
This opens the <b>Embeditor</b>: the third method of accessing embed points in a procedure. The Embeditor is the same Text Editor you’ve already used, but opened in a special mode which allows you to not only to edit all the embed points in your procedure, but to edit them within the context of template-generated code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Notice that most of the code is on a gray background and the points where you can write your code have a white background. There are also identifying comments for each embed point. You can turn these comments on and off as you choose through the "Tools" -> "Options" dialog. Once you become familiar with them, you’ll probably want to turn them off, so you can see more of the actual code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />You’ll notice that a message briefly appeared that said, "Generating LCLesson." The Embeditor displays all possible embed points for the procedure within the context of all the possible code that may be generated for the procedure. Notice the distinction here: Embeditor does not show you the code that <i>will be</i> generated, but all the code which <i>could be</i> generated for you, if you chose every possible option and placed code into every available embed point. You are not likely to ever do that. Therefore, a lot more generated code shows up in the Embeditor than will actually be in the generated code when you compile your application. After we finish here, we’ll go look at the generated code to see the difference.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />At the right end of the toolbar are four buttons which are essential to know when working in the Embeditor. These are (from left to right) the "Previous Embed", "Next Embed", "Previous Filled Embed", and "Next Filled Embed" buttons (hover your mouse over them and the tooltips appear naming the buttons). They allow you to quickly get from one embed point to another; particularly after you’ve written code into some of them.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrSqQdrpOSnN2CsX-21pQJW2_U53CMsPZAjwb4BUAWPLLheP6pfdzo_INfykEnXzUoFt_0v_O8OA-YfSp0hluiKevqdfzio1TBAAg5LIntbSgQ8YhI9qyJ_HJkcmeSw-pTp2l/s624/LC+Lesson+11-52.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="624" data-original-width="614" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrSqQdrpOSnN2CsX-21pQJW2_U53CMsPZAjwb4BUAWPLLheP6pfdzo_INfykEnXzUoFt_0v_O8OA-YfSp0hluiKevqdfzio1TBAAg5LIntbSgQ8YhI9qyJ_HJkcmeSw-pTp2l/s400/LC+Lesson+11-52.png" /></a></div>
One of the things we want this procedure to do is to detect changes to existing orders and make sure the changes do not result in a data mismatch between the "Order" and "Detail" tables. This system is storing the total dollar amount of an order in the "ORD:InvoiceAmount" column, so when the user changes a "Detail" item in an existing Order, we want to make sure the "Orders" table row is updated, too. There’s a fairly simple way to do that which will allow us to demonstrate the ABC Library’s flexible error handling.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Click on the "Next Embed" button (about 4 times) until you get to the embed point <i>immediately preceding</i> the line of code reading
<pre><span style="color: red;">ThisWindow</span> CLASS(WindowManager)</pre>
Each embed point potentially has 10,000 priority levels within it. This Embed code Priority level system is designed to allow you to embed your code before or after any generated code: whether that code is generated for you by <i>Clarion</i>’s ABC Templates or any third-party templates you choose to use. This makes the embed system completely flexible, allowing you to add your own code at any logical point needed; before or after almost any "chunk" of generated code.<br />
In the white area just above this line, type in (or copy and paste) the following:
<pre><span style="color: red;">LocalErrGroup</span> GROUP
USHORT(1)
USHORT(99)
BYTE(Level:Notify)
PSTRING('Save the Order!')
PSTRING('Some Item changed -- Press the OK button.')
END
<span style="color: red;">SaveTotal</span> LIKE(ORD:InvoiceAmount)</pre>as shown in the image above.
The <span style="color: red;">red text</span> indicates that the text begins in Column 1, and identifies a data label.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><i>Clarion</i>’s ABC (Application Builder Class) Templates generate Object Oriented code for you using the ABC Library. The ABC Library contains an error handling class called <b>ErrorClass</b>. This bit of code declares a LocalErrGroup GROUP (in exactly the form that the ErrorClass requires: see the ABC Library Reference Vol I) containing a "custom" error number and message that we are defining for use by the ErrorClass object in our application. The "SaveTotal" declaration is a local variable which is defined LIKE (always has the same data type) the "ORD:InvoiceAmount" column. We’ll use this variable to hold the starting order total when the user is updating an existing order.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifXll-ck7aQCcYarcD7OnvvgBbd6GeSvuq6w4d-Q5GaAUn3BPyCbUMSrpN9gzId4w6zymDZ6cF4PVDo14aF1yqdjKYMmv4Cfbq0jR8nRBa5vdzyRpCuTw26geulD3aQd7u0Kcw/s360/LC+Lesson+11-53.png" style="clear: left; display: block; float: left; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="360" data-original-width="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifXll-ck7aQCcYarcD7OnvvgBbd6GeSvuq6w4d-Q5GaAUn3BPyCbUMSrpN9gzId4w6zymDZ6cF4PVDo14aF1yqdjKYMmv4Cfbq0jR8nRBa5vdzyRpCuTw26geulD3aQd7u0Kcw/s400/LC+Lesson+11-53.png" width="297" /></a></div><br clear="left" />
Choose "Search" -> "Find" to bring up the Find dialog, or press Ctrl-F.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_tznIC2iYRp7QWO_sKpFYDhO090gKP2HMJF6AKJ_AXYI3RfdglguhvAWb5x-IEldOqMWB7Mladq0n5kevxbn42zdQQ_0BKa37no8j7WZdvheZnh7Omr5fZlz5vZYEybLyqkg/s509/LC+Lesson+11-54.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="464" data-original-width="509" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie_tznIC2iYRp7QWO_sKpFYDhO090gKP2HMJF6AKJ_AXYI3RfdglguhvAWb5x-IEldOqMWB7Mladq0n5kevxbn42zdQQ_0BKa37no8j7WZdvheZnh7Omr5fZlz5vZYEybLyqkg/s400/LC+Lesson+11-54.png" width="400" /></a></div><br />
The text we want to find is "ThisWindow.Init", so type it in to the "Find what" field and click the "Find" button. Click on the red "x" to close the Find dialog. You should see "ThisWindow.Init" highlighted on the screen.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtG5IbfhzA5K2oDC-kdqzU0lBIVapXq23o4kobQwt0USKgND_666rBfMfJhJCehL5TJSpAIrQaYlaoXkxq9cKFBWAQxs-dLZ0EfJ_tmRMVLd5lMPtfj4LqSeBaK__DBteYbLRZ/s615/LC+Lesson+11-55.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="601" data-original-width="615" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtG5IbfhzA5K2oDC-kdqzU0lBIVapXq23o4kobQwt0USKgND_666rBfMfJhJCehL5TJSpAIrQaYlaoXkxq9cKFBWAQxs-dLZ0EfJ_tmRMVLd5lMPtfj4LqSeBaK__DBteYbLRZ/s400/LC+Lesson+11-55.png" width="400" /></a></div>
Press the "Next Embed" button (about 6 times) until you get to the point just after <pre>SELF.Errors &= GlobalErrors</pre> as shown above. Paste in the following:
<pre> SELF.Errors.AddErrors(LocalErrGroup) !Add custom error
IF SELF.Request = ChangeRecord !If Changing a row
SaveTotal = ORD:InvoiceAmount !Save the original order total
END</pre>
This code calls the "AddErrors" method of the "GlobalErrors" object to add the "LocalErrGroup" to the list of available errors that the object handles. The "GlobalErrors" object is an instance of the"ErrorClass" which the ABC Templates declare globally to handle all error conditions in the application. Adding our LocalErrGroup enables the GlobalErrors object to handle our "custom" error condition. This demonstrates the flexibility of <i>Clarion</i>’s ABC Library. The <b>IF</b> statement detects when the user is editing an existing order and saves the original order total.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This embed point is in the "ThisWindow.Init" procedure which performs some necessary initialization tasks. This is a virtual method of the "ThisWindow" object. <b>ThisWindow</b> is the object which handles all the window and control handling code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />You may not have noticed, but the ABC Templates generate exactly one line of executable source code within the "UpdateOrder" procedure itself (GlobalResponse = ThisWindow.Run) so all the functionality of the "UpdateOrder" procedure actually occurs in object methods: either virtual methods specific to the "UpdateOrder" procedure itself or standard ABC Library methods. This is true of every ABC Template generated procedure. Generating fully Object-Oriented code makes the code generated for you very tight and efficient. Only the code that actually needs to be different for an individual procedure is handled differently. Everything else is standard code that exists in only one place and has been tested and debugged to ensure consistent performance.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Object-Oriented Programming (OOP) in <i>Clarion</i> starts with the CLASS structure. See CLASS in the <i>Language Reference</i> Help for a discussion of OOP syntax. The <i>Advanced Programming Resources</i> PDF contains several articles which discuss OOP in depth, and the <i>ABC Library Reference</i> fully documents <i>Clarion</i>’s Application Builder Class (ABC) Library.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1x4d5vtX74LZ-HJt5uenyIqi0AeUr467BhGxX2ywPCEDCKcnNY4hPdPykGQEU02O09c0jnZLW9D2f64Y0EFtb8ZPeUnY578l9syNnME-gtgjAoIhY8zSe-88S0Bjr5G971JV/s613/LC+Lesson+11-56.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="602" data-original-width="613" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1x4d5vtX74LZ-HJt5uenyIqi0AeUr467BhGxX2ywPCEDCKcnNY4hPdPykGQEU02O09c0jnZLW9D2f64Y0EFtb8ZPeUnY578l9syNnME-gtgjAoIhY8zSe-88S0Bjr5G971JV/s400/LC+Lesson+11-56.png" width="400" /></a></div>
Press Ctrl-F to get back to the Find tool, and look for "ThisWindow.Kill". Click down two embed points and paste:
<pre> SELF.Errors.RemoveErrors(LocalErrGroup) !Remove custom error</pre>This calls the ABC Library method to remove our "custom" error. The ThisWindow.Kill method is a "cleanup" procedure (performs necessary exit tasks) which executes when the user is finished working in the UpdateOrder procedure, so the error is no longer needed at that point.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxPhVBkNGW6zx7ozy3MUAFhfA72ENyd_sjVj0xV9sM37Ak1WYKqFcORJ4haXHZOz5EWcTslRVSDlOdbUYzF_MxD_be_8UXG76ZfzQzfskzr-qoX0YrqLC4u3I442Y0d5OabMdZ/s607/LC+Lesson+11-57.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="599" data-original-width="607" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxPhVBkNGW6zx7ozy3MUAFhfA72ENyd_sjVj0xV9sM37Ak1WYKqFcORJ4haXHZOz5EWcTslRVSDlOdbUYzF_MxD_be_8UXG76ZfzQzfskzr-qoX0YrqLC4u3I442Y0d5OabMdZ/s400/LC+Lesson+11-57.png" width="400" /></a></div>
Press Ctrl-F to get back to the Find tool, and look for "EVENT:CloseWindow". Click "Find" <i>twice</i> to get to the desired one. Move down to the embed point and paste:
<pre> IF SELF.Request = ChangeRecord AND | ! If Changing a row
SELF.Response <> RequestCompleted AND | ! and OK button not pressed
SaveTotal <> ORD:InvoiceAmount ! and detail recs changed
GlobalErrors.Throw(99) ! Display custom error
SELECT(?OK) ! then select the OK button
CYCLE
END</pre>
This is the code that will detect any attempt by the user to exit the UpdateOrder procedure without saving the Orders table row after they’ve changed an existing order. Note the <i>vertical bar</i> characters (|) at the end of the first two lines of code. These are absolutely necessary. Vertical bar (|) is the <i>Clarion</i> language <b>line continuation character</b>. This means that the first three lines of this code are a single logical statement which evaluates three separate conditions and will only execute the GlobalErrors.Throw(99) statement and the next 2 lines if all three conditions are true. Click the green "Save and Close" button to <b>save your work</b>.<br />
<br />
<h2>Overriding the Edit in Place Classes</h2>
OK, now you’ve seen an example of how you can use the ABC Library in your own embedded source code. Now we’ll show you how to override a class to provide custom functionality that the ABC Library does not provide. The CLASS declarations for the objects that we named through the "Configure Edit in Place" dialogs are generated for you by the ABC Templates. These CLASSes are both derived from the <i>EditClass</i> ABC Library class.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5s6AA5QJf1Vdlt4MmXT1g9NJ2UzgHkThyfYYXjIqJ-J9bt2XS0Q1eTGksXDzaQnPSGvf-KT3lqAQ4BC5vhrnNU1iurfCJDqc5yflhwpJ-njPU6znJ66Qc4uDUhVS2XkSZRATR/s630/LC+Lesson+11-58.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="630" data-original-width="615" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5s6AA5QJf1Vdlt4MmXT1g9NJ2UzgHkThyfYYXjIqJ-J9bt2XS0Q1eTGksXDzaQnPSGvf-KT3lqAQ4BC5vhrnNU1iurfCJDqc5yflhwpJ-njPU6znJ66Qc4uDUhVS2XkSZRATR/s400/LC+Lesson+11-58.png" /></a></div>
With "UpdateOrder" still selected, click on the "Embeds" button to display the Embeds Tree. Click on the "Contract All Nodes" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwS_I0FBxyZ95MGu4f00sV2htPUk9ZN2dg8kcaBzYbzAXkKkNiyL-UGT398FG4Ahjs0-Toeirm49f1IWdZq6qIan1LIyjbQ-h9DzDV00ZiD6M5OIhAyDonMU2CgY2f4VBXsZOt/s628/LC+Lesson+11-59.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="613" data-original-width="628" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwS_I0FBxyZ95MGu4f00sV2htPUk9ZN2dg8kcaBzYbzAXkKkNiyL-UGT398FG4Ahjs0-Toeirm49f1IWdZq6qIan1LIyjbQ-h9DzDV00ZiD6M5OIhAyDonMU2CgY2f4VBXsZOt/s400/LC+Lesson+11-59.png" width="400" /></a></div>
By pressing the "+" button on the tree, expand the "Local Objects", "Abc Objects", "EIP Field Manager for Browse Using ?List for column DET:Quantity (EditSpinClass)", "Init", "CODE", "Parent Call". Click on the "Source" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2ivX-_Av1KkXU_1OZa_8j6sdsl1n5P2xdGN7ZiymFUHBMLTOP6gx66mVyIY_2YtqMpnzPALi9yHR6eOn1dXSrrRq9wb7EcjRN2Q41rPcbPN-IvMh9-To-vpKz6f8o8WFWkn5n/s805/LC+Lesson+11-60.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="601" data-original-width="805" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2ivX-_Av1KkXU_1OZa_8j6sdsl1n5P2xdGN7ZiymFUHBMLTOP6gx66mVyIY_2YtqMpnzPALi9yHR6eOn1dXSrrRq9wb7EcjRN2Q41rPcbPN-IvMh9-To-vpKz6f8o8WFWkn5n/s400/LC+Lesson+11-60.png" width="400" /></a></div>
Go to the embed point immediately following the line of code reading <pre>PARENT.Init(FieldNumber,Listbox,UseVar)</pre> and paste in the following:
<pre> SELF.Feq{PROP:Text} = ListBox{PROPLIST:Picture,FieldNumber}
!Set entry picture token
SELF.Feq{PROP:RangeLow} = 1 !Set RANGE values for the SPIN
SELF.Feq{PROP:RangeHigh} = 9999</pre>
This code sets the data entry picture token and range of valid data for the SPIN control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4HDHy6kuQ2BJxbEaU7Dqzk_NvBLk7Q5pjEPDv3NpcKkF9HHnWOHGAAAsX2jjsAj0wwsmR14WWENftDyj0mD_1DI30XVDEZ4tc62Z4yEeFh4v1xZGeexCYGhGLz2U8r7VRusw7/s809/LC+Lesson+11-61.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="624" data-original-width="809" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4HDHy6kuQ2BJxbEaU7Dqzk_NvBLk7Q5pjEPDv3NpcKkF9HHnWOHGAAAsX2jjsAj0wwsmR14WWENftDyj0mD_1DI30XVDEZ4tc62Z4yEeFh4v1xZGeexCYGhGLz2U8r7VRusw7/s400/LC+Lesson+11-61.png" width="400" /></a></div>
Scroll to the "EditInPlace::DET:Quantity.SetAlerts" method (this is about 8 clicks of the "Next Embed" button). In the CODE section just before the Parent Call, enter the following code:
<pre> SELF.Feq{PROP:Alrt,5} = ''
SELF.Feq{PROP:Alrt,6} = ''</pre>
<b>Note:</b> If you wish to see the base class code that we’ve overridden, open the "C:\Clarion11\LibSrc\win\ABEIP.CLW" file and search for "EditSpinClass".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhuiHTDq6EURtmGqo3IYDkHFcJEQheI2stwmXOSH-48BtItcqTIGZ7ppnYSplD3FKul85NcRzCK-ScR4uurnx4Aid5AoHissvNtzJ7-yptL1HivECH-OPKHyAjrSBtOiJ4Mzg5/s807/LC+Lesson+11-62.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="750" data-original-width="807" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhuiHTDq6EURtmGqo3IYDkHFcJEQheI2stwmXOSH-48BtItcqTIGZ7ppnYSplD3FKul85NcRzCK-ScR4uurnx4Aid5AoHissvNtzJ7-yptL1HivECH-OPKHyAjrSBtOiJ4Mzg5/s400/LC+Lesson+11-62.png" width="400" /></a></div>
Press Ctrl-F to open the find dialog and type in <pre>EditInPlace::DET:ProdNumber.TakeEvent</pre>
in the "Find what" field. Click "Find". Close the dialog and click the "Next Embed" 3 times to get to the point below "ReturnValue = PARENT.TakeEvent(Event)". Paste in the following code:
<pre> UPDATE(SELF.Feq) !Update Q field
IF ReturnValue AND ReturnValue <> EditAction:Cancel OR |
EVENT() = EVENT:Accepted !Check for completion
PRO:ProdNumber = BrowseDET.Q.DET:ProdNumber !Set for lookup
IF Access:Product.Fetch(PRO:KeyProdNumber) !Lookup Product row
GlobalRequest = SelectRecord !If no row, set for select
BrowseProducts ! then call Lookup proc
IF GlobalResponse <> RequestCompleted !Row selected?
CLEAR(PRO:Record) ! if not, clear the buffer
ReturnValue = EditAction:None ! and set the action to
END ! stay on same entry field
END
BrowseDET.Q.DET:ProdNumber = PRO:ProdNumber !Assign Product table
BrowseDET.Q.DET:ProdAmount = PRO:ProdAmount ! values to Browse QUEUE
BrowseDET.Q.PRO:ProdDesc = PRO:ProdDesc ! fields
DISPLAY ! and display them
END</pre>
This is the really interesting code. Notice that the first executable statement (generated for you) is a call to the PARENT.TakeEvent method. This calls the EditSpinClass.TakeEvent method we’re overriding so it can do what it usually does.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />All the rest of the code is there to give this derived class extra functionality not present in its parent class. This is the real power of OOP—if you want everything the parent does, plus a bit more, you don’t have to duplicate all the code the parent executes, you just call it. In this case, all the extra code is to perform some standard data entry validation tasks. This code will verify whether the user typed in a <b>valid Product Number</b> and if they didn’t, it will call the ViewProducts procedure to allow them to choose from the list of products.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />It also assigns the "ProdNumber", "ProdAmount" and "ProdDesc" in the local browse with the values from the chosen record in the "Product" table. This is how "ProdAmount" gets its correct price.<br />
<br />
<h2>Overriding Methods in the Embeditor</h2>
There is a very important point to understand about working in the Embeditor or the Embed Tree. When you are overriding methods: as soon as you type <i>anything</i> into an embed point in an overridable method, you have overridden it. Even a simple "!" comment line makes this happen, because the Application Generator notes that you have written <i>some of your own code</i>, and so generates the proper method prototype into the local CLASS declaration for you. To prevent you from accidentally adding a comment that causes the method override which consequently "breaks" the functionality, the ABC Templates automatically generate PARENT method calls and RETURN statements for you, as appropriate.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />You’ll notice that all of our overridden methods contained generated calls to their PARENT method, and the TakeEvent method also had a generated RETURN statement. Sometimes you want these statements to execute, and sometimes you don’t (usually, you do). For those cases where you do not want them to execute, simply write your code in the embed point which comes before the PARENT method call and write your own RETURN statement at the end of your code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This means that the generated PARENT method call will never execute. <i>Clarion</i>’s optimizing compiler is smart enough to recognize that these statements can never execute and optimizes them out of compiled object code. Click on the green "Save and Close" button to close the Embeditor, then press "Save and Exit" to close the embed tree. Click on the "Accept Changes" button to <b>save your work</b>.<br />
<br />
<h2>Update the Procedure Call Tree</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfg6mMayaesiNbhzLejiSEDRLpc5DFQhCHKFcrTD148yZ_A0v8RG7eTU43y6BiGad7HQw_-moYvV2nIaIxT96AnJKmVBwwu5wlhVs01P_OLH-7ehsYtcoxiYScObu4D5Yvl5JE/s807/LC+Lesson+11-63.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="807" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfg6mMayaesiNbhzLejiSEDRLpc5DFQhCHKFcrTD148yZ_A0v8RG7eTU43y6BiGad7HQw_-moYvV2nIaIxT96AnJKmVBwwu5wlhVs01P_OLH-7ehsYtcoxiYScObu4D5Yvl5JE/s400/LC+Lesson+11-63.png" width="400" /></a></div>
The "EditInPlace::DET:ProdNumber.TakeEvent" method calls the "BrowseProducts" procedure from within its code. Since this is just embedded source code, the Application Generator doesn’t know you’ve called this procedure, and needs to be told (if you don’t, you’ll get compiler errors), so it can generate the correct MAP structure for the module containing this procedure.
Select "UpdateOrder" and click on the "Calls" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkk_Ifjn2Zdr_g63CuUh1efrCBpAqNvYl9svQOd8CTbYdIO33LeJ6yh2QksV_2vwrroEIxQ5t-UsPedQYrFcZZ1Z51CIWP-ryAC5W8aT4m-CwDAdGE3yyNXeb_5iJ_pmQP8xJG/s805/LC+Lesson+11-64.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="406" data-original-width="805" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkk_Ifjn2Zdr_g63CuUh1efrCBpAqNvYl9svQOd8CTbYdIO33LeJ6yh2QksV_2vwrroEIxQ5t-UsPedQYrFcZZ1Z51CIWP-ryAC5W8aT4m-CwDAdGE3yyNXeb_5iJ_pmQP8xJG/s400/LC+Lesson+11-64.png" width="400" /></a></div>
Highlight "BrowseProducts" then press the green "Save and Close" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkc_uEC3fXwemWmox-Kgr8faZsUkWipEv6ekvq4GvEeUlJKdwKAH3lY5SUSyh0zSh9U15Pw8T5DHDz2P2C29SdTEskI1wbpCxQ0drg_yMn8pqne8va6f1zNS7dhNAONAAql6G_/s809/LC+Lesson+11-65.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="617" data-original-width="809" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkc_uEC3fXwemWmox-Kgr8faZsUkWipEv6ekvq4GvEeUlJKdwKAH3lY5SUSyh0zSh9U15Pw8T5DHDz2P2C29SdTEskI1wbpCxQ0drg_yMn8pqne8va6f1zNS7dhNAONAAql6G_/s400/LC+Lesson+11-65.png" width="400" /></a></div>
Notice how the "BrowseProducts" procedure has been added to the "UpdateOrder" tree. Click on the "Accept Changes" button to <b>save your work</b>.<br />
<br />
<h2>Generate Code</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidWTvjUJftT_664tGUdAi5fcxfClXJxvzQA4EBWODHwDO2e0V7hHTNBbw-YjKL2DHBhFYKXz6SeL7QTw6xLS3AgeHkm2LPxU3nWLzYQsSlYMuqaixT_OPhc_YdGY0VYM9hPHS6/s753/LC+Lesson+11-66.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="753" data-original-width="626" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidWTvjUJftT_664tGUdAi5fcxfClXJxvzQA4EBWODHwDO2e0V7hHTNBbw-YjKL2DHBhFYKXz6SeL7QTw6xLS3AgeHkm2LPxU3nWLzYQsSlYMuqaixT_OPhc_YdGY0VYM9hPHS6/s400/LC+Lesson+11-66.png" /></a></div>
Click on the "Generate the currently selected Application" button in the toolbar. Then right-click on "UpdateOrder" and choose "Module Source File" from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq8Z618ytTmMhDiPymaiH1ZJpihZ6oA1c1oo_ndy7FQ8NKrHS3vKRIFnDtiHY7_vjMnMhhYBC1e2aiiYcg51bEKjf1JclFrC3oqWGX2qhnYvFWZsJp6q-0odseEkK2l_WlLFzA/s806/LC+Lesson+11-67.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="774" data-original-width="806" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgq8Z618ytTmMhDiPymaiH1ZJpihZ6oA1c1oo_ndy7FQ8NKrHS3vKRIFnDtiHY7_vjMnMhhYBC1e2aiiYcg51bEKjf1JclFrC3oqWGX2qhnYvFWZsJp6q-0odseEkK2l_WlLFzA/s400/LC+Lesson+11-67.png" width="400" /></a></div>
The <b>Text Editor</b> appears, containing the generated source code for your UpdateOrder procedure. Notice that there is <i>a lot less code here</i> than there was in the Embeditor. All that generated code in the Embeditor was there to provide you with <i>context</i>, and to provide you with embed points with which to override methods, should you need to. However, <i>Clarion</i>’s Application Generator and ABC Templates are smart enough to only generate the code you actually need, when you actually need it.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />From the IDE Menu, choose "File" -> "Close" -> "File" to close the Text Editor. Now might be a good time to try out your application. You’ve got all the data entry portions completed and the only things lefts to do now are the reports, which we’ll get to in the next lesson.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You created a new Form procedure.</li>
<li>You created a "Scrolling-Form" metaphor Edit-in-place browsebox to update the Detail table.</li>
<li>You created a total column to total up the order.</li>
<li>You created a Formula to total each line item in the order.</li>
<li>You used the Embeditor to write your embedded source code within the context of template-generated code.</li>
<li>You used the power of OOP to extend the standard error handling functionality of the ABC Library.</li>
<li> You used the power of OOP to derive and override the Edit-in-place classes to extend the standard functionality of the ABC Library.</li>
<li>You generated source code to compare the difference between the code shown in the Embeditor to that which is actually generated.</li></ul>
We’re almost finished with this application. In the <a h.ref="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-7.html">next lesson,</a> we’ll create the application’s reports.<br />
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2022/10/adding-extensions-to-clarion.html">Adding Extensions to Clarion</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/07/learning-clarion-part-7.html">Learning Clarion (Part 7)</a> ]<br />
[ Learning Clarion (Part 6) ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">Learning Clarion (Part 5)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/12/learning-clarion-part-4.html">Learning Clarion (Part 4)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html">Learning Clarion (Part 3)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />
Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-27447972107965095482021-02-21T19:21:00.006+02:002021-02-26T15:39:48.278+02:00Are Messaging Apps Really Private? I Doubt It. Here's Why<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmfi_2XyOR1GzxHlJ726MycKtdaxp3aCP5hVczDauYd0Z4fUpa2CST_g_x4XVTylstDSufQAlAtuMLMsaAfcZk0ZRBfzmLKyxaZ8R2NZYwKVSlVF0i2xVU9xxkJqshu8mHgVmF/s640/ssl-eavesdropping.jpg" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="360" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmfi_2XyOR1GzxHlJ726MycKtdaxp3aCP5hVczDauYd0Z4fUpa2CST_g_x4XVTylstDSufQAlAtuMLMsaAfcZk0ZRBfzmLKyxaZ8R2NZYwKVSlVF0i2xVU9xxkJqshu8mHgVmF/s400/ssl-eavesdropping.jpg"/></a></div>
<a href="https://www.fact-reviews.com" target="_blank"><img src="https://www.fact-reviews.com/image/thumb_newsr.gif" align="left" width="64" height="64" hspace="4"></a>I used to believe that <i>WhatsApp</i>, <i>Signal</i> and <i>Telegram</i> offered "<a href="https://www.whatsapp.com/privacy" target="_blank">private</a>" messaging, particularly end-to-end encryption. I no longer belive that, in spite of what they all say. With all the recent flurry of controversy surrounding <i>WhatsApp</i>, I installed <i>Signal</i> and took another look at <i>Telegram</i>. I belong to a number of <i>WhatsApp</i> groups, and a few <i>Telegram</i> groups. Each <i>WhatsApp</i> chat states: <blockquote>"Messages and calls are end-to-end encrypted. No one outside of this chat, not even <i>WhatsApp</i>, can read or listen to them. Tap to learn more."</blockquote> I used to take this <a href="https://www.whatsapp.com/security/WhatsApp-Security-Whitepaper.pdf" target="_blank">at face value</a>, but I don't believe it any more.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>The first problem is what do they mean by end-to-end encryption? One would assume that each phone would create a direct link to the other phone, similar to the way <i>Skype</i> used to work. But that isn't the case. You can send a message to someone whose phone is switched off. The message can wait for days, if not weeks, before the other phone is switched on and the message is delivered. So the encrypted message is queued somewhere, presumably on the messaging app's servers, because the receiving party can receive the message even if the sending party's phone is off.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>The second problem is the message backups. <i>WhatsApp</i> does a regular backup to my <i>Google Drive</i>, and they don't claim that it is encrypted. Nor do they claim that the messages sitting on my phone are encrypted. Confiscate my phone or log in to my <i>Google Drive</i>, and you get a pretty good idea what I have been reading and writing. <i>Signal</i> can make encrypted backups to my phone, and I have to copy that backup off the phone to make sure I don't lose all that data if the phone goes up in smoke or gets confiscated. <i>Telegram</i> automatically backs up all my messages to its "cloud servers", whatever that means. These are not encrypted. "Secret chats" are encrypted and not backed up.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>The most obvious problem is this: each of these apps has a version you can run on your PC. So how does the PC get to display all the chats in plain, unecrypted text? No obvious information passes <a href="https://www.whatsapp.com/security/" target="_blank">from the phone to the PC</a>. If the phone stores a private key, the PC never asks for it. That means that either the server keeps a copy and passes it to the PC, or there is no private key on the phone. Therefore the server has the means to read the stored messages.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0><i>WhatsApp</i> displays a barcode on the PC screen that the phone needs to read when you visit <a href="https://web.whatsapp.com" target="_blank">https://web.whatsapp.com</a>. <del>No information is passed from the phone to the PC. It all comes from the server. I have confirmed this by watching the traffic leaving my phone after connecting using <i>WhatsApp Web</i>. On the PC I navigated to a group that posts a picture price list every day, and was able to go back to October 2020, when the group first started. Every picture that I had opened on the phone was available on the PC, without the phone uploading the data when I requested it on the PC.</del> It complained if I put the phone into flight mode, <del>but the PC was able to read the messages anyway</del> and the data was transferred from the phone's unencrypted store to the <i>WhatsApp Web</i> server. Hopefully it was sent using https, but <i>WhatsApp</i> doesn't say.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0><i>Telegram</i> and <i>Signal</i> both send a confirmation message to the phone when you setup the desktop app. But nothing appears to go in the other direction. They don't complain if the phone is in flight mode. So when any of these apps talk about "end-to-end" encryption they don't mean that your phone (or PC) is one end and <b>the person you are talking to</b> is the other end. Nope. The other end is their server.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>The implications of this are serious: your chat is "secure" in the way your internet banking is "secure": it uses https between your PC and its servers. Anyone trying to intercept the traffic between the user and the server is going to have a hard time decrypting it. For practical purposes we will say it's impossible. Even for the NSA and other (Big Brother) nation state agencies. It's <i>encrypted</i>, but it isn't <b>private</b>. Big difference.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>If the government wants to read my messages, all it needs to do is get a court order and instruct <i>WhatsApp/Signal/Telegram</i> to enable their PC application for my phone number, without sending the confirmation message or barcode to my phone. Presumably this would be in read-only mode so they don't give the game away by typing in something by mistake, or showing that the message has been received and read when I haven't done that yet. But there is nothing on my phone that they need to read my messages. If there was, the PC app would need it too. It doesn't. So either the servers have a copy of my private key, or they don't need a copy because they don't use public-private key pairs.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Whatever the reason, it's not private, even if it is encrypted. Leave a comment if you think I missed something obvious.<br><br>
<b>Update 25th February 2021</b>: From the <a href="https://www.whatsapp.com/security/WhatsApp-Security-Whitepaper.pdf" target="_blank">WhatsApp white paper</a>:
<blockquote><b>Defining End-to-End Encryption</b><br>
WhatsApp defines end-to-end encryption as communications that remain
encrypted from a device controlled by the sender to one controlled by the
recipient, where no third parties, not even WhatsApp or our parent company
Facebook, can access the content in between. A third party in this context
means any organization that is not the sender or recipient user directly
participating in the conversation.</blockquote>
From their "<a href="https://www.whatsapp.com/privacy" target="_blank">privacy page</a>":<blockquote><b>End-to-end encryption</b><br>
Conversations in end-to-end encrypted chats are clearly labeled with a gold message; these messages and calls stay between you, and no one else can read or listen to its content, not even WhatsApp.<br>
<b>Messages are stored on your device</b><br>
Your messages belong to you. That's why your messages are stored on your phone, and we don't share them with advertisers.</blockquote>The messages <b>are not only stored on my device</b>: they can be displayed on a PC. They are backed up to Google Drive. If "and no one else can read or listen to its content, not even WhatsApp" then how does web.whatsapp.com display my decrypted content when I ask it to? My phone didn't suddenly become a web server. Did it decrypt the content and then send it unencrypted to their web server? Did it send my <b>private key</b> to their server so it could decrypt my content from its backup copy and display it? They don't say.<br>
From the Whitepaper:<blockquote><b>Client Registration</b><br>
At registration time, a WhatsApp client transmits its <b>public</b> Identity
Key, <b>public</b> Signed Pre Key (with its signature), and a batch of
<b>public</b> One-Time Pre Keys to the server. The WhatsApp server
stores these public keys associated with the user’s identifier.</blockquote>Great. Public keys are supposed to be public. But in order to decrypt my messages you either need my <i>private key</i> or the <i>private key</i> of the reciptient. Which one does their web server or PC app use? They don't say.<br>
<br>
<b>Update 26th February 2021</b>: I did some more careful measurements with WhatsApp Web. There is a discussion group I am part of that has 34MB of picture and file data, according to the app. During the time I displayed most of these images, after having cleared my browser cache, my mobile data usage went from 665.31MB to 671.56MB, a difference of 6.25MB. So presumably this data was sent by the phone app to the WhatsApp Web server, so it could be displayed in my browser. So I have <del>deleted</del> some of my original statements in the light of the new evidence.
<br>
<br>Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-28448669891147386092021-02-21T12:01:00.010+02:002021-07-31T21:09:09.257+02:00Learning Clarion (Part 5)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This follows on from <a href="https://donnedwards.openaccess.co.za/2020/12/learning-clarion-part-4.html">Learning Clarion (Part 4)</a>. In the lesson below, we’ll create the procedures that will maintain the "Product" data table<br />
<br />
<h1>Lesson 9: Copying Procedures</h1>
Now that we’ve created the Customer browse procedure, we can reuse much of that work for the next procedure by copying the procedure, then changing its columns. In this lesson, we’ll copy the BrowseCustomers procedure to create the BrowseProducts procedure.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />We will also use "Embed points" to write "embedded source code" to call the BrowseProducts procedure from your application’s menu and toolbar. This will introduce you to the numerous points at which you can add a few (or many) lines of your own source code to add functionality to any procedure.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTGZU6aDdC45GhMevl91lBOtx4Gi3nkReipqYQG_rhaWzfSspozl_jcLMSEsl7repiqFJGrClsT8B65YxpsJrGAgI2moPeLq41CqvKvvjwmhguE7Y3clcJWCthYcATygp_b1L/s799/LC+Lesson+9-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="676" data-original-width="799" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTGZU6aDdC45GhMevl91lBOtx4Gi3nkReipqYQG_rhaWzfSspozl_jcLMSEsl7repiqFJGrClsT8B65YxpsJrGAgI2moPeLq41CqvKvvjwmhguE7Y3clcJWCthYcATygp_b1L/s400/LC+Lesson+9-01.png" width="400" /></a></div>
As you recall, when we created your "Browse", "Products" menu item, and the toolbar button labelled "Products," we didn’t specify a procedure to call when the end user executed them. We’ll start by creating the procedure to call. Highlight the "BrowseCustomers" procedure in the Application Tree dialog because we want to copy it. From the main IDE menu, click on "Application" and choose "Copy Procedure".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjzZZW8k-Y-1BbhmjO82prejFwLTQbiPFscXHA8CvM5MMvuYeS32I1UWm5CYKfFtv9-Npek_cSTZgFG5kMNWdxhNEuvIze87pq0yyt2WAvwnfbaWr1ODFYpCYlPLMzmPDSwNCe/s605/LC+Lesson+9-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="370" data-original-width="605" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjzZZW8k-Y-1BbhmjO82prejFwLTQbiPFscXHA8CvM5MMvuYeS32I1UWm5CYKfFtv9-Npek_cSTZgFG5kMNWdxhNEuvIze87pq0yyt2WAvwnfbaWr1ODFYpCYlPLMzmPDSwNCe/s400/LC+Lesson+9-02.png" width="400" /></a></div>
Change the text in the "New Procedure" dialog box to read "BrowseProducts" and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6nggxbNcrSqQMcTKZbphE74IkSBJA8CydYfMcsXJBS1AWAI4wzQEaEjhV1esMjsjWJqZzaEcRGf39xyBxr5rjawAOG_RUbcoogwfaHEwtF4TSQ9Xrp6VDwTScglH4QQhfhw1a/s605/LC+Lesson+9-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="605" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6nggxbNcrSqQMcTKZbphE74IkSBJA8CydYfMcsXJBS1AWAI4wzQEaEjhV1esMjsjWJqZzaEcRGf39xyBxr5rjawAOG_RUbcoogwfaHEwtF4TSQ9Xrp6VDwTScglH4QQhfhw1a/s400/LC+Lesson+9-03.png" width="400" /></a></div>
Because the "UpdateCustomer" procedure is nested under the "BrowseCustomers" procedure (the one you are copying), the "Procedure name clash dialog appears". This offers you options on how to handle the clashing procedures. Press the "Prompt" button. By doing this, you tell the Application Generator to let you have the opportunity to rename all the clashing procedures, or not.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWYEuJPFg7flTcfyePA_xAZ_Gk51jo1VMQgIIVAslKy0B-rQWR2FJXpRvrnpQPrEbwbChENwOoiY5OZ_b1LJrMJmukDM-Ud14-rPD0JFA-BRDmUuM4jJXA_Tm2DeDpiYrMidyj/s606/LC+Lesson+9-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="586" data-original-width="606" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWYEuJPFg7flTcfyePA_xAZ_Gk51jo1VMQgIIVAslKy0B-rQWR2FJXpRvrnpQPrEbwbChENwOoiY5OZ_b1LJrMJmukDM-Ud14-rPD0JFA-BRDmUuM4jJXA_Tm2DeDpiYrMidyj/s400/LC+Lesson+9-04.png" width="400" /></a></div>
We want our new "BrowseProducts" procedure to call a procedure to update "Product" rows, not "UpdateCustomer", so click on "Rename" so we can specify the correct name.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOraiSgnJbjHmNuekfCpoRl8LMMuiKukyIwE0QH8IvsiLq-MvH5kQ43YFILDMb4ukO39DhOH_gd1fK0BRyJJEwfQB_AWdv1cC5j-SZP03d28eQTJt4O43XryI7eDb731qrbwHp/s605/LC+Lesson+9-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="382" data-original-width="605" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOraiSgnJbjHmNuekfCpoRl8LMMuiKukyIwE0QH8IvsiLq-MvH5kQ43YFILDMb4ukO39DhOH_gd1fK0BRyJJEwfQB_AWdv1cC5j-SZP03d28eQTJt4O43XryI7eDb731qrbwHp/s400/LC+Lesson+9-05.png" width="400" /></a></div>
Type in the new procedure name, "UpdateProduct" and click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIUO0RFIcjwXF2Uw8lBm_vHuAt87ac5n7p6Jocr__rhKMWo68NVxWkiEgqE9edGy2EQ6c9-d5L90Mo3fBEirEFAR4XH18i4ZnbS5dIK1dRk59Qi6j2JMidFziz-1UNlN6jI_4V/s603/LC+Lesson+9-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="583" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIUO0RFIcjwXF2Uw8lBm_vHuAt87ac5n7p6Jocr__rhKMWo68NVxWkiEgqE9edGy2EQ6c9-d5L90Mo3fBEirEFAR4XH18i4ZnbS5dIK1dRk59Qi6j2JMidFziz-1UNlN6jI_4V/s400/LC+Lesson+9-06.png" width="400" /></a></div>
Notice how the Application Tree now has the copied "BrowseProducts" procedure, and its associated (empty) "UpdateProduct" procedure. They look "disconnected" from the other procedures because no other procedure calls them (yet). We’ll do that next.<br />
<br />
<h2>Working with Embed Points</h2>
The <i>Clarion</i> templates allow you to add your own customized code to many predefined points inside the standard code that the templates generate. It’s a very efficient way to achieve maximum code reusability and flexibility. The point at which your code is inserted is called an <b>Embed Point</b>. Embed points are available at all the standard events for the window and each control, and many other logical positions within the generated code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />In this lesson you add embedded source code (using a Code template that will write the actual source for you) at the points where the end user chooses the "Browse", "Products" menu item, and at the point where the end user presses the "Products" button on the application’s toolbar.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiCTzuerhh_ocpT-ZPctMna2iqkEM0KPJQn_KSDTo6pj3SEDkxqYhW9E-0vOmkx_Z3-FiVT9QfwYWhL-wgSvTlWeaCY-XENFndSL4Ltp4AgI3YhcJtbKoEvbMvFVAPS6upe7G1/s603/LC+Lesson+9-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiCTzuerhh_ocpT-ZPctMna2iqkEM0KPJQn_KSDTo6pj3SEDkxqYhW9E-0vOmkx_Z3-FiVT9QfwYWhL-wgSvTlWeaCY-XENFndSL4Ltp4AgI3YhcJtbKoEvbMvFVAPS6upe7G1/s400/LC+Lesson+9-07.png" width="400" /></a></div>
Right-click on the "Main" procedure in the Application Tree. There are several ways to access the embedded source code points within a procedure. Two of them appear on the popup menu that you now see.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The first is the <b>Embeds</b> selection, which calls the <i>Embedded Source</i> dialog to show a list of all the embed points within the procedure.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The second is the <b>Embeditor Source</b> selection, which actually generates source code for the procedure and calls the "Embeditor" (the Text Editor in embed point edit mode) to allow you to directly edit all the embed points within the context of generated source. The generated source code is "greyed out" to indicate that you cannot edit it, and every possible embed point in the procedure is identified by comments, following which you may type your code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />There are advantages to each method of working in embed points, so we’ll cover both methods during this lesson. First, we’ll use the Embedded Source dialog. Choose "Embeds" from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsk8FleEy1NX_55niasXjXiXNzZN0MBOflWoFjknyYx-uDqGNwRZk5yDYQmXSEM5arzMQ_Hzdf2SGtm4VGXSgL4_fr2egBs89bZyFuxCTnwVS2B5wWYb2_OLg4tPp3bIsqQy7T/s607/LC+Lesson+9-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="607" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsk8FleEy1NX_55niasXjXiXNzZN0MBOflWoFjknyYx-uDqGNwRZk5yDYQmXSEM5arzMQ_Hzdf2SGtm4VGXSgL4_fr2egBs89bZyFuxCTnwVS2B5wWYb2_OLg4tPp3bIsqQy7T/s400/LC+Lesson+9-08.png" width="400" /></a></div>
The <i>Embeds Tree</i> dialog appears, allowing access to all the embed points in the procedure. (You can also get here from the "Embeds" button on the Procedure Properties window, but the popup menu is quicker.) This list is either sorted alphabetically or in the order in which they appear in the generated source, depending on whether you have the Sort Embeds Alphabetically box checked in "Setup", "Application Options". Press the "Contract All" button on the toolbar. This will make it easier to locate the specific embed point you need.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAUzydMUdepnH-CbH_uZ6pBpZySmn6NeLWcHJMkOTaqSqGecSBr9F8l4ON1wZ1hmDCbsswB5-5Vj-kvWl7WtTfgoIPeZTOi9fJuFgnWO16fL150kq_kQ1B4SDCxV43ZELueoWF/s602/LC+Lesson+9-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="602" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAUzydMUdepnH-CbH_uZ6pBpZySmn6NeLWcHJMkOTaqSqGecSBr9F8l4ON1wZ1hmDCbsswB5-5Vj-kvWl7WtTfgoIPeZTOi9fJuFgnWO16fL150kq_kQ1B4SDCxV43ZELueoWF/s400/LC+Lesson+9-09.png" width="400" /></a></div>
Type in "BrowseProducts" in the search bar. This is a quick way to find a particular procedure. Or you can click on the "+" sign next to "Control Events" and scroll down to "?BrowseProducts".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjacXh_hkccS04Ze-WbJQQjAMmJ1ny4UMQbf59wSEKMgBXINC6ZiAVI1A8GzdWxq0bZpaNmFhFn8etTU7rkiZ9pd48MWZR2W-ZKlYZcnfrjKbKNE9KzyGuwf0mngG8qarnLiaji/s869/LC+Lesson+9-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="869" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjacXh_hkccS04Ze-WbJQQjAMmJ1ny4UMQbf59wSEKMgBXINC6ZiAVI1A8GzdWxq0bZpaNmFhFn8etTU7rkiZ9pd48MWZR2W-ZKlYZcnfrjKbKNE9KzyGuwf0mngG8qarnLiaji/s400/LC+Lesson+9-10.png" width="400" /></a></div>
Click on the "+" sign next to "?BrowseProducts" and select "Accepted". The "Accepted" event for this menu selection marks the point in the generated code that executes <i>when the user chooses the menu command</i>. Click on the "Insert" button.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The Select embed type dialog appears to list all your options for embedding code. You may simply Call a Procedure, write your own <i>Clarion</i> language Source in the Text Editor, or use a Code template to write the source code for you. This is one advantage to editing embed points from within the Embedded Source dialog: you can use Code templates to write the code for you instead of writing it yourself.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Scroll down to the "Initiate Thread" template. Click on it and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Be3ESJ-U1aPKzmV51LLzY7OTMGcf-UBnSKKDSbpknV6USyuVFy4YstdUuKDK51uPmJniX5uphdA-9U21SblqHAhDQWlP0JNsdIOm_Vh6BCe1NgyXhR7x2a31dBokgWsqp2wH/s830/LC+Lesson+9-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="830" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4Be3ESJ-U1aPKzmV51LLzY7OTMGcf-UBnSKKDSbpknV6USyuVFy4YstdUuKDK51uPmJniX5uphdA-9U21SblqHAhDQWlP0JNsdIOm_Vh6BCe1NgyXhR7x2a31dBokgWsqp2wH/s400/LC+Lesson+9-11.png" width="400" /></a></div>
A Code template usually provides just a few prompts and instructions on its use. It gathers the information it needs from you to write its executable code, which it then inserts into the standard generated code produced by the Procedure template directly into this embed point. This Code template is designed to start a new execution thread by calling the procedure you name using the START procedure (as shown in the window).
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Choose the "BrowseProducts" procedure from the drop-down list of available procedure names, and click "OK". This names the procedure to START when the user chooses the menu item. This is the name of the procedure you previously copied.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieorVgHikz6NfXV5X93B9pnigs03PkwS_LPw16RpkwV-lUtnFN-k8apEryI7LNjzhstt5MsiflsU0K3l9rp08tWhyEqjfB_h4PBZyYzgKRcbW-ylA0zFk9RApzifGNkAZeBvka/s686/LC+Lesson+9-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="628" data-original-width="686" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieorVgHikz6NfXV5X93B9pnigs03PkwS_LPw16RpkwV-lUtnFN-k8apEryI7LNjzhstt5MsiflsU0K3l9rp08tWhyEqjfB_h4PBZyYzgKRcbW-ylA0zFk9RApzifGNkAZeBvka/s400/LC+Lesson+9-12.png" width="400" /></a></div>
Notice that there are some up and down buttons and a spin box on the right side of the window that allow you to select a Priority. These are important. The templates generate much of the code they write for you into these same embed points. Sometimes, the code you want to write should execute before any template-generated code, and sometimes it should execute after, and sometimes it should execute somewhere between various bits of generated code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The exact placement of your code within the embed point is determined by the Priority number. This provides you with as much flexibility in placing your embed code as possible. The Priority numbers themselves do not matter, but the logical position within the generated code does, and that’s why this dialog also shows comments which identify the embed priorities. Don’t worry, there’s more coming on this issue later that’ll help make it clearer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbYonQUYM1nMXeFvWVvwPPFt4Gv3FIMjZCDOxEWnUs6InckltAoW_N-sv_jD5fFfEdJQ7XI7VQ4SOv3h7zIcU3mJ2cfy8sfZIV75EqF8hMqvXzOie_B2_1XpITPNeSGqy8a5fH/s510/LC+Lesson+9-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="352" data-original-width="510" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbYonQUYM1nMXeFvWVvwPPFt4Gv3FIMjZCDOxEWnUs6InckltAoW_N-sv_jD5fFfEdJQ7XI7VQ4SOv3h7zIcU3mJ2cfy8sfZIV75EqF8hMqvXzOie_B2_1XpITPNeSGqy8a5fH/s400/LC+Lesson+9-13.png" width="400" /></a></div>
At this point, you could do the same thing to call the BrowseProducts procedure from the <i>Product button</i>. However, there’s an easier way to write this code again: just Copy and Paste it from one embed point to another. So, with the BrowseProducts <i>menu</i> embed point still highlighted, click on the "Copy" button as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJUqDACl3y59AEG0YhW9qSSq84By2Uvfxog57pU_Rlu35SEhBs5QTIr16tZ9tlR1nOZ1Jd32pWIYku_JnSO5JULupgAe5fiw4k4Z6XFGLGYh99JaZD02PVLsl74fXZj5KUX9m/s680/LC+Lesson+9-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="680" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxJUqDACl3y59AEG0YhW9qSSq84By2Uvfxog57pU_Rlu35SEhBs5QTIr16tZ9tlR1nOZ1Jd32pWIYku_JnSO5JULupgAe5fiw4k4Z6XFGLGYh99JaZD02PVLsl74fXZj5KUX9m/s400/LC+Lesson+9-14.png" width="400" /></a></div>
Search for the "ProductButton" in the search bar, or just scroll down until you find it. Click on the "Accepted" embed point and press the "Paste" button. When the "Procedure name clash" dialog appears to warn you that the same procedure has already been used, click on "Same" because we want to use the same procedure. Now click on the green "Save and Close" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAvmEwoD_m_R9p4wStSsvMiF48NievT95i0FHvoHD0EttHVNk-M4YZ-cz_Z2Qsl7Ss_zh4FBSPkQRuYHkisWLyl5GVsa6AZAk0IykqnQ5QDm4pPtteyhbxXWecxWMXQrlLqkBG/s678/LC+Lesson+9-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="502" data-original-width="678" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAvmEwoD_m_R9p4wStSsvMiF48NievT95i0FHvoHD0EttHVNk-M4YZ-cz_Z2Qsl7Ss_zh4FBSPkQRuYHkisWLyl5GVsa6AZAk0IykqnQ5QDm4pPtteyhbxXWecxWMXQrlLqkBG/s400/LC+Lesson+9-15.png" width="400" /></a></div>
The BrowseProducts procedure now "connects" to the Main procedure. Now you can customize the copied procedures for the Product table, which we copied from the BrowseCustomer procedure.<br />
<br />
<h2>Modify the Browse</h2>
Click on the BrowseProducts procedure and notice that the description still says, "Browse Customers".
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpnG5tcJoBkNKMhlO1ckyUH-IyzGbuXBiJnvRnZ4edl3fJTHf2sZr1f-32zBWUmja1pj7rmkrcLaDcptDvXGyoBYShpmvUGVG69KrGZuILpBoDDVTS1GzjLYIzmVESGIkDxA0d/s522/LC+Lesson+9-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="396" data-original-width="522" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpnG5tcJoBkNKMhlO1ckyUH-IyzGbuXBiJnvRnZ4edl3fJTHf2sZr1f-32zBWUmja1pj7rmkrcLaDcptDvXGyoBYShpmvUGVG69KrGZuILpBoDDVTS1GzjLYIzmVESGIkDxA0d/s400/LC+Lesson+9-16.png" width="400" /></a></div>
Click on the "Properties" button and change the description to "Browse Products". Click on the green "Save and Close" button. Notice that the description is fixed.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVQURGWI_gkPBQJ-ub_w1_-V16fi3SA1WjY27mU3WPWTB31tsbXgo4RxOQpxnRFxAwHJ7_ri-ZEQ3AiS56e8n4rg5aoYeKT1vWXcO_wVKXuicjxQDYf1qqFySrtcGOGDfOGDgY/s684/LC+Lesson+9-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="684" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVQURGWI_gkPBQJ-ub_w1_-V16fi3SA1WjY27mU3WPWTB31tsbXgo4RxOQpxnRFxAwHJ7_ri-ZEQ3AiS56e8n4rg5aoYeKT1vWXcO_wVKXuicjxQDYf1qqFySrtcGOGDfOGDgY/s400/LC+Lesson+9-17.png" width="400" /></a></div>
Now we need to change the fields that are displayed. Click on the "Window" button to open the window designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6dt87pijN9eMzljuUmdTDBU9hdlMEsxNY6_zCPbKep_cbeCibAWybfQuWdOHTZtMcumWRjhceqsRu93pO9BCyIdld9hw81Qs9B3VIYqCfTpYzZuHhttH5dP_gyzrp9e97aG5/s880/LC+Lesson+9-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="536" data-original-width="880" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi6dt87pijN9eMzljuUmdTDBU9hdlMEsxNY6_zCPbKep_cbeCibAWybfQuWdOHTZtMcumWRjhceqsRu93pO9BCyIdld9hw81Qs9B3VIYqCfTpYzZuHhttH5dP_gyzrp9e97aG5/s400/LC+Lesson+9-18.png" width="400" /></a></div>
Change the window Title to "Browse Products" as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ZQXfbHdl7Hu3sEEPlLvg-MEiK5Sy2tFuzdZ3j30-k0tig79ZFzuYiK-eZ_BUvMCAmc0v1XDbUAXjqeN-5irSuSIJhmMWpa8BprQ6IA-T6bcaOmGilZWyu8LJnUgIvNJGVytb/s670/LC+Lesson+9-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="601" data-original-width="670" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5ZQXfbHdl7Hu3sEEPlLvg-MEiK5Sy2tFuzdZ3j30-k0tig79ZFzuYiK-eZ_BUvMCAmc0v1XDbUAXjqeN-5irSuSIJhmMWpa8BprQ6IA-T6bcaOmGilZWyu8LJnUgIvNJGVytb/s400/LC+Lesson+9-19.png" width="400" /></a></div>
Click on the main List Box, and then right-click and choose "List Box format ..." to open the list box formatter.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTzv7dUTgnznT52V-HhPsMKq7SOZnsIiB3fiK2nANRC73gZtawaYQ0HXWv5knhLL0sv7GGNGqEayCt8IA1tDr8jPQVTpWL6oFa-zTFBsjI8hOeZET4UZFYctEGr_HcqGIXfmV4/s561/LC+Lesson+9-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="547" data-original-width="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTzv7dUTgnznT52V-HhPsMKq7SOZnsIiB3fiK2nANRC73gZtawaYQ0HXWv5knhLL0sv7GGNGqEayCt8IA1tDr8jPQVTpWL6oFa-zTFBsjI8hOeZET4UZFYctEGr_HcqGIXfmV4/s400/LC+Lesson+9-20.png" width="400" /></a></div>
Notice that all the fields still refer to the Customer table. Use the "Remove" button to remove <i>all</i> the fields shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPuy6KsOqRLb6X2vB7QIxjhRPj_BuxFymvyc8h81QPjJZP1ElV_tFtFVc0cg5vipVUt_YvTLrPRrJRA4j4lcT9X4FMf4Qx3xwt5T6xI8_pmOM8z79EavoOo0jbxdpoERZlP43/s725/LC+Lesson+9-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="540" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLPuy6KsOqRLb6X2vB7QIxjhRPj_BuxFymvyc8h81QPjJZP1ElV_tFtFVc0cg5vipVUt_YvTLrPRrJRA4j4lcT9X4FMf4Qx3xwt5T6xI8_pmOM8z79EavoOo0jbxdpoERZlP43/s400/LC+Lesson+9-21.png" width="400" /></a></div>
Now click on the "Add Field" button. It will display the current table and fields, none of which are the ones we want. Click on the "Customer" table and then use the "Delete" button to remove it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitDVqMBxLI4OPbm3QQzH0rkbB3sUnlO4ylThNhgXuL_gO12CdAODOCR_PzYL3DA1f2RQnYrS3H2iPJloBPfrHC5DKCubBskkr2h0CKnZkA1Sv4OzoIPH6QqVxVa4dWIvnXAgbG/s725/LC+Lesson+9-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="451" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitDVqMBxLI4OPbm3QQzH0rkbB3sUnlO4ylThNhgXuL_gO12CdAODOCR_PzYL3DA1f2RQnYrS3H2iPJloBPfrHC5DKCubBskkr2h0CKnZkA1Sv4OzoIPH6QqVxVa4dWIvnXAgbG/s400/LC+Lesson+9-22.png" width="400" /></a></div>
Click on the "<ToDo>" word that replaced the "Customer" table and then the "Add" button. This will open a list of tables. Click on "Product" and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOpt9jOUCbB5b_mjc-7of0DWvpNB1cz5LXr8xphM4jENPe-bgiUbXCLRmYrtDX0_X0LjuqtQDz-xFIMVUkxspEXYXHVmuwg-Hdoltqk1Eo3b1BAqaxIaH2oDBZ3nZ_azGIQpA9/s738/LC+Lesson+9-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="449" data-original-width="738" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOpt9jOUCbB5b_mjc-7of0DWvpNB1cz5LXr8xphM4jENPe-bgiUbXCLRmYrtDX0_X0LjuqtQDz-xFIMVUkxspEXYXHVmuwg-Hdoltqk1Eo3b1BAqaxIaH2oDBZ3nZ_azGIQpA9/s400/LC+Lesson+9-23.png" width="400" /></a></div>
Use the "Change" button to change the default sort key to "KEYPRODDESC" and click "Select". The "Select Column" dialog now lists the correct table and columns. Click on "ProdNumber" and then the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimWAw0r6Mt61axH7DRPCUUFBJQ2MKiT_uhcXcvq2BsJ_ENcGVUaTQSnqcSpT3JEBRju3BEahARKHM9e5EQq_qSA-vXPTxs_PxG3QypJRW_MWVGsjJfZKlfI1cXCiDu7VV1HNij/s561/LC+Lesson+9-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimWAw0r6Mt61axH7DRPCUUFBJQ2MKiT_uhcXcvq2BsJ_ENcGVUaTQSnqcSpT3JEBRju3BEahARKHM9e5EQq_qSA-vXPTxs_PxG3QypJRW_MWVGsjJfZKlfI1cXCiDu7VV1HNij/s400/LC+Lesson+9-24.png" width="400" /></a></div>
Check that the RightBorder and Resizeable properties are both "True", and change the Header Text property to "Prod #". The width should be 24.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJXVQ7Ai_WA_IK8xi7vAv97XEpbLWYUaZ8z1RoSw9B_NU21rt73Dr6f-HRFg806kPd1DrtPi8kFYqIW_Koc5qo5r5zA1DXxtjQFzjUp0HR3ZIaYAYBj5zS4hgGvQuKnayljzs/s558/LC+Lesson+9-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="548" data-original-width="558" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKJXVQ7Ai_WA_IK8xi7vAv97XEpbLWYUaZ8z1RoSw9B_NU21rt73Dr6f-HRFg806kPd1DrtPi8kFYqIW_Koc5qo5r5zA1DXxtjQFzjUp0HR3ZIaYAYBj5zS4hgGvQuKnayljzs/s400/LC+Lesson+9-25.png" width="400" /></a></div>
Use the Add Field button to select "ProdDesc". Check that the RightBorder and Resizeable properties are both "True". The width should be 120.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfMsUgR0tqoR6lGF4UKnLv25jPaQ0jPrxfXuYfjcPlJj5YEDmxSXwUDZsrARIsTXwzDG_agsCYZK8BRC3Fx4Wln2chPXidxL42j9WtEtLIYUkQ3xe8UqHaQXYxH14ta3z1dhC/s562/LC+Lesson+9-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfMsUgR0tqoR6lGF4UKnLv25jPaQ0jPrxfXuYfjcPlJj5YEDmxSXwUDZsrARIsTXwzDG_agsCYZK8BRC3Fx4Wln2chPXidxL42j9WtEtLIYUkQ3xe8UqHaQXYxH14ta3z1dhC/s400/LC+Lesson+9-26.png" width="400" /></a></div>
Use the Add Field button to select "ProdAmount". Check that the RightBorder and Resizeable properties are both "True". The width should be 32.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTCoLCT6P4lDX80G639U-0U4c2PMLEMIIIS421gZAsm5jxKZzQfUaGQk1R6z7iPd414oLJ2pG8q4Y8RmpiArlvNjdVrUaD4xw-eP3Y033QZnEFgXCDxHjiQFSh_WnYnTzkMOBl/s562/LC+Lesson+9-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTCoLCT6P4lDX80G639U-0U4c2PMLEMIIIS421gZAsm5jxKZzQfUaGQk1R6z7iPd414oLJ2pG8q4Y8RmpiArlvNjdVrUaD4xw-eP3Y033QZnEFgXCDxHjiQFSh_WnYnTzkMOBl/s400/LC+Lesson+9-27.png" width="400" /></a></div>
Use the Add Field button to select "TaxRate". Check that the RightBorder and Resizeable properties are both "True". Click "OK" to close the list box formatter.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSHxt6D0rP9CN1BK_YSO2wVLylfUPmVFN9g3_vNY0IAbQnjr2xJ1NYEGZSV-EkTuO3kr2SmL1IR2Rm-wRyUlWm49utQJSLxwoCNhZwLd6g5CYELrIhAKqAF88HaajTl3wpMAF/s812/LC+Lesson+9-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="568" data-original-width="812" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSSHxt6D0rP9CN1BK_YSO2wVLylfUPmVFN9g3_vNY0IAbQnjr2xJ1NYEGZSV-EkTuO3kr2SmL1IR2Rm-wRyUlWm49utQJSLxwoCNhZwLd6g5CYELrIhAKqAF88HaajTl3wpMAF/s400/LC+Lesson+9-28.png" width="400" /></a></div>
Click to the right of the "by Zip Code" tab to select the entire tab sheet. Confirm this by looking for the phrase "SHEET (Use = '?SHEET1')" in the properties window on the right. Then press the "Delete" key to remove the sheet.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-gF4osPc4uVqyv0U_GpvBG9v5Z9piONsJsmbmov4KUdd7aaOcV0LjuQeThsR7AICkNgRjgzdLWPXPw0XBUr7NI7yVEvv7_Ip3ki1Z7qPigi5Gmmaqhb51_GAcadZe6E2dwTi6/s518/LC+Lesson+9-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="518" data-original-width="518" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-gF4osPc4uVqyv0U_GpvBG9v5Z9piONsJsmbmov4KUdd7aaOcV0LjuQeThsR7AICkNgRjgzdLWPXPw0XBUr7NI7yVEvv7_Ip3ki1Z7qPigi5Gmmaqhb51_GAcadZe6E2dwTi6/s400/LC+Lesson+9-29.png" width="400" /></a></div>
Use the green "Save and Close" button to save your work. Then click on the "Accept changes" button to <b>save your work</b>. Return to the "Browse Products" design window.<br />
<br />
<h2>Add an Incremental Locator</h2>
If the list of Products to display is very long, the user can do a lot of scrolling before finding the specific Product they want. By default, all BrowseBox Control Templates have a "Step" row locator that allows the user to press the first letter of the <i>value in the sort key column</i> to get to the first row that begins with that letter.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Sometimes with large databases, however, the user needs to enter the <i>first several letters</i> to get close to the row they want. An Incremental locator provides that functionality by specifying a string control for the user to see the information they type. As they type, the list scrolls to the first row matching the data the user entered thus far. This works best with STRING keys, such as the Product Description key.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzYIjadSEVgeyu_mUkfhngZmV1OgUU_H-sIgVLf4lGhcAuhJcpkBYpxZUVgUVi4RxEIH4KEUTAS7H9UYXjsyiEF_45Aknum-Z_Z79PyyMEeFBBGZAZ6FdOyHLfwfsgDt9a9TM/s835/LC+Lesson+9-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="486" data-original-width="835" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDzYIjadSEVgeyu_mUkfhngZmV1OgUU_H-sIgVLf4lGhcAuhJcpkBYpxZUVgUVi4RxEIH4KEUTAS7H9UYXjsyiEF_45Aknum-Z_Z79PyyMEeFBBGZAZ6FdOyHLfwfsgDt9a9TM/s400/LC+Lesson+9-30.png" width="400" /></a></div>
Use the Toolbox, and select the "STRING" control. Drag it to the top left of the list box control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoOorkPtQV-joCV0z7MZlNXN88nR6QC_5qVmQJFKEUvzd-E10UeB3veaow1m17I1bXE4JNP0QuHlfopE7nSNfQ9ivGvmpe_xHTLLa1GHoB4Kcpa_eayISx2c7sPNf4GIAPvgmV/s823/LC+Lesson+9-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="823" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoOorkPtQV-joCV0z7MZlNXN88nR6QC_5qVmQJFKEUvzd-E10UeB3veaow1m17I1bXE4JNP0QuHlfopE7nSNfQ9ivGvmpe_xHTLLa1GHoB4Kcpa_eayISx2c7sPNf4GIAPvgmV/s400/LC+Lesson+9-31.png" width="400" /></a></div>
Use the properties window to set the "IsPicture" property to "True", and use the ellipsis to the right of the "Use" property to choose the "ProdDesc" field from the Product table. Use the green "Save and Close" button to save your work and return to the main window. Click on the "Accept changes" button to <b>save your work</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUi8EsnbMzCp_B6gT0HqCP-Xq17iJM5HS_PJUsAOF9X5x2Kqylhm_W8zAiRFZNNTQXTh49wEPCvGnA-IxOmwXiuj1VQjULRszbRbIb3Algv7N8Grll_HqyprwLHGzg_9hsj9Mz/s585/LC+Lesson+9-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="513" data-original-width="585" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUi8EsnbMzCp_B6gT0HqCP-Xq17iJM5HS_PJUsAOF9X5x2Kqylhm_W8zAiRFZNNTQXTh49wEPCvGnA-IxOmwXiuj1VQjULRszbRbIb3Algv7N8Grll_HqyprwLHGzg_9hsj9Mz/s400/LC+Lesson+9-32.png" width="400" /></a></div>
From the main screen, ensure that the "BrowseProducts" procedure is still highlighted, then click on the "Extensions" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ6s2IYCvki8npiL6bZt1DP6cIBU-5033aQr-yc1GFisgLNjDcvM1fof5AoUszW_PhidpvyiTOTLT9U9IfMWmiRe1x_y9DxwqxBRqIofrBqvgnQwsNagzkLrOnAE2PR8BGflF4/s833/LC+Lesson+9-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="595" data-original-width="833" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ6s2IYCvki8npiL6bZt1DP6cIBU-5033aQr-yc1GFisgLNjDcvM1fof5AoUszW_PhidpvyiTOTLT9U9IfMWmiRe1x_y9DxwqxBRqIofrBqvgnQwsNagzkLrOnAE2PR8BGflF4/s400/LC+Lesson+9-33.png" width="400" /></a></div>
In the "Extensions" tab, click on "Browse on Product()" and then click the "properties" button. Change to the "Conditional Behaviour" tab and use the "Delete" button to remove the two SHEET choices that applied to the Customer browse but are no longer relevant to the Product browse. After all, we have also deleted the SHEET control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH6BZxvyHdBEr9tRBMJZ-PiKfkaTnUayb6h6G8cjWdj7N2XRQTmboTbdMKYG7DFpHRRHKJ5StpcUDJX4W9HdbCTrR-nqnGEiCM7MNiyR3NxJXD2n7NzdCnwffGyfqc84WFKTKO/s846/LC+Lesson+9-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="687" data-original-width="846" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH6BZxvyHdBEr9tRBMJZ-PiKfkaTnUayb6h6G8cjWdj7N2XRQTmboTbdMKYG7DFpHRRHKJ5StpcUDJX4W9HdbCTrR-nqnGEiCM7MNiyR3NxJXD2n7NzdCnwffGyfqc84WFKTKO/s400/LC+Lesson+9-34.png" width="400" /></a></div>
Change to the "Default Behaviour" tab, and click on the "Locator Behaviour" button. Change the "Locator" option to "Incremental" and click "OK". This completes the requirements for the Incremental Locator. The key column of the sort order (in this case PRO:ProdDesc) is the default locator control. Click "OK", and then on the green "Save and Close" button.<br />
<br />
<h2>Creating the Form Procedure</h2>
When you renamed the reference to the UpdateCustomer procedure while copying BrowseCustomers to BrowseProducts, it made the UpdateProduct procedure a "ToDo" procedure. Therefore, we need to create a form to update the Products table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbqT3ufBVevRo0q0bjztqC8wVX9sZUILiSMG5rk4T8YcVp9EnxorqDJ4yC7yZrK0PN4ecqEBAngo5IaR-RSr63Qtn3YaRYg8Isx8xdWgN4u4Hudw5ROfOhw-xUmvhwxh8F4I2B/s715/LC+Lesson+9-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="715" data-original-width="643" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbqT3ufBVevRo0q0bjztqC8wVX9sZUILiSMG5rk4T8YcVp9EnxorqDJ4yC7yZrK0PN4ecqEBAngo5IaR-RSr63Qtn3YaRYg8Isx8xdWgN4u4Hudw5ROfOhw-xUmvhwxh8F4I2B/s400/LC+Lesson+9-35.png" /></a></div>
Click on the "UpdateProduct" procedure and select "Properties". Select the "Defaults" tab, choose "FORM (Add/Edit/Delete)" and then press the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf_7wmmtZfZD9QIcj3ienNwP0VnQfQWhqk2eg_5C7qCzFW72ahvRerzVWnPyjJB0vvTTLwaCEB0E9_bhchkBTZ78kz9CtPUOpcu5bODIJD1PTkU_ifMH-2x1jfOpJy9FeyYKDi/s789/LC+Lesson+9-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="634" data-original-width="789" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf_7wmmtZfZD9QIcj3ienNwP0VnQfQWhqk2eg_5C7qCzFW72ahvRerzVWnPyjJB0vvTTLwaCEB0E9_bhchkBTZ78kz9CtPUOpcu5bODIJD1PTkU_ifMH-2x1jfOpJy9FeyYKDi/s400/LC+Lesson+9-36.png" width="400" /></a></div>
In the "Data / Tables" pad, highlight the "<ToDo>" table, then press the "Add" button (or double-click on "<ToDo>"). Choose the "Product" table and click on the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4hMfsfUMA4KUUarI3jD0QXbIjXwbdsoCizvv9O6nTZ_nGiqM794_QICIaZ5L_dkW1qNMRvdhTsG79OeVFcdJwd112coD2QDvhFH3DBqLCpCdOb8pu_NRyiDfByTKPK6euEb-Z/s786/LC+Lesson+9-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="507" data-original-width="786" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4hMfsfUMA4KUUarI3jD0QXbIjXwbdsoCizvv9O6nTZ_nGiqM794_QICIaZ5L_dkW1qNMRvdhTsG79OeVFcdJwd112coD2QDvhFH3DBqLCpCdOb8pu_NRyiDfByTKPK6euEb-Z/s400/LC+Lesson+9-37.png" width="400" /></a></div>
Set the Description to "Update Product" and click on the ellipsis next to the "Window" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5D59PoXsx1ujgg1xkuCfpyypkScq6qf3h9bBiZyXWxHfYomyq44HFzhhQWLAo5IUm3-VRw5y3xuqChfP0RDg3sg4iXlX0fEiUR7QaulUKRejYSlTstSlMQJutDd3HeD_x0NrI/s864/LC+Lesson+9-38.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="204" data-original-width="864" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5D59PoXsx1ujgg1xkuCfpyypkScq6qf3h9bBiZyXWxHfYomyq44HFzhhQWLAo5IUm3-VRw5y3xuqChfP0RDg3sg4iXlX0fEiUR7QaulUKRejYSlTstSlMQJutDd3HeD_x0NrI/s400/LC+Lesson+9-38.png" width="400" /></a></div>
Change the WINDOW text to 'Update Product' and add in ",FONT('Segoe UI')" at the end of the first line. Click on the green "Save and Close" button, and then use the "Window" button to enter the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3Rw5-d_rDPsR9Nuz3sv7FS0ekkCJnnX6W4sOeGhxJ1_TAzmwSt3P4iGrWT0jTRMrmkku2lX4qLlzOd4tPI9tU33pwiIuVRuar5GRrf_aKqChQWTEZHD5yLVwxUzXrW8Ag9-I/s768/LC+Lesson+9-39.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="524" data-original-width="768" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT3Rw5-d_rDPsR9Nuz3sv7FS0ekkCJnnX6W4sOeGhxJ1_TAzmwSt3P4iGrWT0jTRMrmkku2lX4qLlzOd4tPI9tU33pwiIuVRuar5GRrf_aKqChQWTEZHD5yLVwxUzXrW8Ag9-I/s400/LC+Lesson+9-39.png" width="400" /></a></div>
Starting with the "ProdNumber" field, drag and drop each field from the "Data / Tables" pad to the form, as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4l-1dzJlQq7WCcUigyprk5qURTMJQ2ULyCgdffb9Wx9aSBTum8aMV6ReUkF7phc8zpC_Y6lZu1Uk4n7oQdE_yaE1iz53W56eJhx0_yYbxlgdegnCuurd6icfw6KSgsTACVqT/s583/LC+Lesson+9-40.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="405" data-original-width="583" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4l-1dzJlQq7WCcUigyprk5qURTMJQ2ULyCgdffb9Wx9aSBTum8aMV6ReUkF7phc8zpC_Y6lZu1Uk4n7oQdE_yaE1iz53W56eJhx0_yYbxlgdegnCuurd6icfw6KSgsTACVqT/s400/LC+Lesson+9-40.png" width="400" /></a></div>
Spend a few minutes tidying up the form layout, and adjust the form size as shown. Click on the green "Save and Close" button, then the green "Save and Exit" button, and finally the "Accept changes" button to <b>save your work</b>. The Products table update form window is completed.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You copied an existing procedure, renaming the subsequent procedures it called.</li>
<li>You used a Code Template in the Embedded Source dialog to call the new procedure from the main menu.</li>
<li>You modified the copied procedure to display from another table.</li>
<li>You added an Incremental Locator to the Browse procedure.</li>
<li>You created an entire Form procedure very quickly by just using the Populate Column toolbox.</li></ul>
Now that you’re thoroughly familiar with Procedure Templates, we’ll go on to use some Control and Extension Templates.<br />
<br />
<h1>Lesson 10: Control and Extension Templates</h1>
For the BrowseOrders procedure, you’ll create a window with two synchronized scrolling list boxes. One will display the contents of the Orders table, and the other will display the related rows in the Detail table. You’ll use a generic Window procedure, and populate it using Control templates. The only reason for doing it this way instead of starting with a Browse Procedure Template is to demonstrate another way of building a procedure: using <b>Control templates</b> placed in a generic Window (the same way the Browse Procedure template itself was created).
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Control templates generate all the source code for creating and maintaining a single control or related group of controls. In this case, placing a BrowseBox Control template allows the Application Generator to produce the code that opens the tables and puts the necessary data into the structures which hold the data for display in the list box.<br />
<br />
<h2>Creating the Procedure</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnnwcf9P8kzw_AAlRkijHgZjyRtkVfDDfG1N7ktWHEFwKTkw10bYEydzqt_8100i3b45DPpSJO7SrGB2D8-F1yN7wehTuxpY_nG2Zv743eRAuYZ1oN4wdM5jn7LsJ0irkloKh2/s674/LC+Lesson+10-01.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="674" data-original-width="666" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnnwcf9P8kzw_AAlRkijHgZjyRtkVfDDfG1N7ktWHEFwKTkw10bYEydzqt_8100i3b45DPpSJO7SrGB2D8-F1yN7wehTuxpY_nG2Zv743eRAuYZ1oN4wdM5jn7LsJ0irkloKh2/s400/LC+Lesson+10-01.png" /></a></div>
Click on the "BrowseOrders" procedure and the "Properties" button. When the "Select Procedure Type" dialog box opens, choose the "Templates" tab, and select "Window - Generic Window Handler".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_ACzff-hz1wMdmaTK3qNWBtEWPCT_O4Vfk7BKvEirnhHr-hHQ7PK0_BUtUFULjhWXyfmMPjJWro8q1boNBtNSRq3HDLB9ygeUuvZTkMNKeY4MJakyqEqx2thrwPvVZjgFKoS3/s663/LC+Lesson+10-02.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="663" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_ACzff-hz1wMdmaTK3qNWBtEWPCT_O4Vfk7BKvEirnhHr-hHQ7PK0_BUtUFULjhWXyfmMPjJWro8q1boNBtNSRq3HDLB9ygeUuvZTkMNKeY4MJakyqEqx2thrwPvVZjgFKoS3/s400/LC+Lesson+10-02.png" width="400" /></a></div>
Type in "Browse Orders" in the Description field, and then click on the ellipsis next to the "Window" button. When the "Select default declaration" dialog appears, choose "MIDI Child Window" and click on "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFcCAj754ujktqiVNhxBzFnFn2lBKW8qHT4FimkW0jvsWKbsoas7OFaQ-OX5iIL4UggxrYPifCd1f1imQYg7Ys9pT1wCERb3iD_o3fCC725ivm8u6Sw3vA0uDpDNy1_Xnwqf1F/s603/LC+Lesson+10-03.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="154" data-original-width="603" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFcCAj754ujktqiVNhxBzFnFn2lBKW8qHT4FimkW0jvsWKbsoas7OFaQ-OX5iIL4UggxrYPifCd1f1imQYg7Ys9pT1wCERb3iD_o3fCC725ivm8u6Sw3vA0uDpDNy1_Xnwqf1F/s400/LC+Lesson+10-03.png" width="400" /></a></div>
Change the WINDOW caption to 'Orders' and check that the FONT declaration shows 'Segoe UI'. Then click on the green "Save and Close" button. Then click on the "Window" button to go into the normal Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDM5wPV5cOeq9ofLfk__EDAfzWSkDfW4-jSRYOovJJPOOuZowSPRZLGbh5ecZurvcC4jxGxXPPJDe8IU4fIYbPhkHlN4V6xO04xHvfQ_W7GuuOlkNuz29uScXoG4SznXe4fnMZ/s828/LC+Lesson+10-04.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="602" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDM5wPV5cOeq9ofLfk__EDAfzWSkDfW4-jSRYOovJJPOOuZowSPRZLGbh5ecZurvcC4jxGxXPPJDe8IU4fIYbPhkHlN4V6xO04xHvfQ_W7GuuOlkNuz29uScXoG4SznXe4fnMZ/s400/LC+Lesson+10-04.png" width="400" /></a></div>
Resize the window to double its height and width. Change the "MaximizeBox" property to "True" and check that the Frame Type is "Resizable". Open the "Control Templates" pad.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAogxXAUcV-xIZzGwWDQcE1DUAh_1XfeQKe3FJNFB8T0feqxEJCNglDAShp_Pu3s0b_8JdHV9fuzav27d_OtMgUCo5bStXbsOsvxEJq3k6jUS1bjfsCrBlwdBv0t7_idC7kbC0/s1027/LC+Lesson+10-05.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="679" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAogxXAUcV-xIZzGwWDQcE1DUAh_1XfeQKe3FJNFB8T0feqxEJCNglDAShp_Pu3s0b_8JdHV9fuzav27d_OtMgUCo5bStXbsOsvxEJq3k6jUS1bjfsCrBlwdBv0t7_idC7kbC0/s400/LC+Lesson+10-05.png" width="400" /></a></div>
Drag the "BrowseBox" control template to the top left corner of the window, and drop. The "Select Column" dialog opens. Click on the "<ToDo>" entry, click the "Add" button, choose the "Order" table and click the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCmi15iZhdPtqPfsZwpm6EGzNiaMqP9A7CjnXIe-ec0Wo8nD2oRwwuRDChlOn3floCJzxSE2V74WkRCJUMfrGDW6tLkql-C68m2c7RPSbvQHEri-ZXbGGD3I4o-BkfKZ_wROV/s724/LC+Lesson+10-06.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="445" data-original-width="724" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCmi15iZhdPtqPfsZwpm6EGzNiaMqP9A7CjnXIe-ec0Wo8nD2oRwwuRDChlOn3floCJzxSE2V74WkRCJUMfrGDW6tLkql-C68m2c7RPSbvQHEri-ZXbGGD3I4o-BkfKZ_wROV/s400/LC+Lesson+10-06.png" width="400" /></a></div>
With the "Order" table still selected, click on the "Change" button and select the "KeyOrderNumber" key to sort the data by order number.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigO1AD2BmbB45UEC7UQ86WNMCkkFs7Q0lImh9xVgzi2MbfwijY0ePYd1R996fIwOQVJ5wmKwb2WmEqN4cqNUgOlELTO1fc2Z3-gmP-s5Aa6jipJXTe99fq5eC5pr62ep9ZDQQS/s724/LC+Lesson+10-07.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="446" data-original-width="724" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigO1AD2BmbB45UEC7UQ86WNMCkkFs7Q0lImh9xVgzi2MbfwijY0ePYd1R996fIwOQVJ5wmKwb2WmEqN4cqNUgOlELTO1fc2Z3-gmP-s5Aa6jipJXTe99fq5eC5pr62ep9ZDQQS/s400/LC+Lesson+10-07.png" width="400" /></a></div>
Choose the first field "CustNumber" and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVsAOV9RWfbYu425GDRf3Gj0J1xcLqox7iMhdTrUI9njQphvPgZQVnlhrucuVxdK-TmOttv_NrLbvvz2CQCrXUmI4REOuWa0j4bETnITSv2m7liddDkm7268Ve1O7jthiwpseq/s629/LC+Lesson+10-08.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="592" data-original-width="629" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVsAOV9RWfbYu425GDRf3Gj0J1xcLqox7iMhdTrUI9njQphvPgZQVnlhrucuVxdK-TmOttv_NrLbvvz2CQCrXUmI4REOuWa0j4bETnITSv2m7liddDkm7268Ve1O7jthiwpseq/s400/LC+Lesson+10-08.png" width="400" /></a></div>
Right-click on the newly-created list box and choose "List Box format ..." to open the List Box Formatter.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrxrvJvRC6fOAN3-eooPetUFYKduUe5SuII5_WeR-M00Q5eRSlPm5L-bsRR1MhTjHSSpLBASaoOd6M7_ptgh36AmZ283SVYQMhYEmRGHMSnJa42-RhdI8p0FmoE88Ui9xCZ-EN/s854/LC+Lesson+10-09.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="577" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrxrvJvRC6fOAN3-eooPetUFYKduUe5SuII5_WeR-M00Q5eRSlPm5L-bsRR1MhTjHSSpLBASaoOd6M7_ptgh36AmZ283SVYQMhYEmRGHMSnJa42-RhdI8p0FmoE88Ui9xCZ-EN/s400/LC+Lesson+10-09.png" width="400" /></a></div>
Use the "Insert Field" button to click on and "Select" each of the remaining fields in the Order table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPZu94W6faYT8jQdtA1ppUOWStAh_xcHNpBoJkxmQw39YHDkdCr0glucFP2aMDlWAhyQS9C8lOtQwfcArLlmIi8rOqOB7tH-ek-Vy-JU2lsZPYU0EccQhTnHYsjoKsUqPSbIy/s562/LC+Lesson+10-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="548" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPZu94W6faYT8jQdtA1ppUOWStAh_xcHNpBoJkxmQw39YHDkdCr0glucFP2aMDlWAhyQS9C8lOtQwfcArLlmIi8rOqOB7tH-ek-Vy-JU2lsZPYU0EccQhTnHYsjoKsUqPSbIy/s400/LC+Lesson+10-10.png" width="400" /></a></div>
Adjust the column widths by moving the right border on applicable fields. Set the Header Indent to 1 for the first field. Ctrl-click on each of the fields to select them all. Then Check that the "Resizable" and "RightBorder" properties are "True". Examine the Header text property of each column, and abbreviate them as follows: "Cust#", "Ord#", "Inv Amt", "Date", and "Note". Click "OK" when done.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwq1sl96Kp_gUvso_Mh8yov8hVkyUEgr-selM5ptIkVw0jrr8z2gGmQ6eVCJIgKTFhagRMINoJMQ0QK5v4Au_FU3lXLbhSqm7U9iBWYd-Q4uHEeegXJqsvs87KAnVWODv7uDFE/s828/LC+Lesson+10-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="597" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwq1sl96Kp_gUvso_Mh8yov8hVkyUEgr-selM5ptIkVw0jrr8z2gGmQ6eVCJIgKTFhagRMINoJMQ0QK5v4Au_FU3lXLbhSqm7U9iBWYd-Q4uHEeegXJqsvs87KAnVWODv7uDFE/s400/LC+Lesson+10-11.png" width="400" /></a></div>
Set the "Vertical" and "Horizontal" scrollbar properties to "True" and widen the list box to fill most of the width of the form, leaving an equal distance between left, right and top parts of the window. Change the Font "Size" to "8" points so that more of of the Note field can be displayed. Use the green "Save and Close" and "Save and Exit" buttons to <b>save your work</b> and return to the main screen.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4jO1KUwkeylhE0Uokvh7d4ntJOsLL9Fn-wTzyEIJGNYgqgQE1vRUwLjNzrD6wMTaiPf0kYKGaGPjtzI6D4bKknEylIkp1PpByyl-8uE04htipnlXtUvvL42INPzRY-IWKENXI/s1030/LC+Lesson+10-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="771" data-original-width="1030" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4jO1KUwkeylhE0Uokvh7d4ntJOsLL9Fn-wTzyEIJGNYgqgQE1vRUwLjNzrD6wMTaiPf0kYKGaGPjtzI6D4bKknEylIkp1PpByyl-8uE04htipnlXtUvvL42INPzRY-IWKENXI/s400/LC+Lesson+10-12.png" width="400" /></a></div>
Try the "Start Without Debugger" button to see how your application is progressing. Close the application when done, and return to the Window Designer by clicking on the "Window" button.<br />
<br />
<h2>Adding the Browse Update Buttons Template</h2>
Next add the standard "Insert", "Change" and "Delete" buttons for the top browse list box control. Since there are going to be two list boxes on this window, we’ll leave these buttons visible for the user. Later we’ll add a form procedure for adding or editing an order.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLFeax7ynawTsCLAM-fudq8R80gZVsQ4xDwAAZg_2v5TU7HGOfXge_zZGTdP1mAMBg37ti4N83CPLkSJ8YArrWDo9UdYRz0la7a30gL0A5SgFxwIJ-CYngt7X0_b7kGm-j2aQe/s834/LC+Lesson+10-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="636" data-original-width="834" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLFeax7ynawTsCLAM-fudq8R80gZVsQ4xDwAAZg_2v5TU7HGOfXge_zZGTdP1mAMBg37ti4N83CPLkSJ8YArrWDo9UdYRz0la7a30gL0A5SgFxwIJ-CYngt7X0_b7kGm-j2aQe/s400/LC+Lesson+10-13.png" width="400" /></a></div>
Search in the "Control Templates" pad for "browseupdatebuttons" and locate the "Browse on Order" template. Drag it to the bottom left of the list box as shown. The three buttons will appear.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ08byrvzcBIwquZ9ifqQ3HCZlFIBgV4d2gDYHAzIZWLjsyt-TXVdnOhX7OfLxcsB45nk_meP1ksDwmMLv5EdMo82GQQfKXXfVQZIV0vezmr5k_S-w1WjWYhK4CvvCpNzuXEDB/s827/LC+Lesson+10-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="626" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ08byrvzcBIwquZ9ifqQ3HCZlFIBgV4d2gDYHAzIZWLjsyt-TXVdnOhX7OfLxcsB45nk_meP1ksDwmMLv5EdMo82GQQfKXXfVQZIV0vezmr5k_S-w1WjWYhK4CvvCpNzuXEDB/s400/LC+Lesson+10-14.png" width="400" /></a></div>
Select just the "Delete" button, and then right-click and choose "Actions ..." from the pop-up menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCHHTweARvoxLJrKlW1JnU-90zp54LXN8OVM2bEXdUb-Kcw0wH6tCe8NgWIYmQzq-5WZQ0cBT8h4hoIimVkQ7tVujgMvHxeV0uKDbfool9OEj3RRD3g17huDT2AKvNFnvR4sel/s827/LC+Lesson+10-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCHHTweARvoxLJrKlW1JnU-90zp54LXN8OVM2bEXdUb-Kcw0wH6tCe8NgWIYmQzq-5WZQ0cBT8h4hoIimVkQ7tVujgMvHxeV0uKDbfool9OEj3RRD3g17huDT2AKvNFnvR4sel/s400/LC+Lesson+10-15.png" width="400" /></a></div>
Type in "UpdateOrder" in the Procedure Name field and click "OK". This names the procedure, in the same way that you named the Update procedure for the Customer browse in its Procedure Properties dialog. Naming the Update Procedure for one button in the Control template names it for all three.<br />
<br />
<h2>Placing the Second Browse List Box</h2>
Next, place a list box with the contents of the Detail table. This will update automatically when the end user changes the selection in the top list box. To do this, you may have to make a bit more space on the form, by shortening the "Order" list box and moving the three buttons up to the middle of the form height.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg47zNVNbd4cavmoBxOMAs7CEy1Xys0jJXz0rWf4vlp7Sf_VCg5xRjd4PVhh6BifJea5mK9prHQPujtn92iu8Do14RpmfmTvblrrdk6DjyXAhiTNqUrs2Y1fI9u8Sns3S14dSsv/s1027/LC+Lesson+10-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="676" data-original-width="1027" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg47zNVNbd4cavmoBxOMAs7CEy1Xys0jJXz0rWf4vlp7Sf_VCg5xRjd4PVhh6BifJea5mK9prHQPujtn92iu8Do14RpmfmTvblrrdk6DjyXAhiTNqUrs2Y1fI9u8Sns3S14dSsv/s400/LC+Lesson+10-16.png" width="400" /></a></div>
Drag another "BrowseBox" control template to the point below the "Insert" button. Click on the new '<ToDo>" entry, click "Add" and choose the "Detail" table before you click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS3hmnOKyNZuKO-TVbztDAZZgpZwdQ3QpuUawJP_iE4jxkzE16j7o_RFgyklbKfPdQ-hXeEVD3tgVOxV6sFE-nZ4npZH_2pnFKzWFafw8_Ctug-rQk95A0qpG7PVoOkciGNDOm/s726/LC+Lesson+10-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="446" data-original-width="726" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhS3hmnOKyNZuKO-TVbztDAZZgpZwdQ3QpuUawJP_iE4jxkzE16j7o_RFgyklbKfPdQ-hXeEVD3tgVOxV6sFE-nZ4npZH_2pnFKzWFafw8_Ctug-rQk95A0qpG7PVoOkciGNDOm/s400/LC+Lesson+10-17.png" width="400" /></a></div>
Select the new "Detail" table entry, and click on "Change" to choose the "KeyOrderNumber" sort key, and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEfS9XLC-YjjKjoLAb7FJMJRMgeYzvP0jFLnp4VfaNHiyzDoiP31d3ywzSu8iuVWVML19o8Bbm0GAJ-HBQbmgc-3lhzj8DUj7EEME_UzCeXk704-N_0Sb5Z4WFBjsYsa0IDRC3/s724/LC+Lesson+10-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="445" data-original-width="724" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEfS9XLC-YjjKjoLAb7FJMJRMgeYzvP0jFLnp4VfaNHiyzDoiP31d3ywzSu8iuVWVML19o8Bbm0GAJ-HBQbmgc-3lhzj8DUj7EEME_UzCeXk704-N_0Sb5Z4WFBjsYsa0IDRC3/s400/LC+Lesson+10-18.png" width="400" /></a></div>
Click on the "Detail" table, choose the first field and click "Select". This will return us to the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGWWLzgV5tmP3d6HgIB7iqZms5QMu9LQk1azesPqT1f1FVP9xMnSsMgNTqaupLoMvW9Jj85cdt7U9BNEhK2nSRlG8uvYWou2vramFL2Nk6kKMue3k2MQ9JnjKTBqKyN48oK44p/s671/LC+Lesson+10-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="671" data-original-width="629" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGWWLzgV5tmP3d6HgIB7iqZms5QMu9LQk1azesPqT1f1FVP9xMnSsMgNTqaupLoMvW9Jj85cdt7U9BNEhK2nSRlG8uvYWou2vramFL2Nk6kKMue3k2MQ9JnjKTBqKyN48oK44p/s400/LC+Lesson+10-19.png" /></a></div>
Adjust the shape of the new list box to fit the window, leave some space to the right for a "Close" button which we will add later, and then right-click on it to choose the "List Box format..." command and open the List Box Formatter.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0vmT-HtNk0woxyoRDvhfsEX3nneGLGdyqvZNlokuuOEUQh51IrHpYjK5btE4tYP1TuZIY9mrImIdpb_Eu_Ut6V6zUC-Z9f0nfl7BEGoI7n3FGKKp78Sf9KysGds4ePzWyMF2J/s804/LC+Lesson+10-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="540" data-original-width="804" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0vmT-HtNk0woxyoRDvhfsEX3nneGLGdyqvZNlokuuOEUQh51IrHpYjK5btE4tYP1TuZIY9mrImIdpb_Eu_Ut6V6zUC-Z9f0nfl7BEGoI7n3FGKKp78Sf9KysGds4ePzWyMF2J/s400/LC+Lesson+10-20.png" width="400" /></a></div>
Click on the "Add Field" button, select the "Detail" table and add in the remaining fields as shown, using the "Select" button.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOmnoXEC_bF4wGmrtoJ5rqxIxhLgck6HNBvn0hwyakBZU1p9ZsbRYxEJJYqijnqaQeu19K-XJYvaDeuHvfrSSlYTw-ttesH_CN-Vzi_Y7fIkkFR1dU_eaWhyphenhyphenBBj_8m7FfyZs68/s563/LC+Lesson+10-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="563" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOmnoXEC_bF4wGmrtoJ5rqxIxhLgck6HNBvn0hwyakBZU1p9ZsbRYxEJJYqijnqaQeu19K-XJYvaDeuHvfrSSlYTw-ttesH_CN-Vzi_Y7fIkkFR1dU_eaWhyphenhyphenBBj_8m7FfyZs68/s400/LC+Lesson+10-21.png" width="400" /></a></div>
Adjust the headings and widths of each field to make them neater. Then click "OK" when done.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBmP7KsTCCHPucnfTYx1-qwisMXfji7mIdE-f4p6qsbOz4PfBjucbm0oLqEWdO1BygM8pek9-e2vjWIPDJpI50idWc5wXRHGd7vDBYl9NpUzIWBXvj5a_4tQXEbheiC0KLeXm/s633/LC+Lesson+10-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="594" data-original-width="633" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTBmP7KsTCCHPucnfTYx1-qwisMXfji7mIdE-f4p6qsbOz4PfBjucbm0oLqEWdO1BygM8pek9-e2vjWIPDJpI50idWc5wXRHGd7vDBYl9NpUzIWBXvj5a_4tQXEbheiC0KLeXm/s400/LC+Lesson+10-22.png" width="400" /></a></div>
Right-click on the list box again and select "Actions ..."<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgW9CfxvoBFqsHybjtBZSSgtTU_aER2DVoLkaExs8LpkqJaiHJTefS0Fk3lRXFCyc4FCg9ardyop0uRZNZC7zzPyKJbf_6tMMf9S3ZrDiScRphm0QuTkKrmGJUJ5XhaTQepclF/s827/LC+Lesson+10-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="513" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgW9CfxvoBFqsHybjtBZSSgtTU_aER2DVoLkaExs8LpkqJaiHJTefS0Fk3lRXFCyc4FCg9ardyop0uRZNZC7zzPyKJbf_6tMMf9S3ZrDiScRphm0QuTkKrmGJUJ5XhaTQepclF/s400/LC+Lesson+10-23.png" width="400" /></a></div>
Click on the ellipsis to the right of the "Range Limit Field" and select "OrderNumber" from the "Detail" table. This is autosuggested for you. Change the "Range Limit Type" to "File Relationship" and use the ellipsis to the right of the "Related file" field to select the "Order" table. These settings will now show only the Detail records for the selected "Order" record in the top browse. Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnsD2k0JTkMvO4ne7X_VdxGtSXQJvjcZ02Wh8hafEgixbLRTbUljqrk3Ofi5nSUgmSzwyTzHGH4pO-1OQKKk8v0VNSWCy9DXfwSUmSiVmyNnXf4LkFJKwZsGEu9Rjjy67f9pcy/s831/LC+Lesson+10-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="593" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnsD2k0JTkMvO4ne7X_VdxGtSXQJvjcZ02Wh8hafEgixbLRTbUljqrk3Ofi5nSUgmSzwyTzHGH4pO-1OQKKk8v0VNSWCy9DXfwSUmSiVmyNnXf4LkFJKwZsGEu9Rjjy67f9pcy/s400/LC+Lesson+10-24.png" width="400" /></a></div>
Change the font "Size" property to "8" points so that it matches the size of the first list box, and make sure the "Horizontal" and "Vertical" scrollbar properties are set to "True".<br />
<br />
<h2>Adding the Close Button Control Template</h2>
Finally, you can add a "Close" button that closes the window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6u0k1NYO5MJLNcFPC1HXVpfVCJqEyRB1ofFiBSnGAHvJW8I3UrE_CHQIeIeyUZ9SLSUiQfqEcnpzbD7NUiveLPEd3IYHCnzn82bsyQcykufIGxebcIisY48nwdNJUmj7JHNGI/s829/LC+Lesson+10-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="629" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6u0k1NYO5MJLNcFPC1HXVpfVCJqEyRB1ofFiBSnGAHvJW8I3UrE_CHQIeIeyUZ9SLSUiQfqEcnpzbD7NUiveLPEd3IYHCnzn82bsyQcykufIGxebcIisY48nwdNJUmj7JHNGI/s400/LC+Lesson+10-25.png" width="400" /></a></div>
Drag and drop the "CloseButton" control template in the bottom-right corner of the window, as shown. Use the green "Save and Close" button, followed by the "Accept changes" button, to <b>save your work</b>.<br />
<br />
<h2>Make the window resizable</h2>
Select the BrowseOrders procedure, and then click on "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNsFqsBCZzVS3JO-gwPOn2BFyMyfckeoOBwTX0n4XDrVZnXBQm6jP9MtpDFKeddT6OVfMUqIINBg_9qdPLK3JcuW4ppotVHHme820mKtQ9IP3pULiIX8MWm6SS7J-cq1_MT21i/s683/LC+Lesson+10-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="665" data-original-width="683" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNsFqsBCZzVS3JO-gwPOn2BFyMyfckeoOBwTX0n4XDrVZnXBQm6jP9MtpDFKeddT6OVfMUqIINBg_9qdPLK3JcuW4ppotVHHme820mKtQ9IP3pULiIX8MWm6SS7J-cq1_MT21i/s400/LC+Lesson+10-26.png" width="400" /></a></div>
Go to the "Extensions" tab. Click on the "Insert" button. Choose the "WindowResize" extension and click on "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRDtOQbr6kY5S29nbrtpl6NKS98QVbQIDGM7UB_lcsakaWcGEP9lQu48Hf5AfUaruTAmqAGMSpSDphLj2rOjXwjp0ByLa1BSUuU-fTlG5U1cc3OjEW9r0KkpAYZ-yfZlEcxsC/s844/LC+Lesson+10-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="824" data-original-width="844" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfRDtOQbr6kY5S29nbrtpl6NKS98QVbQIDGM7UB_lcsakaWcGEP9lQu48Hf5AfUaruTAmqAGMSpSDphLj2rOjXwjp0ByLa1BSUuU-fTlG5U1cc3OjEW9r0KkpAYZ-yfZlEcxsC/s400/LC+Lesson+10-27.png" width="400" /></a></div>
Instead of just accepting the default resizing strategy, we are going to change a few things. First, enable the "Restrict Minimum Window Size" option, to prevent the window being made smaller than the designed size. Next, click on the "Override Control Strategies" button and click on "Insert". Choose the "?Insert" window control and change the "Vertical Positioning Strategy" option to "Fix Bottom". Click "OK". Repeat these steps for the "?Change", "?Delete" and "?List:2" buttons. This ensures that the three buttons and the bottom list box remain a constant distance from the bottom edge of the top list box.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEd1ocFuEXvW2vam6HBsPFvMPAqRG9kvgaoX5z7gYPToTWXzxPvJwJem4-TDGuIV7VbLmzi0P3DXFZfOMkA0pyw91YSLtThRh6lUddtU2i__58w-_6idmpqgmicwd48gy2jap5/s894/LC+Lesson+10-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="419" data-original-width="894" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEd1ocFuEXvW2vam6HBsPFvMPAqRG9kvgaoX5z7gYPToTWXzxPvJwJem4-TDGuIV7VbLmzi0P3DXFZfOMkA0pyw91YSLtThRh6lUddtU2i__58w-_6idmpqgmicwd48gy2jap5/s400/LC+Lesson+10-28.png" width="400" /></a></div>
Insert another control strategy for the "?List" control, and set the "Vertical Resize Strategy" to "Constant Bottom Border" and click "OK". This will ensure that the top list box changes its height as the window grows, but the bottom list box stays the same height. Click "OK" and "OK" again to return to the "Extensions" tab. Click on "Accept changes" to <b>save your work</b>.<br />
<br />
<h2>Set up a Reset Column</h2>
In the "Extensions" tab, highlight "Browse on Detail" and press the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizadNdav5wvnH2TbZ9iu2N8c5bY3uvmZWl2L7Ubr5H62D4HUDPt5KxshmP6U_7gbrbMHWlT6NXmBFWFV4FLyKbErC0ad52m6iPYPXiYJiDqpk2vZz0V90aEfMFOnPKGH7EVXy8/s831/LC+Lesson+10-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="788" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizadNdav5wvnH2TbZ9iu2N8c5bY3uvmZWl2L7Ubr5H62D4HUDPt5KxshmP6U_7gbrbMHWlT6NXmBFWFV4FLyKbErC0ad52m6iPYPXiYJiDqpk2vZz0V90aEfMFOnPKGH7EVXy8/s400/LC+Lesson+10-29.png" width="400" /></a></div>
Click on the "Reset Fields" button, then "Insert" and use the ellipsis to "Select" the "InvoiceAmount" field from the "Order" table. Click "OK", "OK", "OK". This specifies that the "Detail" table’s list box should reset itself whenever the value in the "ORD:InvoiceAmount" column changes. This ensures that any changes you make to an existing order are reflected in this dialog when you return from changing the order.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Click on the green "Save and Close" button, followed by the Accept changes" button to <b>save your work</b>.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You created a new browse procedure, but did it using the BrowseBox and BrowseUpdateButtons Control Templates instead of the Browse Procedure Template.</li>
<li>You created a second, range-limited list box to display related child rows.</li>
<li>You used the WindowResize Extension Template and specified individual control resize strategies.</li>
<li>You set a Reset Column on the Detail table’s Browse list so its display is always kept current.</li>
</ul>
<a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Next,</a> we’ll create the UpdateOrder Form procedure to create and maintain the "Order" and "Detail" table rows.<br />
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2021/07/learning-clarion-part-7.html">Learning Clarion (Part 7)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Learning Clarion (Part 6)</a> ]<br />
[ Learning Clarion (Part 5) ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/12/learning-clarion-part-4.html">Learning Clarion (Part 4)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html">Learning Clarion (Part 3)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-91733370224573303362021-01-29T15:23:00.017+02:002021-02-02T16:05:08.107+02:00Windows 10, Microsoft 365 and Microsoft Store free fonts<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWgVSBcj8PvCjPGEveu_kNMPkwki2UZSxnhkhfvChXZqTjQfnSsO-eOog9gICAOZ2T4mksjWi0sdJQ_ZpQZkcrTFhRktm2bHoTA7CtVRcj036k6Ag9TnVBTake8FExtl96p1P/s679/Windows-10-logo-679x170.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="400" data-original-height="170" data-original-width="679" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWWgVSBcj8PvCjPGEveu_kNMPkwki2UZSxnhkhfvChXZqTjQfnSsO-eOog9gICAOZ2T4mksjWi0sdJQ_ZpQZkcrTFhRktm2bHoTA7CtVRcj036k6Ag9TnVBTake8FExtl96p1P/s400/Windows-10-logo-679x170.png"/></a></div>
Whenever I install a new version of <i>Microsoft Windows</i>, I am always intrigued by what new fonts are included. This started when I was creating websites and didn't want to rely on "Times" or "Helvetica" as the standard fonts available in web browsers like <i>Netscape</i> or <i>IE</i>. So it helped to know what fonts would be available on most <i>Windows</i> PCs.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Currently <i>Windows 10</i> includes 149 fonts, excluding bitmap ones. This is a far cry from just Arial, Courier, Times New Roman and Symbol that were the <i><a href="https://docs.microsoft.com/en-us/typography/truetype/history" target="_blank">TrueType</a></i> fonts in <i>Windows 3.1</i>. I have shown the <i>Windows XP</i> fonts in bold, which is uselful if you want to ensure that <b>all</b> current <i>Windows</i> users can display the font. Language specific fonts are shown in italics. Here is the <a href="https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list" target="_blank">current list</a> for <i>Windows 10</i> 20H2:<blockquote><b><a href="https://docs.microsoft.com/en-us/typography/font-list/arial" target="_blank">Arial</a><br>
Arial Bold<br>
Arial Bold Italic<br>
Arial Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/arial-black" target="_blank">Arial Black</a></b><br>
Arial Black Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bahnschrift" target="_blank">Bahnschrift</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/calibri" target="_blank">Calibri</a><br>
Calibri Bold<br>
Calibri Bold Italic<br>
Calibri Italic<br>
Calibri Light<br>
Calibri Light Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/cambria" target="_blank">Cambria</a><br>
Cambria Bold<br>
Cambria Bold Italic<br>
Cambria Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/candara" target="_blank">Candara</a><br>
Candara Bold<br>
Candara Bold Italic<br>
Candara Italic<br>
Candara Light<br>
Candara Light Italic<br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/comic-sans-ms" target="_blank">Comic Sans MS</a><br>
Comic Sans MS Bold</b><br>
Comic Sans MS Bold Italic<br>
Comic Sans MS Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/consolas" target="_blank">Consolas</a><br>
Consolas Bold<br>
Consolas Bold Italic<br>
Consolas Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/constantia" target="_blank">Constantia</a><br>
Constantia Bold<br>
Constantia Bold Italic<br>
Constantia Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/corbel" target="_blank">Corbel</a><br>
Corbel Bold<br>
Corbel Bold Italic<br>
Corbel Italic<br>
Corbel Light<br>
Corbel Light Italic<br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/courier-new" target="_blank">Courier New</a><br>
Courier New Bold<br>
Courier New Bold Italic<br>
Courier New Italic</b><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/ebrima" target="_blank">Ebrima</a><br>
Ebrima Bold</i><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/franklin-gothic-medium" target="_blank">Franklin Gothic Medium</a><br>
Franklin Gothic Medium Italic</b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gabriola" target="_blank">Gabriola</a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/gadugi" target="_blank">Gadugi</a> <br>
Gadugi Bold</i><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/georgia" target="_blank">Georgia</a><br>
Georgia Bold<br>
Georgia Bold Italic<br>
Georgia Italic</b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/hololens-mdl2-assets" target="_blank">HoloLens MDL2 Assets</a> (icons)<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/impact" target="_blank"><b>Impact</b></a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/ink-free" target="_blank">Ink Free</a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/javanese-text" target="_blank">Javanese Text</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/leelawadee-ui" target="_blank">Leelawadee UI</a><br>
Leelawadee UI Bold<br>
Leelawadee UI Semilight</i><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-console" target="_blank"><b>Lucida Console</b></a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-sans-unicode" target="_blank"><b>Lucida Sans Unicode</b></a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/malgun-gothic" target="_blank">Malgun Gothic</a><br>
Malgun Gothic Bold<br>
Malgun Gothic Semilight</i><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/marlett" target="_blank">Marlett</a> (icons)<br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-himalaya" target="_blank">Microsoft Himalaya</a><br>
M<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-jhenghei" target="_blank">icrosoft Microsoft JhengHei</a><br>
Microsoft Microsoft JhengHei Light<br>
Microsoft Microsoft JhengHei Bold<br>
Microsoft Microsoft JhengHei UI<br>
Microsoft Microsoft JhengHei UI Light<br>
Microsoft Microsoft JhengHei UI Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-new-tai-lue" target="_blank">Microsoft New Tai Lue</a><br>
Microsoft New Tai Lue Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-phagspa" target="_blank">Microsoft PhagsPa</a><br>
Microsoft PhagsPa Bold</i><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-sans-serif" target="_blank">Microsoft Sans Serif</a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-tai-le" target="_blank">Microsoft Tai Le</a><br>
Microsoft Tai Le Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-yahei" target="_blank">Microsoft YaHei</a><br>
Microsoft YaHei Bold<br>
Microsoft YaHei Light<br>
Microsoft YaHei UI<br>
Microsoft YaHei UI Bold<br>
Microsoft YaHei UI Light<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-yi-baiti" target="_blank">Microsoft Yi Baiti</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/mingliu" target="_blank">MingLiU-ExtB</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/mongolian-baiti" target="_blank">Mongolian Baiti</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/ms-gothic" target="_blank">MS Gothic</a><br>
MS PGothic<br>
MS UI Gothic</i><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/mv-boli" target="_blank"><b>MV Boli</b></a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/myanmar-text" target="_blank">Myanmar Text</a><br>
Myanmar Text Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/nirmala-ui" target="_blank">Nirmala UI</a><br>
Nirmala UI Bold<br>
Nirmala UI Semilight</i><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/palatino-linotype" target="_blank">Palatino Linotype</a><br>
Palatino Linotype Bold<br>
Palatino Linotype Bold Italic<br>
Palatino Linotype Italic</b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-mdl2-assets" target="_blank">Segoe MDL2 Assets</a> (icons)<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-print" target="_blank">Segoe Print</a><br>
Segoe Print Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-script" target="_blank">Segoe Script</a><br>
Segoe Script Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-ui" target="_blank">Segoe UI</a><br>
Segoe UI Black<br>
Segoe UI Black Italic<br>
Segoe UI Bold<br>
Segoe UI Bold Italic<br>
Segoe UI Italic<br>
Segoe UI Light<br>
Segoe UI Light Italic<br>
Segoe UI Semibold<br>
Segoe UI Semibold Italic<br>
Segoe UI Semilight<br>
Segoe UI Semilight Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-ui-emoji" target="_blank">Segoe UI Emoji</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-ui-historic" target="_blank">Segoe UI Historic</a> (hieroglyphics, etc)<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-ui-symbol" target="_blank">Segoe UI Symbol</a><br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/simsun" target="_blank">SimSun</a><br>
NSimSun<br>
SimSun-ExtB</i><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/sitka" target="_blank">Sitka</a> Small<br>
Sitka Small Italic<br>
Sitka Small Bold<br>
Sitka Small Bold Italic<br>
Sitka Text<br>
Sitka Text Italic<br>
Sitka Text Bold<br>
Sitka Text Bold Italic<br>
Sitka Subheading<br>
Sitka Subheading Italic<br>
Sitka Subheading Bold<br>
Sitka Subheading Bold Italic<br>
Sitka Heading<br>
Sitka Heading Italic<br>
Sitka Heading Bold<br>
Sitka Heading Bold Italic<br>
Sitka Display<br>
Sitka Display Italic<br>
Sitka Display Bold<br>
Sitka Display Bold Italic<br>
Sitka Banner<br>
Sitka Banner Italic<br>
Sitka Banner Bold<br>
Sitka Banner Bold Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/sylfaen" target="_blank"><b>Sylfaen</b></a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/symbol" target="_blank"><b>Symbol</b></a><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/tahoma" target="_blank">Tahoma</a><br>
Tahoma Bold</b><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/times-new-roman" target="_blank">Times New Roman</a><br>
Times New Roman Bold<br>
Times New Roman Bold Italic<br>
Times New Roman Italic</b><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/trebuchet-ms" target="_blank">Trebuchet MS</a><br>
Trebuchet MS Bold<br>
Trebuchet MS Bold Italic<br>
Trebuchet MS Italic</b><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/verdana" target="_blank">Verdana</a><br>
Verdana Bold<br>
Verdana Bold Italic<br>
Verdana Italic</b><br>
<b><a href="https://docs.microsoft.com/en-us/typography/font-list/webdings" target="_blank">Webdings</a> (icons)<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/wingdings" target="_blank">Wingdings</a> (icons)</b><br>
Wingdings 2 (icons)<br>
Wingdings 3 (icons)<br>
<i><a href="https://docs.microsoft.com/en-us/typography/font-list/yu-gothic" target="_blank">Yu Gothic</a> Light<br>
Yu Gothic Regular<br>
Yu Gothic Medium<br>
Yu Gothic Bold<br>
Yu Gothic UI Light<br>
Yu Gothic UI Semilight<br>
Yu Gothic UI Regular<br>
Yu Gothic UI Semibold<br>
Yu Gothic UI Bold</i></blockquote>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyIwoQZs-JBtghtIUOjJQ_gtTGjjEYZU2SVjQHSy6Ww9biEazmjb1fhPlxU02g5p76srKk7mNu_4wQttD0TgLQ0XbCFJLpfu0wrwHvrXXn83zLo3D2AHuDd_5poQHw5XDytyE5/s0/Fonts+Win10+01.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="640" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyIwoQZs-JBtghtIUOjJQ_gtTGjjEYZU2SVjQHSy6Ww9biEazmjb1fhPlxU02g5p76srKk7mNu_4wQttD0TgLQ0XbCFJLpfu0wrwHvrXXn83zLo3D2AHuDd_5poQHw5XDytyE5/s0/Fonts+Win10+01.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8i8z707BXgqzQhwfhIQk3yJjJuqH1H1bB5EhhmzikFY0nlYyN45wNIpu-bVoAuL5wnHkcBySrJnAiFEIfEVdX9BoDeoAAPDYv5x8eCDipHCHdRlbFuqo5jLx5Hc0uyjZTAv83/s0/Fonts+Win10+02.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="594" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8i8z707BXgqzQhwfhIQk3yJjJuqH1H1bB5EhhmzikFY0nlYyN45wNIpu-bVoAuL5wnHkcBySrJnAiFEIfEVdX9BoDeoAAPDYv5x8eCDipHCHdRlbFuqo5jLx5Hc0uyjZTAv83/s0/Fonts+Win10+02.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguvvP1vCFB44nV4vDT8t7Bz2kPSX3KNa1FoSon5Be6xjLfNaQGo4B7-IwuARMYNb1LX-bdwDBknVNxHXS1ah6WQDha-_ifYcNdkpkH5cGk9IcHAKIJGUKTmC7TjiHwOjyaWyrF/s0/Fonts+Win10+03.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="595" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguvvP1vCFB44nV4vDT8t7Bz2kPSX3KNa1FoSon5Be6xjLfNaQGo4B7-IwuARMYNb1LX-bdwDBknVNxHXS1ah6WQDha-_ifYcNdkpkH5cGk9IcHAKIJGUKTmC7TjiHwOjyaWyrF/s0/Fonts+Win10+03.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8TDMG1XCOwDn0uKAbQSGrTX0GNVlbnV-eC2NsYS1lmV57IW9sN_VvOiKhy1BaXW0s_8LrVGEmIkJf7bYhf2mLaXdLeeZq54sSt_LPb1HJS9Ovl-KCvmFP8OlsIjQoXPz-xyQ/s0/Fonts+Win10+04.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="598" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK8TDMG1XCOwDn0uKAbQSGrTX0GNVlbnV-eC2NsYS1lmV57IW9sN_VvOiKhy1BaXW0s_8LrVGEmIkJf7bYhf2mLaXdLeeZq54sSt_LPb1HJS9Ovl-KCvmFP8OlsIjQoXPz-xyQ/s0/Fonts+Win10+04.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_FN_8NOb6YUUvjRwlmmydkc8qok7hD1iGhFrFaTnLDBpSWteUSHdQvNlNDxtr0_MNKd3j4NoG0ItoknLPo8pVzdqUI7u-LtHiOz-7lG4GeJ85BH3bm529tVRisJPOGV7H0I0/s0/Fonts+Win10+05.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="641" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw_FN_8NOb6YUUvjRwlmmydkc8qok7hD1iGhFrFaTnLDBpSWteUSHdQvNlNDxtr0_MNKd3j4NoG0ItoknLPo8pVzdqUI7u-LtHiOz-7lG4GeJ85BH3bm529tVRisJPOGV7H0I0/s0/Fonts+Win10+05.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3d7sfIy3cOOnhvhsxKsAkL0q1J8OzZls2ul-PWXW9d600pl44aIMtsK_v9CL-YG_KH_dWFdlqTw-xMa9G_-0Klq_E2k-FD0Ibmh0wsqLVukYC9p7wPSACXGT1Gj5yb1wIKq9i/s0/Fonts+Win10+06.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="511" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3d7sfIy3cOOnhvhsxKsAkL0q1J8OzZls2ul-PWXW9d600pl44aIMtsK_v9CL-YG_KH_dWFdlqTw-xMa9G_-0Klq_E2k-FD0Ibmh0wsqLVukYC9p7wPSACXGT1Gj5yb1wIKq9i/s0/Fonts+Win10+06.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEMvsLMNHw7yJb6YyXckQ2ef_Pa1Kz_Cn3xWcfmxNvfamUvzLsINT5TObxChu8eQxM1fPk9JEbeYtHXkzeoMcs7YlxK-gE0lpdMPDnjVxzNetLAtFWpQqANFW9PnVQFoDk6IHF/s0/Fonts+Win10+07.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="302" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEMvsLMNHw7yJb6YyXckQ2ef_Pa1Kz_Cn3xWcfmxNvfamUvzLsINT5TObxChu8eQxM1fPk9JEbeYtHXkzeoMcs7YlxK-gE0lpdMPDnjVxzNetLAtFWpQqANFW9PnVQFoDk6IHF/s0/Fonts+Win10+07.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxMpZ5sRGaredHAguMEdG8ZQlQ4GTt3Fi_QZBeXGGYbcsLS_TZh099eFZK0Vyxg3CP214qoIY1IEIUrNtHgMVZmItome8_i3cvOuIPgNTzeC1cbeynMJJs-_iSrcJepl_E-bE/s0/Fonts+Win10+08.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="806" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDxMpZ5sRGaredHAguMEdG8ZQlQ4GTt3Fi_QZBeXGGYbcsLS_TZh099eFZK0Vyxg3CP214qoIY1IEIUrNtHgMVZmItome8_i3cvOuIPgNTzeC1cbeynMJJs-_iSrcJepl_E-bE/s0/Fonts+Win10+08.PNG"/></a> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4OZOMENsKGrfPY59BBBc7_cX36I0UqdwKhEgRHLi5UCQpxlgYwqLN_XH5ajZtCBxYjnwbQbQ40eKe1Gr4eUnXXg4B7lAklldZJZhOXXjJViXTvXL6UODnqAnE0OzeWu46Ftt/s0/Fonts+Win10+09.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="595" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA4OZOMENsKGrfPY59BBBc7_cX36I0UqdwKhEgRHLi5UCQpxlgYwqLN_XH5ajZtCBxYjnwbQbQ40eKe1Gr4eUnXXg4B7lAklldZJZhOXXjJViXTvXL6UODnqAnE0OzeWu46Ftt/s0/Fonts+Win10+09.PNG"/></a></div>
To install "Feature on Demand" font packages, select the Start button, and then select "Settings" > "Apps" > "Apps & features" > "Add an optional feature" and choose from various supplemental fonts. A reboot may be required. <a href="https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list#fonts-included-in-feature-on-demand-fod-packages" target="_blank">Here is the list</a>:<blockquote> Arabic Script (14 fonts)<br>
Bangla Script (4 fonts)<br>
Canadian Aboriginal Syllablics (1 font)<br>
Cherokee (1 font)<br>
Chinese (Simplified) (6 fonts)<br>
Chinese (Traditional) (4 fonts)<br>
Devangari (15 fonts)<br>
Ethiopic (1 font)<br>
Gujarati (2 fonts)<br>
Gurmukhi<br>
Hebrew (12 fonts)<br>
Japanese (25 fonts)<br>
Kannada (2 fonts)<br>
Khumer (4 fonts)<br>
Korean (8 fonts)<br>
Lao (3 fonts)<br>
Malayalam (2 fonts)<br>
Odia (2 fonts)<br>
Pan-European (88 fonts, including <a href="https://docs.microsoft.com/en-us/typography/font-list/arial-nova" target="_blank">Arial Nova</a>, <a href="https://docs.microsoft.com/en-us/typography/font-list/georgia-pro" target="_blank">Georgia Pro</a>, <a href="Gill%20Sans%20Nova" target="_blank">Gill Sans Nova</a>, <a href="https://docs.microsoft.com/en-us/typography/font-list/neue-haas-grotesk-text-pro" target="_blank">Neue Haas Grotesk Text Pro</a>, <a href="https://docs.microsoft.com/en-us/typography/font-list/rockwell" target="_blank">Rockwell Nova</a>, and <a href="https://docs.microsoft.com/en-us/typography/font-list/verdana-pro" target="_blank">Verdana Pro</a> families)<br>
Sinhala (2 fonts)<br>
Syriac (1 font)<br>
Tamil (4 fonts)<br>
Telugu (4 fonts)<br>
Thai (54 fonts)</blockquote>
You may have noticed a whole lot more fonts. Indeed there are, if <i>Microsoft 365</i> (Office) has been preinstalled, as it was in the standard <i>Windows</i> 10 20H2 installation ISO file for <i>Windows 10 Home</i> and <i>Windows 10 Pro</i>. I have shown the ones that are NOT also found in <i>Office 2007</i> in bold. There are 219 office fonts:<blockquote><a href="https://docs.microsoft.com/en-us/typography/font-list/agency-fb" target="_blank">Agency FB</a><br>
Agency FB Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/algerian" target="_blank">Algerian</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/arial-narrow" target="_blank">Arial Narrow</a><br>
Arial Narrow Bold<br>
Arial Narrow Bold Italic<br>
Arial Narrow Italic<br>
Arial Rounded MT Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/baskerville-old-face" target="_blank">Baskerville Old Face</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bauhaus-93" target="_blank">Bauhaus 93</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bell-mt" target="_blank">Bell MT</a><br>
Bell MT Bold<br>
Bell MT Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/berlin-sans-fb" target="_blank">Berlin Sans FB</a><br>
Berlin Sans FB Bold<br>
Berlin Sans FB Demi Bold<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bernard-mt-condensed" target="_blank">Bernard MT Condensed</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/blackadder-itc" target="_blank">Blackadder ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bodoni-mt" target="_blank">Bodoni MT</a><br>
Bodoni MT Black<br>
Bodoni MT Black Italic<br>
Bodoni MT Bold<br>
Bodoni MT Bold Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bodoni-mt-condensed" target="_blank">Bodoni MT Condensed</a><br>
Bodoni MT Condensed Bold<br>
Bodoni MT Condensed Bold Italic<br>
Bodoni MT Condensed Italic<br>
Bodoni MT Italic<br>
Bodoni MT Poster Compressed<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/book-antiqua" target="_blank">Book Antiqua</a><br>
Book Antiqua Bold<br>
Book Antiqua Bold Italic<br>
Book Antiqua Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bookman-old-style" target="_blank">Bookman Old Style</a><br>
Bookman Old Style Bold<br>
Bookman Old Style Bold Italic<br>
Bookman Old Style Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bookshelf-symbol" target="_blank">Bookshelf Symbol 7</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/bradley-hand-itc" target="_blank">Bradley Hand ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/britannic-bold" target="_blank">Britannic Bold</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/broadway" target="_blank">Broadway</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/brush-script-mt" target="_blank">Brush Script MT Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/calibri" target="_blank">Calibri</a><br>
Calibri Bold<br>
Calibri Bold Italic<br>
Calibri Italic<br>
<b>Calibri Light<br>
Calibri Light Italic</b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/californian-fb" target="_blank">Californian FB</a><br>
Californian FB Bold<br>
Californian FB Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/calisto-mt" target="_blank">Calisto MT</a><br>
Calisto MT Bold<br>
Calisto MT Bold Italic<br>
Calisto MT Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/cambria" target="_blank">Cambria</a><br>
Cambria Bold<br>
Cambria Bold Italic<br>
Cambria Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/candara" target="_blank">Candara</a><br>
Candara Bold<br>
Candara Bold Italic<br>
Candara Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/castellar" target="_blank">Castellar</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/centaur" target="_blank">Centaur</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/century" target="_blank">Century</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/century-gothic" target="_blank">Century Gothic</a><br>
Century Gothic Bold<br>
Century Gothic Bold Italic<br>
Century Gothic Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/century-schoolbook" target="_blank">Century Schoolbook</a><br>
Century Schoolbook Bold<br>
Century Schoolbook Bold Italic<br>
Century Schoolbook Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/chiller" target="_blank">Chiller</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/colonna-mt" target="_blank">Colonna MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/consolas" target="_blank">Consolas</a><br>
Consolas Bold<br>
Consolas Bold Italic<br>
Consolas Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/constantia" target="_blank">Constantia</a><br>
Constantia Bold<br>
Constantia Bold Italic<br>
Constantia Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/cooper-black" target="_blank">Cooper Black</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/copperplate-gothic" target="_blank">Copperplate Gothic</a> Bold<br>
Copperplate Gothic Light<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/corbel" target="_blank">Corbel</a><br>
Corbel Bold<br>
Corbel Bold Italic<br>
Corbel Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/curlz-mt" target="_blank">Curlz MT</a><br>
<b><i>Dubai Bold<br>
Dubai Light<br>
Dubai Medium<br>
Dubai Regular</i></b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/edwardian-script-itc" target="_blank">Edwardian Script ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/elephant" target="_blank">Elephant</a><br>
Elephant Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/engravers-mt" target="_blank">Engravers MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/eras-itc" target="_blank">Eras</a> Bold ITC<br>
Eras Demi ITC<br>
Eras Light ITC<br>
Eras Medium ITC<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/felix-titling" target="_blank">Felix Titling</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/footlight-mt" target="_blank">Footlight MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/forte" target="_blank">Forte</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/franklin-gothic" target="_blank">Franklin Gothic</a> Book<br>
Franklin Gothic Book Italic<br>
Franklin Gothic Demi<br>
Franklin Gothic Demi Cond<br>
Franklin Gothic Demi Italic<br>
Franklin Gothic Heavy<br>
Franklin Gothic Heavy Italic<br>
Franklin Gothic Medium Cond<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/freestyle-script" target="_blank">Freestyle Script</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/french-script-mt" target="_blank">French Script MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gabriola" target="_blank"><b>Gabriola</b></a><br>
<b><i><a href="https://docs.microsoft.com/en-us/typography/font-list/gadugi" target="_blank">Gadugi</a><br>
Gadugi Bold</i></b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/garamond" target="_blank">Garamond</a><br>
Garamond Bold<br>
Garamond Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gigi" target="_blank">Gigi</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gill-sans-mt" target="_blank">Gill Sans MT</a><br>
Gill Sans MT Bold<br>
Gill Sans MT Bold Italic<br>
Gill Sans MT Condensed<br>
Gill Sans MT Ext Condensed Bold<br>
Gill Sans MT Italic<br>
Gill Sans Ultra Bold<br>
Gill Sans Ultra Bold Condensed<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gloucester" target="_blank">Gloucester MT Extra Condensed</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/goudy-old-style" target="_blank">Goudy Old Style</a><br>
Goudy Old Style Bold<br>
Goudy Old Style Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/goudy-stout" target="_blank">Goudy Stout</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/haettenschweiler" target="_blank">Haettenschweiler</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/harlow-solid-italic" target="_blank">Harlow Solid Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/harrington" target="_blank">Harrington</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/high-tower-text" target="_blank">High Tower Text</a><br>
High Tower Text Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/imprint-mt-shadow" target="_blank">Imprint MT Shadow</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/informal-roman" target="_blank">Informal Roman</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/jokerman" target="_blank">Jokerman</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/juice-itc" target="_blank">Juice ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/kristen-itc" target="_blank">Kristen ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/kunstler-script" target="_blank">Kunstler Script</a><br>
<b><i><a href="https://docs.microsoft.com/en-us/typography/font-list/leelawadee-ui" target="_blank">Leelawadee</a><br>
Leelawadee Bold</i></b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-bright" target="_blank">Lucida Bright</a><br>
Lucida Bright Demibold<br>
Lucida Bright Demibold Italic<br>
Lucida Bright Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-calligraphy" target="_blank">Lucida Calligraphy Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-fax" target="_blank">Lucida Fax</a> Demibold<br>
Lucida Fax Demibold Italic<br>
Lucida Fax Italic<br>
Lucida Fax Regular<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-handwriting" target="_blank">Lucida Handwriting Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-sans" target="_blank">Lucida Sans</a> Demibold Italic<br>
Lucida Sans Demibold Roman<br>
Lucida Sans Italic<br>
Lucida Sans Regular<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/lucida-sans-typewriter" target="_blank">Lucida Sans Typewriter</a> Bold<br>
Lucida Sans Typewriter Bold Oblique<br>
Lucida Sans Typewriter Oblique<br>
Lucida Sans Typewriter Regular<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/magneto" target="_blank">Magneto Bold</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/maiandra-gd" target="_blank">Maiandra GD</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/matura-mt-script-capitals" target="_blank">Matura MT Script Capitals</a><br>
<b><i><a href="https://docs.microsoft.com/en-us/typography/font-list/microsoft-uighur" target="_blank">Microsoft Uighur</a><br>
Microsoft Uighur Bold</i></b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/mistral" target="_blank">Mistral</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/modern-no.-20" target="_blank">Modern No. 20</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/monotype-corsiva" target="_blank">Monotype Corsiva</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/mt-extra" target="_blank"><b>MT Extra</b></a> (symbols)<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/niagara" target="_blank">Niagara</a> Engraved<br>
Niagara Solid<br>
<b><i><a href="https://docs.microsoft.com/en-us/typography/font-list/nirmala-ui" target="_blank">Nirmala UI</a><br>
Nirmala UI Bold<br>
Nirmala UI Semilight</i></b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/ocr-a-extended" target="_blank">OCR A Extended</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/old-english-text-mt" target="_blank">Old English Text MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/onyx">Onyx</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/palace-script-mt" target="_blank">Palace Script MT</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/papyrus" target="_blank">Papyrus</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/parchment" target="_blank">Parchment</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/perpetua" target="_blank">Perpetua</a><br>
Perpetua Bold<br>
Perpetua Bold Italic<br>
Perpetua Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/perpetua-titling-mt" target="_blank">Perpetua Titling MT</a> Bold<br>
Perpetua Titling MT Light<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/playbill">Playbill</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/poor-richard" target="_blank">Poor Richard</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/pristina" target="_blank">Pristina</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/rage-italic" target="_blank">Rage Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/ravie" target="_blank">Ravie</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/rockwell" target="_blank">Rockwell</a><br>
Rockwell Bold<br>
Rockwell Bold Italic<br>
Rockwell Condensed<br>
Rockwell Condensed Bold<br>
Rockwell Extra Bold<br>
Rockwell Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/script-mt-bold" target="_blank">Script MT Bold</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/segoe-ui" target="_blank">Segoe UI</a><br>
Segoe UI Bold<br>
Segoe UI Bold Italic<br>
Segoe UI Italic<br>
<b>Segoe UI Semilight</b><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/showcard-gothic" target="_blank">Showcard Gothic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/snap-itc" target="_blank">Snap ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/stencil" target="_blank">Stencil</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/tempus-sans-itc" target="_blank">Tempus Sans ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/tw-cen-mt" target="_blank">Tw Cen MT</a><br>
Tw Cen MT Bold<br>
Tw Cen MT Bold Italic<br>
Tw Cen MT Condensed<br>
Tw Cen MT Condensed Bold<br>
Tw Cen MT Condensed Extra Bold<br>
Tw Cen MT Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/viner-hand-itc" target="_blank">Viner Hand ITC</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/vivaldi" target="_blank">Vivaldi Italic</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/vladimir-script" target="_blank">Vladimir Script</a><br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/wide-latin" target="_blank">Wide Latin</a></blockquote>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCO-SSfudqHKElpUwzpPAFzSTLDnPr7RfTgt5KXnMOVGZODOFW2YfAq7RdZFUCn9bKlHa2nzyv0k1BaP5db_jzxzAtAS1s3mxFjsIvOmEy3cQpfPDwHJ0b-tGMMcdaPnOGihQ/s0/Fonts+Office+01.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="678" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisCO-SSfudqHKElpUwzpPAFzSTLDnPr7RfTgt5KXnMOVGZODOFW2YfAq7RdZFUCn9bKlHa2nzyv0k1BaP5db_jzxzAtAS1s3mxFjsIvOmEy3cQpfPDwHJ0b-tGMMcdaPnOGihQ/s0/Fonts+Office+01.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi06WBV4Tivfpv2PLH73cnkAFFcEjXoakh8hW_BZAGj6zYnMV-hETWl3SWThq78nDqu8l3RYnosIaD8tsLWSuJXermdWskoJ9ma5V6i4rZH8fWHm8fU6S-WvhOLDp0Eriyyrx_T/s0/Fonts+Office+02.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="808" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi06WBV4Tivfpv2PLH73cnkAFFcEjXoakh8hW_BZAGj6zYnMV-hETWl3SWThq78nDqu8l3RYnosIaD8tsLWSuJXermdWskoJ9ma5V6i4rZH8fWHm8fU6S-WvhOLDp0Eriyyrx_T/s0/Fonts+Office+02.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6TCjauxa8Bm-54OTDe9N9yQSaeLa7q-QF0RiE7-FFf2Ali4LwU-T5-PcHzZ5Vyc6X0WYnNt56BBeedDDERb4AaKb0huu7cXcHP03dLO8QqAUfqGvrxOPSNqZI2F97VYM1Hku4/s0/Fonts+Office+03.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="760" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6TCjauxa8Bm-54OTDe9N9yQSaeLa7q-QF0RiE7-FFf2Ali4LwU-T5-PcHzZ5Vyc6X0WYnNt56BBeedDDERb4AaKb0huu7cXcHP03dLO8QqAUfqGvrxOPSNqZI2F97VYM1Hku4/s0/Fonts+Office+03.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-2gwZiNpKUJK9fktCiROqJBpsrxw15j6jZQbM8J6OQ513LoEG0YHaEjmGyXaHXf7RGJsUALNCPeoCY0m3j5SY4y3MwblOARkVtRKQWupL_BZv4X0uWcPJzH6muUn9yCj0vNZF/s0/Fonts+Office+04.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="805" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-2gwZiNpKUJK9fktCiROqJBpsrxw15j6jZQbM8J6OQ513LoEG0YHaEjmGyXaHXf7RGJsUALNCPeoCY0m3j5SY4y3MwblOARkVtRKQWupL_BZv4X0uWcPJzH6muUn9yCj0vNZF/s0/Fonts+Office+04.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghuidsxfHFMWF8ozes6wMPgBr3z9gwuMPzhoGg94XooaM-Ug2o27n-WnkpQdKNI8zyEJjAupdUE5rKv1BTqGfmtQX1BoH3Y7tPCPXX3ZsRvDa3y0KHdjjYvUKNl2Tov9S4W8Me/s0/Fonts+Office+05.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="814" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghuidsxfHFMWF8ozes6wMPgBr3z9gwuMPzhoGg94XooaM-Ug2o27n-WnkpQdKNI8zyEJjAupdUE5rKv1BTqGfmtQX1BoH3Y7tPCPXX3ZsRvDa3y0KHdjjYvUKNl2Tov9S4W8Me/s0/Fonts+Office+05.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo3Q49HOEvjapwMBQ_e9Qkm3rr9Y10hXsWQMgUc7OLKc-lV1fHffdRxfhVToxKocBN9FycnB1ZGl1ms_doCApFi2-FwJIoehRP_qjPlDjySQo6k0zhyphenhyphenDjxy7UicJjwlul8Y76a/s0/Fonts+Office+06.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="809" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo3Q49HOEvjapwMBQ_e9Qkm3rr9Y10hXsWQMgUc7OLKc-lV1fHffdRxfhVToxKocBN9FycnB1ZGl1ms_doCApFi2-FwJIoehRP_qjPlDjySQo6k0zhyphenhyphenDjxy7UicJjwlul8Y76a/s0/Fonts+Office+06.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh15Ir5XLmHn5n7rLurnkJ9zTnNt4geWjGCUQKmQbakgUrhFziOzU9Y2hJNWvAbLGZkpkJ84EWBaR6w_sCnXns34hNKU6dWGnJX4dM0YcggaIsrLXlOsD5OtmLLrQpOVRDCvIya/s0/Fonts+Office+07.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="813" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh15Ir5XLmHn5n7rLurnkJ9zTnNt4geWjGCUQKmQbakgUrhFziOzU9Y2hJNWvAbLGZkpkJ84EWBaR6w_sCnXns34hNKU6dWGnJX4dM0YcggaIsrLXlOsD5OtmLLrQpOVRDCvIya/s0/Fonts+Office+07.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-7yndbzK3TByDeoR_L6KDPGUQ9oDtDb1or9tBDrmmv5jlAHxCTkGexQU_kq4sDBFCup1fkk5MX78VH20XGZxj95B8kYFKLQRq6qBBF_M9FGdVhGnWvk6sWTtEY1jLF_r_xYd1/s0/Fonts+Office+08.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="808" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-7yndbzK3TByDeoR_L6KDPGUQ9oDtDb1or9tBDrmmv5jlAHxCTkGexQU_kq4sDBFCup1fkk5MX78VH20XGZxj95B8kYFKLQRq6qBBF_M9FGdVhGnWvk6sWTtEY1jLF_r_xYd1/s0/Fonts+Office+08.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhmPa5PhJHHV-uO3nzTvB28cWG0KcsoD79SX71x_-GWJXfQHAEUIIkcZu0n1A2CAVptWd76Oh_z63t67FbuEhlCBJLQs0_T36Ixisz3lIvyp4VrUjz_uX168uEQfAkjuTVYOHU/s0/Fonts+Office+09.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="343" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhmPa5PhJHHV-uO3nzTvB28cWG0KcsoD79SX71x_-GWJXfQHAEUIIkcZu0n1A2CAVptWd76Oh_z63t67FbuEhlCBJLQs0_T36Ixisz3lIvyp4VrUjz_uX168uEQfAkjuTVYOHU/s0/Fonts+Office+09.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitPT5tKzgBapxZXPBLng_7ignP7abzVxX0GjZWgLZi1GlbHet3MjP1n4bacmsZSDY3DI9pYN0vz7qT8pYymFrv7C5BvnE8n1YZ1cZwxnl6WmDwYuALsfy9N2uyXGEIHo7tQtLi/s0/Fonts+Office+10.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="678" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitPT5tKzgBapxZXPBLng_7ignP7abzVxX0GjZWgLZi1GlbHet3MjP1n4bacmsZSDY3DI9pYN0vz7qT8pYymFrv7C5BvnE8n1YZ1cZwxnl6WmDwYuALsfy9N2uyXGEIHo7tQtLi/s0/Fonts+Office+10.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1i5OXbIy9d4_Yfqdlz2csORSN7s2fdx9p3UJ_sFoVJjn8P03TatoAZVY9NPPBXd6ogpcBAo3cNJFxaEE4W6CphZGNMKAReLUn6U1E2EtIOnSezg1sjbP3KOfLULPVcTOBHgH/s0/Fonts+Office+11.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="598" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt1i5OXbIy9d4_Yfqdlz2csORSN7s2fdx9p3UJ_sFoVJjn8P03TatoAZVY9NPPBXd6ogpcBAo3cNJFxaEE4W6CphZGNMKAReLUn6U1E2EtIOnSezg1sjbP3KOfLULPVcTOBHgH/s0/Fonts+Office+11.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI1Ix_vbqdZ-v_CbTdKPl9byY09YZ0J_vvvE6mkeJJRomBUPyYuaoh4ol_UptLxw4eSsVxCcGYOK1918x_Wl9_s3BV7GEbrpNwnjjMkdD-5jN14uBUHnPgeo5e4XiF60Rpvnze/s0/Fonts+Office+12.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="595" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI1Ix_vbqdZ-v_CbTdKPl9byY09YZ0J_vvvE6mkeJJRomBUPyYuaoh4ol_UptLxw4eSsVxCcGYOK1918x_Wl9_s3BV7GEbrpNwnjjMkdD-5jN14uBUHnPgeo5e4XiF60Rpvnze/s0/Fonts+Office+12.PNG"/></a></div>
I have left out some of the system-type fonts that consist of icons and symbols used internally by programs such as <i>Outlook</i> or <i>OneNote</i>. There are also "cloud fonts" which you can download. To get the cloud fonts, your device needs to be online and connected to the Internet. In apps running on Windows (such as Word), go to "File" > "Account", select "Manage Settings" under "Account Privacy", and turn on "Optional connected experiences". <b>Clearing the check box turns off cloud fonts</b> and other online services from Microsoft. This is helpful to de-clutter your font menu.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>But wait, there's more! The <i>Microsoft Store</i> offers several additional fonts for free, in addition to some that are sold in the store. The free ones are:<blockquote><a href="https://docs.microsoft.com/en-us/typography/font-list/arial-nova" target="_blank">Arial Nova</a><br>
Arial Nova Bold<br>
Arial Nova Bold Italic<br>
Arial Nova Cond<br>
Arial Nova Cond Bold<br>
Arial Nova Cond Bold Italic<br>
Arial Nova Cond Italic<br>
Arial Nova Cond Light<br>
Arial Nova Cond Light Italic<br>
Arial Nova Italic<br>
Arial Nova Light<br>
Arial Nova Light Italic<br>
<a href="https://www.microsoft.com/en-us/p/convection/9n1wr5zsct3r#activetab=pivot:overviewtab" target="_blank">Convection</a><br>
Convection Bold<br>
Convection Condensed<br>
Convection Extra Bold<br>
Convection Italic<br>
Convection Medium<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/georgia-pro" target="_blank">Georgia Pro</a><br>
Georgia Pro Black<br>
Georgia Pro Black Italic<br>
Georgia Pro Bold<br>
Georgia Pro Bold Italic<br>
Georgia Pro Cond<br>
Georgia Pro Cond Black<br>
Georgia Pro Cond Black Italic<br>
Georgia Pro Cond Bold<br>
Georgia Pro Cond Bold Italic<br>
Georgia Pro Cond Italic<br>
Georgia Pro Cond Light<br>
Georgia Pro Cond Light Italic<br>
Georgia Pro Cond Semibold<br>
Georgia Pro Cond Semibold Italic<br>
Georgia Pro Italic<br>
Georgia Pro Light<br>
Georgia Pro Light Italic<br>
Georgia Pro Semibold<br>
Georgia Pro Semibold Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/gill-sans-nova" target="_blank">Gill Sans Nova</a><br>
Gill Sans Nova Bold<br>
Gill Sans Nova Bold Italic<br>
Gill Sans Nova Cond<br>
Gill Sans Nova Cond Bold<br>
Gill Sans Nova Cond Bold Italic<br>
Gill Sans Nova Cond Italic<br>
Gill Sans Nova Cond Lt<br>
Gill Sans Nova Cond Lt Italic<br>
Gill Sans Nova Cond Ultra Bold<br>
Gill Sans Nova Cond XBd<br>
Gill Sans Nova Cond XBd Italic<br>
Gill Sans Nova Italic<br>
Gill Sans Nova Light<br>
Gill Sans Nova Light Italic<br>
Gill Sans Nova Ultra Bold<br>
<a href="https://www.microsoft.com/en-us/p/ink-draft/9npqgc3lck31?activetab=pivot:overviewtab" target="_blank">Ink Draft</a><br>
<a href="https://www.microsoft.com/en-us/p/ink-journal/9p3xkpd2dg5g#activetab=pivot:overviewtab" target="_blank">Ink Journal</a><br>
<a href="https://www.microsoft.com/en-us/p/nina/9p21845v8z53?activetab=pivot:overviewtab">Nina</a><br>
Nina Bold<br>
Nina Bold Italic<br>
Nina Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/rockwell-nova" target="_blank">Rockwell Nova</a><br>
Rockwell Nova Bold<br>
Rockwell Nova Bold Italic<br>
Rockwell Nova Cond<br>
Rockwell Nova Cond Bold<br>
Rockwell Nova Cond Bold Italic<br>
Rockwell Nova Cond Italic<br>
Rockwell Nova Cond Light<br>
Rockwell Nova Cond Light Italic<br>
Rockwell Nova Extra Bold<br>
Rockwell Nova Extra Bold Italic<br>
Rockwell Nova Italic<br>
Rockwell Nova Light<br>
Rockwell Nova Light Italic<br>
<a href="https://docs.microsoft.com/en-us/typography/font-list/verdana-pro" target="_blank">Verdana Pro</a><br>
Verdana Pro Black<br>
Verdana Pro Black Italic<br>
Verdana Pro Bold<br>
Verdana Pro Bold Italic<br>
Verdana Pro Cond<br>
Verdana Pro Cond Black<br>
Verdana Pro Cond Black Italic<br>
Verdana Pro Cond Bold<br>
Verdana Pro Cond Bold Italic<br>
Verdana Pro Cond Italic<br>
Verdana Pro Cond Light<br>
Verdana Pro Cond Light Italic<br>
Verdana Pro Cond Semibold<br>
Verdana Pro Cond Semibold Italic<br>
Verdana Pro Italic<br>
Verdana Pro Light<br>
Verdana Pro Light Italic<br>
Verdana Pro Semibold<br>
Verdana Pro Semibold Italic</blockquote>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixgZzq-l6g9xmdjQs-UT_hhIODXVAcCHjMYiGf8KReAv9AfjAmgKosj1eXP43Q2vA1Mank7yjulCKCkzWKjhY8ehyphenhyphenTpYCmn4zDMZ3G9jWNJZfN8KRoMGP0AQ9kZfDhScleA-Yz/s0/Fonts+Store+1.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="851" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixgZzq-l6g9xmdjQs-UT_hhIODXVAcCHjMYiGf8KReAv9AfjAmgKosj1eXP43Q2vA1Mank7yjulCKCkzWKjhY8ehyphenhyphenTpYCmn4zDMZ3G9jWNJZfN8KRoMGP0AQ9kZfDhScleA-Yz/s0/Fonts+Store+1.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqaLw3NuHFcJ1bAxUOHOJ-zzbYwfv_v823ut6ABvFpYf92fSl-eP2eDmyqIUAz4DSjoxQev7pfcisTm_ipiL-eClTgnBRzVPSWpIgQN7anDZ6zlimoYixk3zMVcRVRsok7j5y1/s0/Fonts+Store+2.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="760" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqaLw3NuHFcJ1bAxUOHOJ-zzbYwfv_v823ut6ABvFpYf92fSl-eP2eDmyqIUAz4DSjoxQev7pfcisTm_ipiL-eClTgnBRzVPSWpIgQN7anDZ6zlimoYixk3zMVcRVRsok7j5y1/s0/Fonts+Store+2.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIirrPzM1orqjgQf3nCiDFwptptto62vqN4K5dhT5tzWiTZQKuO_rqimkSDsRnD69aZoFEGxpZl7p61jswlbrOgnQFrqC7JDrTm9Eg6HDcfZL26_uaq-3OGfFLMv7t_I4cdO1W/s0/Fonts+Store+3.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="763" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIirrPzM1orqjgQf3nCiDFwptptto62vqN4K5dhT5tzWiTZQKuO_rqimkSDsRnD69aZoFEGxpZl7p61jswlbrOgnQFrqC7JDrTm9Eg6HDcfZL26_uaq-3OGfFLMv7t_I4cdO1W/s0/Fonts+Store+3.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Stoe5X3L5nhGe8LvkdH25eXpKCTA-LbrSWlx4D9f4QsvWkC-j5lf1ys_RM1D3G8fZnXVsUicdFWox7Fpy5IUUANKaBRiXH8omQEeqEpJ6Z60udnlG0HQltgulQirXFM8o47_/s0/Fonts+Store+4.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="760" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Stoe5X3L5nhGe8LvkdH25eXpKCTA-LbrSWlx4D9f4QsvWkC-j5lf1ys_RM1D3G8fZnXVsUicdFWox7Fpy5IUUANKaBRiXH8omQEeqEpJ6Z60udnlG0HQltgulQirXFM8o47_/s0/Fonts+Store+4.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0G971MTTKKgVxe1_2PCwo49yPcUdXsnybm2xMj_Jz0vY9m5zz9KrUI5sZMcvBk_XxFdTu3Shs0thb7v2KMhP-rkx2oRPTyKvwVDwLn3PFW_cpulXrWHu6NUuQVqwlRuh5NWc-/s0/Fonts+Store+5.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="582" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0G971MTTKKgVxe1_2PCwo49yPcUdXsnybm2xMj_Jz0vY9m5zz9KrUI5sZMcvBk_XxFdTu3Shs0thb7v2KMhP-rkx2oRPTyKvwVDwLn3PFW_cpulXrWHu6NUuQVqwlRuh5NWc-/s0/Fonts+Store+5.PNG"/></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9SD6nWoHw4Vdt0RcY0A71RxXPUOv5n1oxgK8Qh9x6DP7Cvhfk0Sf5w9D-QEKRubsdq54fcx2ROgTqIhohXsSjTnFgU2W5EWqreM5Aj3j35mKd9kcCyIB-KO9T04lzugYKp2r/s0/Fonts+Store+6.PNG" style="display: block; text-align: center; "><img alt="" width="560" border="0" data-original-height="210" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht9SD6nWoHw4Vdt0RcY0A71RxXPUOv5n1oxgK8Qh9x6DP7Cvhfk0Sf5w9D-QEKRubsdq54fcx2ROgTqIhohXsSjTnFgU2W5EWqreM5Aj3j35mKd9kcCyIB-KO9T04lzugYKp2r/s0/Fonts+Store+6.PNG"/></a></div>
These font listings were compiled with the help of <i><a href="https://www.neuber.com/typograph/" target="_blank">Typograf</a></i>, a very useful font management program. You can use it to "Unload" fonts as well as Uninstall them. There are a lot of fonts that are clearly intended for specific languages that I have unloaded. <i>Typograf</i> shows the fonts in filename order by default, which explains why some of the font images appear to be in a different order to the font list.
<br><img src="https://www.mustang.co.za/img/dot.gif" hspace=10 width=1 height=1 border=0>Microsoft has published several explanations about its fonts, as well as a <a href="https://docs.microsoft.com/en-us/typography/fonts/windows_10_font_list" target="_blank">list of fonts for Windows 10</a>. It also has an explanation of each font's background and purpose. Remember if you are using optional or downloaded fonts that if you send a document to someone else, or use the font in an email, <i>the person who receives it won't see the font correctly unless they also have it installed</i>. To avoid this problem, export the document as a PDF or embed the fonts in the document. PDF is better: it preserves all the formatting and spacing correctly, as well as embedding the fonts you used.<br>
<b>Update Monday 1 Feb 2021</b>: I have found <a href="https://www.sevenforums.com/tutorials/1076-fonts-delete.html" target="_blank">this useful article</a> about deleting fonts. As a result, I created the following registry file to remove the "foreign" fonts that I don't use.<br>
<pre>
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Dubai Bold (TrueType)"=-
"Dubai Light (TrueType)"=-
"Dubai Medium (TrueType)"=-
"Dubai Regular (TrueType)"=-
"Ebrima (TrueType)"=-
"Ebrima Bold (TrueType)"=-
"Gadugi (TrueType)"=-
"Gadugi Bold (TrueType)"=-
"Javanese Text (TrueType)"=-
"Leelawadee UI (TrueType)"=-
"Leelawadee UI Bold (TrueType)"=-
"Leelawadee UI Semilight (TrueType)"=-
"Malgun Gothic (TrueType)"=-
"Malgun Gothic Bold (TrueType)"=-
"Malgun Gothic SemiLight (TrueType)"=-
"Microsoft Himalaya (TrueType)"=-
"Microsoft JhengHei & Microsoft JhengHei UI (TrueType)"=-
"Microsoft JhengHei Bold & Microsoft JhengHei UI Bold (TrueType)"=-
"Microsoft JhengHei Light & Microsoft JhengHei UI Light (TrueType)"=-
"Microsoft New Tai Lue (TrueType)"=-
"Microsoft New Tai Lue Bold (TrueType)"=-
"Microsoft PhagsPa (TrueType)"=-
"Microsoft PhagsPa Bold (TrueType)"=-
"Microsoft Tai Le (TrueType)"=-
"Microsoft Tai Le Bold (TrueType)"=-
"Microsoft YaHei & Microsoft YaHei UI (TrueType)"=-
"Microsoft YaHei Bold & Microsoft YaHei UI Bold (TrueType)"=-
"Microsoft YaHei Light & Microsoft YaHei UI Light (TrueType)"=-
"Microsoft Yi Baiti (TrueType)"=-
"MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB (TrueType)"=-
"Mongolian Baiti (TrueType)"=-
"MS Gothic & MS UI Gothic & MS PGothic (TrueType)"=-
"MV Boli (TrueType)"=-
"Myanmar Text (TrueType)"=-
"Myanmar Text Bold (TrueType)"=-
"Nirmala UI (TrueType)"=-
"Nirmala UI Bold (TrueType)"=-
"Nirmala UI Semilight (TrueType)"=-
"SimSun & NSimSun (TrueType)"=-
"SimSun-ExtB (TrueType)"=-
"Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold (TrueType)"=-
"Yu Gothic Light & Yu Gothic UI Light (TrueType)"=-
"Yu Gothic Medium & Yu Gothic UI Regular (TrueType)"=-
"Yu Gothic Regular & Yu Gothic UI Semilight (TrueType)"=-
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Fonts]
"Dubai Bold (TrueType)"=-
"Dubai Light (TrueType)"=-
"Dubai Medium (TrueType)"=-
"Dubai Regular (TrueType)"=-
"Ebrima (TrueType)"=-
"Ebrima Bold (TrueType)"=-
"Gadugi (TrueType)"=-
"Gadugi Bold (TrueType)"=-
"Javanese Text (TrueType)"=-
"Leelawadee UI (TrueType)"=-
"Leelawadee UI Bold (TrueType)"=-
"Leelawadee UI Semilight (TrueType)"=-
"Malgun Gothic (TrueType)"=-
"Malgun Gothic Bold (TrueType)"=-
"Malgun Gothic SemiLight (TrueType)"=-
"Microsoft Himalaya (TrueType)"=-
"Microsoft JhengHei & Microsoft JhengHei UI (TrueType)"=-
"Microsoft JhengHei Bold & Microsoft JhengHei UI Bold (TrueType)"=-
"Microsoft JhengHei Light & Microsoft JhengHei UI Light (TrueType)"=-
"Microsoft New Tai Lue (TrueType)"=-
"Microsoft New Tai Lue Bold (TrueType)"=-
"Microsoft PhagsPa (TrueType)"=-
"Microsoft PhagsPa Bold (TrueType)"=-
"Microsoft Tai Le (TrueType)"=-
"Microsoft Tai Le Bold (TrueType)"=-
"Microsoft YaHei & Microsoft YaHei UI (TrueType)"=-
"Microsoft YaHei Bold & Microsoft YaHei UI Bold (TrueType)"=-
"Microsoft YaHei Light & Microsoft YaHei UI Light (TrueType)"=-
"Microsoft Yi Baiti (TrueType)"=-
"MingLiU-ExtB & PMingLiU-ExtB & MingLiU_HKSCS-ExtB (TrueType)"=-
"Mongolian Baiti (TrueType)"=-
"MS Gothic & MS UI Gothic & MS PGothic (TrueType)"=-
"MV Boli (TrueType)"=-
"Myanmar Text (TrueType)"=-
"Myanmar Text Bold (TrueType)"=-
"Nirmala UI (TrueType)"=-
"Nirmala UI Bold (TrueType)"=-
"Nirmala UI Semilight (TrueType)"=-
"SimSun & NSimSun (TrueType)"=-
"SimSun-ExtB (TrueType)"=-
"Yu Gothic Bold & Yu Gothic UI Semibold & Yu Gothic UI Bold (TrueType)"=-
"Yu Gothic Light & Yu Gothic UI Light (TrueType)"=-
"Yu Gothic Medium & Yu Gothic UI Regular (TrueType)"=-
"Yu Gothic Regular & Yu Gothic UI Semilight (TrueType)"=-
</pre>
Copy and paste these registry commands into a text file and save it with a .reg extension. Run it and reboot the PC. All the fonts listed here will no longer show up in your font menus. The second half of this file is for 64-bit systems.<br>
<br>Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0tag:blogger.com,1999:blog-19298483.post-29108855939329994022020-12-31T18:23:00.012+02:002021-07-31T21:08:47.700+02:00Learning Clarion (Part 4)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This follows on from <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html">Learning Clarion (Part 3)</a>. First, we are going to create a browse window, and then an update window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyciffEB2Z4QmW3GXE5wTeQmnyB0dYwhJbD31PuveGwLvqlcZDhTIQmbFZh1jo5VfjTsJgaiDaj-VHttayJBTCj56CMb1LusqxVMM5-_AiTBUiT-2F1r_XgrSgtqXhcA7MwDMX/s764/GS+Lesson+8-9.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="596" data-original-width="764" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyciffEB2Z4QmW3GXE5wTeQmnyB0dYwhJbD31PuveGwLvqlcZDhTIQmbFZh1jo5VfjTsJgaiDaj-VHttayJBTCj56CMb1LusqxVMM5-_AiTBUiT-2F1r_XgrSgtqXhcA7MwDMX/s400/GS+Lesson+8-9.png" width="400" /></a></div>
These are the ones we created in the <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html"><i>Getting Started</i></a> exercise 8 and following.<br />
<br />
<h1>Lesson 7: Creating a Browse</h1>
In this lesson, you’ll create a browse window similar to the one created for you by the Application Wizard. The Application Generator uses the same templates, which generate the same basic code; but doing it this way, you’ll have a chance to "do it from scratch." This shows you just how much the Wizards do for you, and how you can do it all yourself, too. We start with the Customer browse window, using the Browse procedure template.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZwIGPI67q_3xJchz9stE5seWBlC3YfD1fFwT8HIGCiUx7gpbH_-GZXQRpqpl07TIOnzQGlUSiKO39oDUpwoKAmhY4a2CXJpSajZwFtCqQdwVDEETS3W1PlNQqfegL9MlCa26/s1007/LC+Lesson+7-1.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="650" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYZwIGPI67q_3xJchz9stE5seWBlC3YfD1fFwT8HIGCiUx7gpbH_-GZXQRpqpl07TIOnzQGlUSiKO39oDUpwoKAmhY4a2CXJpSajZwFtCqQdwVDEETS3W1PlNQqfegL9MlCa26/s400/LC+Lesson+7-1.png" width="400" /></a></div>
Double-click on "BrowseCustomers" in the Application Tree. This opens the "Select Procedure Type" dialog. Go to the "Defaults" tab and highlight the "Browse with Update and Select" Procedure template. Then press the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT30HbF_VzJ-MdxFdX3aiE1SUlm5JTFKxNoMj2yr0Wfa-iQniqo5a933kpCUwWQY5mwIGbr8_ePres305mz7s6i9XWjODjn4B7UOC9Pu0TDVJd7EX0TNtXUaKnr2l6sBQI3kpH/s1008/LC+Lesson+7-2.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="651" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT30HbF_VzJ-MdxFdX3aiE1SUlm5JTFKxNoMj2yr0Wfa-iQniqo5a933kpCUwWQY5mwIGbr8_ePres305mz7s6i9XWjODjn4B7UOC9Pu0TDVJd7EX0TNtXUaKnr2l6sBQI3kpH/s400/LC+Lesson+7-2.png" width="400" /></a></div>
The "Procedure Properties" dialog appears. Type in a description as shown and go to the "Extensions" tab.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinbR9Poqhlf6bQwuRlqrLJe08SSgQ-oprGasmj9O9JhWPqjoI71QNHUk02jjcItcP2bAqhkE4PCwky9gFsQiuQreOFZkH-6SguiXyk1Y8i3cW13ZpdJihNMXEVwEKNeFY2VDsN/s1008/LC+Lesson+7-3.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="650" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinbR9Poqhlf6bQwuRlqrLJe08SSgQ-oprGasmj9O9JhWPqjoI71QNHUk02jjcItcP2bAqhkE4PCwky9gFsQiuQreOFZkH-6SguiXyk1Y8i3cW13ZpdJihNMXEVwEKNeFY2VDsN/s400/LC+Lesson+7-3.png" width="400" /></a></div>
Click on the "Insert" button, and choose the "WindowResize" extension. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5QcDwyYvJnMqLE_OAIBygADlVBbBWbPai5TDNFFoUaK3MC64czCXkZUOfdTxRjAsZyrs5lB5A1YtfL9NVgMN59Wk4KJuMdFi5s0oqjWl0EI4xHP8YXd70a6FESt8snNaktqya/s828/LC+Lesson+7-4.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="416" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5QcDwyYvJnMqLE_OAIBygADlVBbBWbPai5TDNFFoUaK3MC64czCXkZUOfdTxRjAsZyrs5lB5A1YtfL9NVgMN59Wk4KJuMdFi5s0oqjWl0EI4xHP8YXd70a6FESt8snNaktqya/s400/LC+Lesson+7-4.png" width="400" /></a></div>
This Extension template generates code to automatically handle resizing and re-positioning all the controls in the window when the user resizes the window, either by resizing the window frame, or by pressing the Maximize/Restore buttons. Press the "OK" button to close the window resize template dialog.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgns-jYKoY-CskRDPKTi6nkk-yvcYeiGtdUikbRjhC1XHOD-Bwx8OTtENZE6rb73zW3cOR-wDCiCoLc50Topnvsq3kYxce7g-r2fQr4FibCCz9zZhVxPSqLqD1YMKV27FfFFEeJ/s968/LC+Lesson+7-5.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="527" data-original-width="968" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgns-jYKoY-CskRDPKTi6nkk-yvcYeiGtdUikbRjhC1XHOD-Bwx8OTtENZE6rb73zW3cOR-wDCiCoLc50Topnvsq3kYxce7g-r2fQr4FibCCz9zZhVxPSqLqD1YMKV27FfFFEeJ/s400/LC+Lesson+7-5.png" width="400" /></a></div>
Return to the "Properties" tab of the "BrowseCustomers" procedure properties, and click on the "Window" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaQbOnYBWFW7pqIatGFf-mTDPKmQZwVMwnYW-Eyfc-IIZ7u3CAOTJP4j_s0P5h-C7-8xAP2sImrRn9UcXQS0rgejGrSL5Wupuea6-woOKCm8bwHBVl1I3P3c20nXT9e4LEPBrN/s1007/LC+Lesson+7-5.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="516" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaQbOnYBWFW7pqIatGFf-mTDPKmQZwVMwnYW-Eyfc-IIZ7u3CAOTJP4j_s0P5h-C7-8xAP2sImrRn9UcXQS0rgejGrSL5Wupuea6-woOKCm8bwHBVl1I3P3c20nXT9e4LEPBrN/s400/LC+Lesson+7-5.png" width="400" /></a></div>
Click on the window’s title bar, and open the Properties Pad (F4). Type "Browse Customers" in the Title property. Change the "FrameType" property to "Resizable". It's the top property in the list. Scroll down and find the "MaximizeBox" property and change it to "True". These steps allow the user to resize the frame at runtime.<br />
<br />
<h2>Populating and Formatting a List Box Control</h2>
The List Box Formatter allows you to format the data in the list.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlm_LajhvXGHlINlkNuO9h4AqVUA_c8yt_A2tRtaJrelzEKUV0HgMxhoq35pUnBNNcK6hPzdAU7oi9Y4SJK5wMnqyiMP4DkyzhgmxAKoL39nT4eOoHvLvqiQWGPr-TZs8sCJ5K/s862/LC+Lesson+7-6.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="556" data-original-width="862" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlm_LajhvXGHlINlkNuO9h4AqVUA_c8yt_A2tRtaJrelzEKUV0HgMxhoq35pUnBNNcK6hPzdAU7oi9Y4SJK5wMnqyiMP4DkyzhgmxAKoL39nT4eOoHvLvqiQWGPr-TZs8sCJ5K/s400/LC+Lesson+7-6.png" width="400" /></a></div>
Right-click on the list box control, and select "List Box format ..."<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAC-aIdj1bytC_Ak6DaGezqW0piJzBTqAHkLcKYuvxHKKz_kIkt-a84uYEHLgAS45kMZbBM4S35Ozj-4gcl5QdH3CC0i1NflZzMQo1hGyYJMX4o3GdTNM3yVaWU4uS5NlKmCPs/s1005/LC+Lesson+7-7.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1005" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAC-aIdj1bytC_Ak6DaGezqW0piJzBTqAHkLcKYuvxHKKz_kIkt-a84uYEHLgAS45kMZbBM4S35Ozj-4gcl5QdH3CC0i1NflZzMQo1hGyYJMX4o3GdTNM3yVaWU4uS5NlKmCPs/s400/LC+Lesson+7-7.png" width="400" /></a></div>
Click on the "Add Field" button (circled in blue above). This opens the "Select Column" dialog. Click on "<ToDo>" and then "Add". Choose the "Customer" table and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0GxC-EOG5VcHoPPbENKrCwqJc3EgYMw8qjpgHM_MEFFcDZSbUvO3YBwNHBKuFZMuZmP-x1mQiuPQyQi6O3K0LiL7QGgBKKcwoULYVeLhYj0ZA3J8JTqHcHJvUpYvHGlG1Bkda/s725/LC+Lesson+7-8.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="345" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0GxC-EOG5VcHoPPbENKrCwqJc3EgYMw8qjpgHM_MEFFcDZSbUvO3YBwNHBKuFZMuZmP-x1mQiuPQyQi6O3K0LiL7QGgBKKcwoULYVeLhYj0ZA3J8JTqHcHJvUpYvHGlG1Bkda/s400/LC+Lesson+7-8.png" width="400" /></a></div>
This adds the "Customer" table to the Table Schematic in the Select Column dialog, which now lists the table and its columns. With the "Customer" table selected, click on the "Change" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZEgG8pOFLkQgLy0pYsnZQgpG9ThXvb-HFXYHdqgb2AtqGC6B4RXpFM3xiswIQ2gf0KzUHiK8VDDJerlzlg3sojyOTm5gybUhK-5QOrDfkn6BqMR6rav65xwoJo0KqSkjiY-Tm/s722/LC+Lesson+7-9.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="343" data-original-width="722" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZEgG8pOFLkQgLy0pYsnZQgpG9ThXvb-HFXYHdqgb2AtqGC6B4RXpFM3xiswIQ2gf0KzUHiK8VDDJerlzlg3sojyOTm5gybUhK-5QOrDfkn6BqMR6rav65xwoJo0KqSkjiY-Tm/s400/LC+Lesson+7-9.png" width="400" /></a></div>
Highlight "KeyCustNumber" and press the "Select" button. This is important, because it sets the display order for the rows in the list. If you don’t specify a key, the rows appear in (sort of) whatever order they were added to the table (also called "Row Order").<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3u7pbuTyDCdaqlOAkrDKs3Mo3yWnOkReS0vkNBQqUTSDVG-6KtLQB3uxVdOYQWzal4qaF6S4GEGvwQJv4Vlt61E_7SyXUtYk4wvXQWw2NeJesnXBSStpJib-YDAWRpLfi6oj/s725/LC+Lesson+7-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="342" data-original-width="725" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3u7pbuTyDCdaqlOAkrDKs3Mo3yWnOkReS0vkNBQqUTSDVG-6KtLQB3uxVdOYQWzal4qaF6S4GEGvwQJv4Vlt61E_7SyXUtYk4wvXQWw2NeJesnXBSStpJib-YDAWRpLfi6oj/s400/LC+Lesson+7-10.png" width="400" /></a></div>
Click on the "Company" field and then on "Select". This adds the "Company" field to the list box formatter.<br />
<br />
<h2>Apply special formatting to the first column</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHv5S2rOGiu9zh5sVrh-negtJduM-YoAjMGYUqQ487E4zbiDU0mAKjRgXHKM10pXnSy97reNVGEqnlWuSbhuansTk_Udd_smlNWBblM0Rtxb2OyihZ8LsUlcyHTVviINs868aW/s562/LC+Lesson+7-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHv5S2rOGiu9zh5sVrh-negtJduM-YoAjMGYUqQ487E4zbiDU0mAKjRgXHKM10pXnSy97reNVGEqnlWuSbhuansTk_Udd_smlNWBblM0Rtxb2OyihZ8LsUlcyHTVviINs868aW/s400/LC+Lesson+7-11.png" width="400" /></a></div>
The tabs on the right allow you to format the appearance of the column highlighted in the list on the left. In the Property list in the lower right pane, locate the "Right Border" and "Resizeable" properties and set them to "True". This adds a resizable right vertical border to the column at runtime.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHAzTToHE9milMXOxsTzlxO_IVZfzAyyrldxDMEavPhP8SbofTXaLSs5GzidRThLwsnwI1H3l17hF_H7eQLqKaqeEoimHf4FkdRbbYnQj4-j67jLJAYv59ZdXp9rI1adBatEnL/s563/LC+Lesson+7-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="552" data-original-width="563" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHAzTToHE9milMXOxsTzlxO_IVZfzAyyrldxDMEavPhP8SbofTXaLSs5GzidRThLwsnwI1H3l17hF_H7eQLqKaqeEoimHf4FkdRbbYnQj4-j67jLJAYv59ZdXp9rI1adBatEnL/s400/LC+Lesson+7-12.png" width="400" /></a></div>
Set the Header "Indent" property to 2 to slightly indent the heading text and verify that the "DataIndent" property is already set at 2.<br />
<br />
<h2>Populate more columns</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhqXrDUAaIBX4Jsl3p16cLpq8SocOWJZJMq8myAuJEXu_Hqs8HoI-LZcBYd1Q_qdwAdvXRPNjjVaqOcUdmyjhEKz9dUtVD_aScUFWxkI8fT3xiwbG08ipU7qC9G47AKVm8uwYt/s561/LC+Lesson+7-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="550" data-original-width="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhqXrDUAaIBX4Jsl3p16cLpq8SocOWJZJMq8myAuJEXu_Hqs8HoI-LZcBYd1Q_qdwAdvXRPNjjVaqOcUdmyjhEKz9dUtVD_aScUFWxkI8fT3xiwbG08ipU7qC9G47AKVm8uwYt/s400/LC+Lesson+7-13.png" width="400" /></a></div>
Click on the "add Field" button and choose the "FirstName" field from the "Customer" table. Click "Select" to add it to the list box. Check that the "Right Border" and "Resizeable" properties are set to "True". Repeat this process for the "LastName" and "Address" fields.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCztuupZ-JHKeTnEzq6BHksyX-JQ6I6wukHvgmEDY1iK_Ic5-xBNtbtNImFTRsPtMRfqCxU-A8GAZCPj_5ZeqQWvQssAu5KtjoUD20UIVXG6IGir49PcL2OexLZYv1ZZ_sEwFO/s561/LC+Lesson+7-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCztuupZ-JHKeTnEzq6BHksyX-JQ6I6wukHvgmEDY1iK_Ic5-xBNtbtNImFTRsPtMRfqCxU-A8GAZCPj_5ZeqQWvQssAu5KtjoUD20UIVXG6IGir49PcL2OexLZYv1ZZ_sEwFO/s400/LC+Lesson+7-14.png" width="400" /></a></div>
As the list box begins to grow, you can resize the List Box Formatter as needed to view additional elements.<br />
<br />
<h2>Group some columns</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkHF03h-whyphenhyphenRQfQvcxSvgTK4Ni2YERH47y6wSWidDaw6pkyVaLRYH5agyGTUgqe1xlDsyGUnUDozQ0IbPS5rbhuY8MGW5M4GdkYA7h-m9TT2LeYeRETjQ6c29CGya8IuxT9ujf/s569/LC+Lesson+7-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="569" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkHF03h-whyphenhyphenRQfQvcxSvgTK4Ni2YERH47y6wSWidDaw6pkyVaLRYH5agyGTUgqe1xlDsyGUnUDozQ0IbPS5rbhuY8MGW5M4GdkYA7h-m9TT2LeYeRETjQ6c29CGya8IuxT9ujf/s400/LC+Lesson+7-15.png" width="400" /></a></div>
With the "Address" field highlighted, click on the "Add Group" button. By creating a new group, in which you’ll place the address information, you can add a group header. This appears above the column headers, and visually links the data in the columns beneath. Notice that, as you add columns and make changes, you can see the effects of your changes in the sample list box at the top of the List Box Formatter dialog. Set the new Header Text to "Address Info". This provides the text for the group header. Then click on the "+" icon to expand the group, so you can see its fields.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Any columns appearing to the right of this one will be included in the group, until you define another group. As you add columns, the List Box Formatter continually updates its sample window (at the top) to show you how your list will appear.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMJMxQurK8PjQy5kP2mEsDZiNJsKLEoKL8PdqukwfEPueDN65RC2UHVkP6Na4nI7TeDiU_CaeQNsjzReSBLgZvkgajqK0IidoRw-J1ngRcGmTO1CY1z7PVsG3Zt5Nzi8sLIqIl/s564/LC+Lesson+7-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="551" data-original-width="564" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMJMxQurK8PjQy5kP2mEsDZiNJsKLEoKL8PdqukwfEPueDN65RC2UHVkP6Na4nI7TeDiU_CaeQNsjzReSBLgZvkgajqK0IidoRw-J1ngRcGmTO1CY1z7PVsG3Zt5Nzi8sLIqIl/s400/LC+Lesson+7-16.png" width="400" /></a></div>
Select the "Address" field and then click on the "Add Field" button to add the "City", "State" and "ZIPcode" fields.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl2U77wZdX7efZXtLTqzaOtbfzrtDi42480szgllSUfSa9DWcOV-PwuAG0P5D94QamblQ2eCN3KPlEAocvXsj8WReTh0tDgU1jBrIeRSL4YScfE7HNxkwMYcZhxzUX3Um6rQQz/s562/LC+Lesson+7-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="546" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl2U77wZdX7efZXtLTqzaOtbfzrtDi42480szgllSUfSa9DWcOV-PwuAG0P5D94QamblQ2eCN3KPlEAocvXsj8WReTh0tDgU1jBrIeRSL4YScfE7HNxkwMYcZhxzUX3Um6rQQz/s400/LC+Lesson+7-17.png" width="400" /></a></div>
You can use the editor to resize any fields as required. I have widened the "State" column for readability. Then click "OK" to close the List Box formatter.<br />
<br />
<h2>Adding tabs</h2>
When the default Application Wizard created this procedure it had tab controls that changed the list’s sort order depending on which tab was selected. Therefore, we’ll add this functionality right now to show how easy it is to accomplish.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfGosI_OQju4O9rhWD0pNL-CxfcaTqbaIRuQgnWLj976SU96O3g5kGBJrx7p2rJUW6y9A6Uj9psgZlScOeevD1QZOf7lBob2w0sdtJyzkI87AbBZXgEiW2eCPhT7fAaTItT5iV/s567/LC+Lesson+7-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="458" data-original-width="567" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfGosI_OQju4O9rhWD0pNL-CxfcaTqbaIRuQgnWLj976SU96O3g5kGBJrx7p2rJUW6y9A6Uj9psgZlScOeevD1QZOf7lBob2w0sdtJyzkI87AbBZXgEiW2eCPhT7fAaTItT5iV/s400/LC+Lesson+7-18.png" width="400" /></a></div>
First, click on the window to get the "drag handles" and drag the bottom one down to make the window bigger.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmlHuKMGiPuwOmbsAygWOgs7Ro1wtEWPdTZrl7VZ2B3cLzF7x4vIfosaDwZ14gocmrUnLn3MjUXoAaUYazkczFx8xyaU6KgpVB4qei_GyUvOcJOV23UTOq8WuBlOOUPSKwFwEH/s523/LC+Lesson+7-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="398" data-original-width="523" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmlHuKMGiPuwOmbsAygWOgs7Ro1wtEWPdTZrl7VZ2B3cLzF7x4vIfosaDwZ14gocmrUnLn3MjUXoAaUYazkczFx8xyaU6KgpVB4qei_GyUvOcJOV23UTOq8WuBlOOUPSKwFwEH/s400/LC+Lesson+7-19.png" width="400" /></a></div>
Lasso all the controls on the window and then drag them down as shown, to make space at the top.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHubG2OJQWFKUnn6rCJvyMjmxW6juyfO-DdBDOdh5OTAXOB9Ggcj1yTokdc0MULp8dlScLvSCpO78sCcdLbV11lLsGDjEp38oj6K_QlhG04VuIVkFn4fSANDrclS35JAePEu6e/s791/LC+Lesson+7-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="589" data-original-width="791" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHubG2OJQWFKUnn6rCJvyMjmxW6juyfO-DdBDOdh5OTAXOB9Ggcj1yTokdc0MULp8dlScLvSCpO78sCcdLbV11lLsGDjEp38oj6K_QlhG04VuIVkFn4fSANDrclS35JAePEu6e/s400/LC+Lesson+7-20.png" width="400" /></a></div>
Display the toolbox, and drag the "SHEET" control to the top-left corner of the window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8vG9e9Dz58lAedwKXKV_nh4puCQ8jpeSXnzJ7EKyGmLtd-HEsGC4xOwovy6U9eRiYSCXCNYpT3STYaT4gIo4RS8T8wEX7CCOzE0MhjoJZvofrDS6JmBaW0up5PTO4y_ov2k5N/s640/LC+Lesson+7-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8vG9e9Dz58lAedwKXKV_nh4puCQ8jpeSXnzJ7EKyGmLtd-HEsGC4xOwovy6U9eRiYSCXCNYpT3STYaT4gIo4RS8T8wEX7CCOzE0MhjoJZvofrDS6JmBaW0up5PTO4y_ov2k5N/s400/LC+Lesson+7-21.png" width="400" /></a></div>
Resize the sheet control by using the grab handles until the sheet covers the list box and all the buttons below it. Then right-click to the right of the "Tab1" and choose "Send to Back".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZhRHBBImwj1NVz8d2sqafXnJinYg8awTat_uBha0vMur93U_wsUYzWt70z_q1m-sZTtOoF8oqFU3YtOe-OhYxyEbB0r5cRI51YN-YpdgOVku4CSE-MazOQN7wvCrhkDSKUwxT/s855/LC+Lesson+7-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="587" data-original-width="855" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZhRHBBImwj1NVz8d2sqafXnJinYg8awTat_uBha0vMur93U_wsUYzWt70z_q1m-sZTtOoF8oqFU3YtOe-OhYxyEbB0r5cRI51YN-YpdgOVku4CSE-MazOQN7wvCrhkDSKUwxT/s400/LC+Lesson+7-22.png" width="400" /></a></div>
Click just below "Tab1" and change the Text to "by Customer number". We will set the display order of the list box to this order shortly. Then click on "Select SHEET" at the bottom of the properties window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWtR-n9suxkfvtO0m2imu7aRuTXhM-zhK8yrXOFfVbmptwM2bv2gj_lGfhWqhxZSH0OhfLzWwXyh8w78QMpQYDkjVCCFMoPDYXcmNwsjxn63HGxn8VAMNJ5dPHsqd_bafzdztr/s855/LC+Lesson+7-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="588" data-original-width="855" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWtR-n9suxkfvtO0m2imu7aRuTXhM-zhK8yrXOFfVbmptwM2bv2gj_lGfhWqhxZSH0OhfLzWwXyh8w78QMpQYDkjVCCFMoPDYXcmNwsjxn63HGxn8VAMNJ5dPHsqd_bafzdztr/s400/LC+Lesson+7-23.png" width="400" /></a></div>
Notice that the grab handles have changed back to the entire sheet. Click on the "Add Tab" link, and then click below the text "Tab2" to select it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_SYTEuE7yGFXoTQ-Fq3T3iOm6CZXERSUqsmsqsv92EaHAXxwAtCiVXeLj5NejYXJWwIPgLmlPl5KIhFNLJS0Oh3aJQoso2ymmpVV7XwLOFiaVQ7S261NqtwOfxlj9C0T68LpF/s854/LC+Lesson+7-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="583" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_SYTEuE7yGFXoTQ-Fq3T3iOm6CZXERSUqsmsqsv92EaHAXxwAtCiVXeLj5NejYXJWwIPgLmlPl5KIhFNLJS0Oh3aJQoso2ymmpVV7XwLOFiaVQ7S261NqtwOfxlj9C0T68LpF/s400/LC+Lesson+7-24.png" width="400" /></a></div>
Change the text to read "by Company Name".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQLfmA1QQIIEX6LYdjEjLLLiWI9b2en3DWmlzY9IaWfeBpwYccyFnbdWWlAnFe21CNBGLr-XCmSmiNA78Wh6NDgyDdxl3b_tTNGIt7b48gkV9MnTpHO8lieB2l3LEF5c0c0aML/s855/LC+Lesson+7-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="587" data-original-width="855" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQLfmA1QQIIEX6LYdjEjLLLiWI9b2en3DWmlzY9IaWfeBpwYccyFnbdWWlAnFe21CNBGLr-XCmSmiNA78Wh6NDgyDdxl3b_tTNGIt7b48gkV9MnTpHO8lieB2l3LEF5c0c0aML/s400/LC+Lesson+7-25.png" width="400" /></a></div>
Instead of clicking on "Select SHEET" at the bottom of the properties window, another way to return to the entire sheet control is to select it by name from the drop-down list at the top of the properties window. Try it now.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN7gn5f3TcXL0IqtrVihN4BBrFbiRHlxix9Zbh-IS22z7unQQCWqzvUDQbreatwxQTBOkxAMdSnHYmTjki9V3bbpsNaa5xZ1WjRzMfX2L0cmnqyHf33BT6gnr5O_CkULAQ4Kh6/s858/LC+Lesson+7-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="595" data-original-width="858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN7gn5f3TcXL0IqtrVihN4BBrFbiRHlxix9Zbh-IS22z7unQQCWqzvUDQbreatwxQTBOkxAMdSnHYmTjki9V3bbpsNaa5xZ1WjRzMfX2L0cmnqyHf33BT6gnr5O_CkULAQ4Kh6/s400/LC+Lesson+7-26.png" width="400" /></a></div>
Select the third tab from the drop-down list as shown, and change the tab text to "by ZIP code".<br />
<br />
<h2>Hiding the Buttons</h2>
The toolbar buttons defined on the Frame procedure actually just tell hidden buttons in the Browse procedure to do what they normally do. Therefore, when you are designing a Browse procedure without using the Wizards, you do need to have the update buttons on the screen, but the user does not have to see them at runtime. So let's hide them.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_oAFUO9I5VBnpU_PxDG3bbZoABkAPHvqn2AItHDL1YCY_tW7SO_gfDhsxiekDR5glSiqNnOYaVVTUII7GwXQFNYI9iGyxmtm8HE1o0ciPuYVG1L0QGV5SwyF8cGkbu-TDZJZH/s854/LC+Lesson+7-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="587" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_oAFUO9I5VBnpU_PxDG3bbZoABkAPHvqn2AItHDL1YCY_tW7SO_gfDhsxiekDR5glSiqNnOYaVVTUII7GwXQFNYI9iGyxmtm8HE1o0ciPuYVG1L0QGV5SwyF8cGkbu-TDZJZH/s400/LC+Lesson+7-27.png" width="400" /></a></div>
Click on the "Close" button. Then Shift-Click on the other buttons in the row to select them too. Change their "Hide" property to "True".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgDtsbHgx7wd5b5tighFfABqlVcoHJyLEHsaoFvS2XnkTY9Emr1rNw4Ds3Dw8wlRzJS3G3HsEo8DjkWnXNQ-SR2Zs_0xD2qHih7PQUNRJ4bpzgz4NHa9eaBMICakFTS30OUD8/s853/LC+Lesson+7-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="853" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXgDtsbHgx7wd5b5tighFfABqlVcoHJyLEHsaoFvS2XnkTY9Emr1rNw4Ds3Dw8wlRzJS3G3HsEo8DjkWnXNQ-SR2Zs_0xD2qHih7PQUNRJ4bpzgz4NHa9eaBMICakFTS30OUD8/s400/LC+Lesson+7-28.png" width="400" /></a></div>
Select the LIST control from the properties dropdown list, and use the grab handles to make the listbox control use up more space on the window. It can cover the hidden buttons too, as shown.<br />
<br />
<h2>Setting the Sort Orders</h2>
Now that the tabs are there, we need to tell the list box what alternate sort orders to use and when.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_PjVk87esLIkwG7y9OkO2mF2HLUIppzMqH2O4U6Zhb73BKrbTCbYme-wKhMgn8mLXa1hC54AvrxfoULtfl9JfQRmzd2mO8OezDuecAJ2HfK81orcTAkawm0o-tCRbvnY-vTeL/s854/LC+Lesson+7-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="584" data-original-width="854" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_PjVk87esLIkwG7y9OkO2mF2HLUIppzMqH2O4U6Zhb73BKrbTCbYme-wKhMgn8mLXa1hC54AvrxfoULtfl9JfQRmzd2mO8OezDuecAJ2HfK81orcTAkawm0o-tCRbvnY-vTeL/s400/LC+Lesson+7-29.png" width="400" /></a></div>
Right-click on the list box control and choose "Actions ..." or click on the "Actions ..." link at the bottom of the properties window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcHs8lHQOjoKyfFkIZQCv3TyAGL8txZprCIcty7qnFLLRZhV7NBz6ejMzyWUkfHv2v3fNH6zs51UXi8FrFDJGH41W-z7R2t98QOJPKM7RJSUwx7JRZGYppF3F97CY64YyLPLkP/s1008/LC+Lesson+7-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="726" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcHs8lHQOjoKyfFkIZQCv3TyAGL8txZprCIcty7qnFLLRZhV7NBz6ejMzyWUkfHv2v3fNH6zs51UXi8FrFDJGH41W-z7R2t98QOJPKM7RJSUwx7JRZGYppF3F97CY64YyLPLkP/s400/LC+Lesson+7-30.png" width="400" /></a></div>
Click on "Browse Box Behaviour" and then choose the "Conditional Behaviour" tab. Click "Insert".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRDY73tdFlqlQHEJvxMy8DQKqYWeNxWT5qt1Ss7uSyahIxqNKkVIhKEExyGAsPT8r7fsJ__0lBO_5Z4nGZ0GPPLDkdpFyGgbI_kkBZvkHWX_PSfM5w7zgJ4mTkiGQEA7hDW-pD/s826/LC+Lesson+7-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="387" data-original-width="826" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRDY73tdFlqlQHEJvxMy8DQKqYWeNxWT5qt1Ss7uSyahIxqNKkVIhKEExyGAsPT8r7fsJ__0lBO_5Z4nGZ0GPPLDkdpFyGgbI_kkBZvkHWX_PSfM5w7zgJ4mTkiGQEA7hDW-pD/s400/LC+Lesson+7-31.png" width="400" /></a></div>
Type "CHOICE(?Sheet1) = 2" in the Condition field. Then click on the ellipsis next to the "Key to Use" field, and select "KeyCompany" from the list of keys. Click the "Select" button, then the "OK" button.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The condition expression sets the condition under which the alternate sort order will be used. This expression uses the Clarion language CHOICE function to detect when the user has selected the second tab on the sheet. The generated code will use this expression in a conditional statement that will change the sort order at runtime.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiahv5jDRDJlyD1cTnjL_e4X7s_kbymEMmyqj3G5hP287wVifUYiJp9uYKxgxXLz_whyphenhyphenRY01sb-oDEZZNdiUOAkXKKBTCYqlfvxKpTzeLvJUQwwhFif1z7cWIDInxna_apJH5gL/s840/LC+Lesson+7-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="840" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiahv5jDRDJlyD1cTnjL_e4X7s_kbymEMmyqj3G5hP287wVifUYiJp9uYKxgxXLz_whyphenhyphenRY01sb-oDEZZNdiUOAkXKKBTCYqlfvxKpTzeLvJUQwwhFif1z7cWIDInxna_apJH5gL/s400/LC+Lesson+7-32.png" width="400" /></a></div>
Click on the "Insert" key to create another condition. Set the "Condition" expression to "CHOICE(?Sheet1) = 3" and select "KeyZIPcode" as the "Key to Use". Click "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRp1zAPEPxnvM8vT__76J2bvjImu2VPQj7sqkNTrRJRFmWwS0o3cS9OxX_iNCJ-QRYZ4d-ZitKs91tCrLbI9wgewsGBjkvkWzLOssDyti8vI6qQDmIfSj-fUHCFGBy_klpGAXi/s827/LC+Lesson+7-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="827" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRp1zAPEPxnvM8vT__76J2bvjImu2VPQj7sqkNTrRJRFmWwS0o3cS9OxX_iNCJ-QRYZ4d-ZitKs91tCrLbI9wgewsGBjkvkWzLOssDyti8vI6qQDmIfSj-fUHCFGBy_klpGAXi/s400/LC+Lesson+7-33.png" width="400" /></a></div>
Now, when the user selects the second or third tab, the BrowseBox Control template will generate code to switch to the key on the Company or ZIP column. It doesn’t need to know what to do for the first tab because that always uses the Access Key we set in the Table Schematic. (Customer Number). Note that you can move the conditions around as required using the arrow buttons. Please click "OK" and "OK" to return to the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9tRDUe86wFnMNhjx-cPXnt8IAtNtzv5tijE6S27aaCQ13eMuV-aSlbgYXif7G0bNEWLDRRew93fsqNUO0dOhYZfaf6tVBv2bKkV8Mu10yVIzy_qZtMhbG3cTJxQDLBzGFUt7/s634/LC+Lesson+7-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="582" data-original-width="634" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd9tRDUe86wFnMNhjx-cPXnt8IAtNtzv5tijE6S27aaCQ13eMuV-aSlbgYXif7G0bNEWLDRRew93fsqNUO0dOhYZfaf6tVBv2bKkV8Mu10yVIzy_qZtMhbG3cTJxQDLBzGFUt7/s400/LC+Lesson+7-35.png" width="400" /></a></div>
Click on the "Window Preview" button to see how the window will look. It still needs work, but at least we have a starting point. It's not a full working window, just a preview. Close the preview, and then use the green "Save and Close" button, followed by the green "Save and Exit" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7KM8hMMxORIJGYygCTeIy_RCFR1Yk9wLv5je79e9G4SIYd5gFzd2T0cSfutUpcSUCJWzXA9kN9AbY-cPXgB1P0BopApPgR0x_3EG4MnLCCYtQQfq_M_LAlTarBX1edcxZCKdr/s638/LC+Lesson+7-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="582" data-original-width="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7KM8hMMxORIJGYygCTeIy_RCFR1Yk9wLv5je79e9G4SIYd5gFzd2T0cSfutUpcSUCJWzXA9kN9AbY-cPXgB1P0BopApPgR0x_3EG4MnLCCYtQQfq_M_LAlTarBX1edcxZCKdr/s400/LC+Lesson+7-34.png" width="400" /></a></div>
Finally, use the "Accept changes" (Save) button to <b>save your work</b>.<br />
<br />
<h2>One Last Tweak</h2>
You may have noticed that the fonts used in the Window Preview were terrible. Let's fix that quickly. Click on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaS4ClUJ7noWvAIuGvNMGQdIlncIHiVJ8oQKgrRW3YNTM-7N1QNmAFM4Un1yvTbaVtXfDIsRKAt3-CZTH_1fjo5HIu3mYHJZPVDWhUQBU5KMqILiMrtvO1MEFaCjsUTsBiVV-p/s640/LC+Lesson+7-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="587" data-original-width="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaS4ClUJ7noWvAIuGvNMGQdIlncIHiVJ8oQKgrRW3YNTM-7N1QNmAFM4Un1yvTbaVtXfDIsRKAt3-CZTH_1fjo5HIu3mYHJZPVDWhUQBU5KMqILiMrtvO1MEFaCjsUTsBiVV-p/s400/LC+Lesson+7-36.png" width="400" /></a></div>
Now click on the ellipsis to the right of the "Window" button. This opens the "Structure Editor" that shows the code behind the window. The first line reads: "BrowseWindow WINDOW('Browse Customers')" etc. but notice there is no font statement.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEJaXLk-e3W-pSH7qfrxZRTeMgVZkcCS_X3Cg2HxmXSoDuZgdDVkzVvKHEcPeaTVyYMZNDowWFFHTkSrDi_OXSDrr_uq4gvGPnewmgwnm6bJ6B0x7lsWpsIRkLLOQ5u6xW-lrj/s956/LC+Lesson+7-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="550" data-original-width="956" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEJaXLk-e3W-pSH7qfrxZRTeMgVZkcCS_X3Cg2HxmXSoDuZgdDVkzVvKHEcPeaTVyYMZNDowWFFHTkSrDi_OXSDrr_uq4gvGPnewmgwnm6bJ6B0x7lsWpsIRkLLOQ5u6xW-lrj/s400/LC+Lesson+7-37.png" width="400" /></a></div>
So we add in ",FONT('Segoe UI') at the end of the line, to specify the default font for the entire window. Click on the green "Save and Close" button, followed by the green "Save and Exit" button. Then click on the "Accept changes" (Save) button.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You created a new Browse Procedure, without using a wizard.</li>
<li>You added an Extension Template to automatically make the new procedure’s window resizable.</li>
<li>You used the List Box Formatter tool to design a scrolling list of rows.</li>
<li>You added a Property Sheet and several Tabs to your screen design.</li>
<li>You hid and moved buttons to provide a "cleaner" screen design.</li>
<li>You used the Window Designer’s Preview mode to see your window design in action.</li>
<li>You set dynamic sort orders for the user based on which Tab control they select.</li>
</ul>
Now that the first Browse procedure is complete, we’ll go on and create its associated Update Form procedure.<br />
<br />
<h1>Lesson 8: Creating an Update Form</h1>
In the last lesson, we formatted the Customer Browse procedure’s list box and added tab controls to change the sort order. To finish the basic procedure, we name the Update procedure. This is the procedure that handles the action for the Insert, Change, and Delete buttons.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoOHbb2ZATF0nOWmJrj8cjyWsL8-ibu9FfQ_XzDZ1r26g3bQoCZBo7nYjc_iZh-tTN12-OHgeGGlXTRTrMlWsGB7u-upeT1y4_pABev_e_pqJ2O17RFIqWREFAI5aF182FJUQ9/s638/LC+Lesson+8-1.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="582" data-original-width="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoOHbb2ZATF0nOWmJrj8cjyWsL8-ibu9FfQ_XzDZ1r26g3bQoCZBo7nYjc_iZh-tTN12-OHgeGGlXTRTrMlWsGB7u-upeT1y4_pABev_e_pqJ2O17RFIqWREFAI5aF182FJUQ9/s400/LC+Lesson+8-1.png" width="400" /></a></div>
Select the "BrowseCustomers" procedure and click on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx04jaHNACYQZKqot6b7yBiejYbU_ulo4kZurreFV_oGX75WTZCCj4y-M1eySsV3ksMeGrQzF94BH1r8wILB_t-Cz_0GaetZQ-9kjJFuZk1LQWQzgGKGcHQu0kzmCiLGfu8jAd/s636/LC+Lesson+8-2.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="584" data-original-width="636" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx04jaHNACYQZKqot6b7yBiejYbU_ulo4kZurreFV_oGX75WTZCCj4y-M1eySsV3ksMeGrQzF94BH1r8wILB_t-Cz_0GaetZQ-9kjJFuZk1LQWQzgGKGcHQu0kzmCiLGfu8jAd/s400/LC+Lesson+8-2.png" width="400" /></a></div>
We have been here before. This time, click on the "Actions" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Llu_O5H-pr8j-vIBpMUcVkR2MZNRCiW1QXBdpGjaoISgs7h1Koq9YFxDe3S4fgf7HRZuKiWuzxJfhWCvikKlxnS02zBuNo8VqznsaYW7AKgT-tpvZfMSMbR1iC8WkeLtItGI/s828/LC+Lesson+8-3.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="344" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9Llu_O5H-pr8j-vIBpMUcVkR2MZNRCiW1QXBdpGjaoISgs7h1Koq9YFxDe3S4fgf7HRZuKiWuzxJfhWCvikKlxnS02zBuNo8VqznsaYW7AKgT-tpvZfMSMbR1iC8WkeLtItGI/s400/LC+Lesson+8-3.png" width="400" /></a></div>
Type "UpdateCustomer" in the Update Procedure field at the bottom of the Procedure Properties dialog. This names the procedure to update the rows displayed in the browse. Click "OK". Then "Save and Exit". The new procedure appears in the Application Tree as a "ToDo".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMOqa8OJn4KOt73Gif25Ah_M4pzOf9PW04l3Na3CFJ1u6pe9LFl_Nki3S2KV6h7NO8Peb4PABgy2QNxBSsa5-sjceMR8QH-nboMsg3gP8ZrzwJ6-cFLHnKQMFOogWFEkMYGrLX/s636/LC+Lesson+8-4.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="636" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMOqa8OJn4KOt73Gif25Ah_M4pzOf9PW04l3Na3CFJ1u6pe9LFl_Nki3S2KV6h7NO8Peb4PABgy2QNxBSsa5-sjceMR8QH-nboMsg3gP8ZrzwJ6-cFLHnKQMFOogWFEkMYGrLX/s400/LC+Lesson+8-4.png" width="400" /></a></div>
Notice that you didn’t have to start a new execution thread for the update procedure. You want it to run on the same thread as the browse, so that the end user can’t open a form window to change a row, then activate the browse window again, and open another form on the same row. In other words, you don’t want a user trying to change the same row twice at the same time.<br />
<br />
<h2>Creating the Update Form Procedure</h2>
The Update Procedure should use the Form Procedure template to create a procedure that the end user can use to maintain a row. It should provide a prompt and entry control for each column in the row.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6R0k62fQWzcdwatmyvtMcnoeFNCYq4efR73VQuScT6Pg1RPejo9qyTYHfSocikEEY8iFNX3jn3mCJeAgyGI0xAk0GE_-Hp6W5q2_euPH6YPb8-SXWKl-Y13lqkOq-EAlrbBSD/s635/LC+Lesson+8-5.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="404" data-original-width="635" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6R0k62fQWzcdwatmyvtMcnoeFNCYq4efR73VQuScT6Pg1RPejo9qyTYHfSocikEEY8iFNX3jn3mCJeAgyGI0xAk0GE_-Hp6W5q2_euPH6YPb8-SXWKl-Y13lqkOq-EAlrbBSD/s400/LC+Lesson+8-5.png" width="400" /></a></div>
Double-click on the "UpdateCustomer" procedure, change to "Defaults", choose the "FORM (Add/Edit/Delete)" template, and click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTKYqpC4cXVclVx8kJnN-RQQEde2KiN18ZEv952NDlYH6-oJRpxCi1WOZN9m1cwZdllZ7dHhC7aE7oHzIxz9nhyphenhyphen0Jid_d5_PbgC1oWarnmhnnlb7ea65h4MEFwmyumCCuwQiQm/s637/LC+Lesson+8-6.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="637" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTKYqpC4cXVclVx8kJnN-RQQEde2KiN18ZEv952NDlYH6-oJRpxCi1WOZN9m1cwZdllZ7dHhC7aE7oHzIxz9nhyphenhyphen0Jid_d5_PbgC1oWarnmhnnlb7ea65h4MEFwmyumCCuwQiQm/s400/LC+Lesson+8-6.png" width="400" /></a></div>
Type in "Update Customer" in the description field, and click on "Actions".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaXVA6_TaIBDFdWo3FSBwg3pLewIjohLsYfUXA5Uk2eezHY1lKbTbkPtxC5AVqQEdrYgc0mkGtq8ClCApx8NByIcQb0eVsAZ_hlpG7ErFlMVr_qLvtYMAZBRDosqR2vUp-xS6u/s828/LC+Lesson+8-7.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="453" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaXVA6_TaIBDFdWo3FSBwg3pLewIjohLsYfUXA5Uk2eezHY1lKbTbkPtxC5AVqQEdrYgc0mkGtq8ClCApx8NByIcQb0eVsAZ_hlpG7ErFlMVr_qLvtYMAZBRDosqR2vUp-xS6u/s400/LC+Lesson+8-7.png" width="400" /></a></div>
Notice that this dialog looks different from the Splash, Frame, or Browse Procedure Properties dialogs because the prompts vary for each type of Procedure template. The User’s Guide and on-line help describe the customization options available on each Procedure Properties dialog. We don't need to change any of the defaults, so click on "OK".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibTPBIeB1gkES9tYMF7HKJQWaBftH-l7UiM8XTWk8j6E_7-JPqWzXO1Yt3ZJArw7cXfD4nCP1FCcvg4mo6llUv-TSVvDzh9nZHkh9BbXWoUlNpy8JLp2oE0mCFCDAf7699hDz3/s789/LC+Lesson+8-8.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="602" data-original-width="789" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibTPBIeB1gkES9tYMF7HKJQWaBftH-l7UiM8XTWk8j6E_7-JPqWzXO1Yt3ZJArw7cXfD4nCP1FCcvg4mo6llUv-TSVvDzh9nZHkh9BbXWoUlNpy8JLp2oE0mCFCDAf7699hDz3/s400/LC+Lesson+8-8.png" width="400" /></a></div>
Find the "Data / Tables" (F12) panel in the bottom-left corner of the screen, and double-click on the "<ToDo>" section of "Update Record on Disk" (or use the "Add" button). Click on the "Customer" table and click "Select".<br />
<br />
<h2>Make the Window Resizable</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfFaCvD6GGNG5rq0DRvHLDHElQKU49s2Mn2O3UjEJ03inAvWCxl3RgNr2hWZ-kBytLTT44eb_OwGuFMkr_iIGTYBYhm8aGnXS3ulasppztGK8nw0e5vg68SMFnC5BnxgpDQ5Q/s1008/LC+Lesson+8-9.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="637" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJfFaCvD6GGNG5rq0DRvHLDHElQKU49s2Mn2O3UjEJ03inAvWCxl3RgNr2hWZ-kBytLTT44eb_OwGuFMkr_iIGTYBYhm8aGnXS3ulasppztGK8nw0e5vg68SMFnC5BnxgpDQ5Q/s400/LC+Lesson+8-9.png" width="400" /></a></div>
In the Procedure Properties dialog, select the "Extensions" tab. Click "Insert" and choose the "WindowResize" extensions template. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpgA0kOZtS79pDT-i8wCsRnux_uZaryLqS68Lhcq9hENRkKXeEEYZriTQeqEi_tLSuGHJctL5wJU3sI-HYitd3fI9Vc6koiQj1FuWKNseIJXIfnQBho_kQ8gLuhKaPpwpWM4Tc/s828/LC+Lesson+8-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="414" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpgA0kOZtS79pDT-i8wCsRnux_uZaryLqS68Lhcq9hENRkKXeEEYZriTQeqEi_tLSuGHJctL5wJU3sI-HYitd3fI9Vc6koiQj1FuWKNseIJXIfnQBho_kQ8gLuhKaPpwpWM4Tc/s400/LC+Lesson+8-10.png" width="400" /></a></div>
We don't need to change any of these defaults, so click "OK". Then click on the green "Save and Exit" button to return to the main application tree. Now click on the "Window" button to load the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6dBG_t_Q8GLnU8nXLXVZkM5S0Wafd4VHLaxECljw0dQzqzVZED-KQRl1uQIHdAN5fgP0qKV0HmxZvNdI75csH0RckLIYxIvIrVwS9Le_rL18Phl6RzLYdkXLTNf9u-tkQpGyI/s822/LC+Lesson+8-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="822" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6dBG_t_Q8GLnU8nXLXVZkM5S0Wafd4VHLaxECljw0dQzqzVZED-KQRl1uQIHdAN5fgP0qKV0HmxZvNdI75csH0RckLIYxIvIrVwS9Le_rL18Phl6RzLYdkXLTNf9u-tkQpGyI/s400/LC+Lesson+8-11.png" width="400" /></a></div>
Go to the "Properties" window (F4) and change the "FrameType" property to "Resizable". Find the "MaximizeBox" property in the "Options" group and set it to "True". These two properties ensure that the user can resize the window at runtime.<br />
<br />
<h2>Populating the Columns</h2>
The default window design contains three controls for you already. The "OK" button will close the dialog, accepting the end user’s input, and writes the Customer table row to disk. The "Cancel" button closes the form without updating. The string control provides an action message to inform the end user what action they are taking on the row. Now we need to add the table columns to the form, so we can add or edit the data in a given row. Placing the columns in a window is called populating it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0yBfaYOYPqNyCvLyGjgEqZaVi3S0g3sXZ1jPhdER4WVmHSlpzuAF0a0zTH-_S7pJ2u2MyOma8BStc3UexpcQYD7qbh0xPTOw0cMsapX_Ds12EeQc3xxZ7DcZCHsd2ng5q5bX6/s1008/LC+Lesson+8-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="683" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0yBfaYOYPqNyCvLyGjgEqZaVi3S0g3sXZ1jPhdER4WVmHSlpzuAF0a0zTH-_S7pJ2u2MyOma8BStc3UexpcQYD7qbh0xPTOw0cMsapX_Ds12EeQc3xxZ7DcZCHsd2ng5q5bX6/s400/LC+Lesson+8-12.png" width="400" /></a></div>
From the main menu, choose "Window Designer", "Populate", "Multiple Columns".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipHdwIPoyuhVik22M4HhbGdUTQvTQV4RRIl2DTlVTpYoTBOqjdRZHYYaRWpgV2Tnu6NajWpFa2jFTF1LqRWokIvqdTikPdoGJePx9EtLmFRHxa1IimuSZv7vJbQs6g4EuWFfQI/s729/LC+Lesson+8-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="592" data-original-width="729" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipHdwIPoyuhVik22M4HhbGdUTQvTQV4RRIl2DTlVTpYoTBOqjdRZHYYaRWpgV2Tnu6NajWpFa2jFTF1LqRWokIvqdTikPdoGJePx9EtLmFRHxa1IimuSZv7vJbQs6g4EuWFfQI/s400/LC+Lesson+8-13.png" width="400" /></a></div>
When the "Select Column" dialog appears, choose the "Customers" table, "CustNumber" row, and "Select" button. The dialog will briefly disappear, as it waits for you to decide where to put the controls on the form. Move the cursor to the top left and click. The program places a caption and a data control on the form. Now do the same with each of the columns, until all the columns have a pair of controls on the form. Then click "Cancel" to remove the "Select Column" dialog.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjulD5dMS6NYkyV1KjjSzOlToqV3DLfzxRm2c9p7BQWYl5830ZhEBza-bBi-aUpuMfios36A3KR73fuUfuRN5Uw1sl_pMEydULQtA9MW8XDJ-Q_NNtjQ7uN6gb2fGqxs0huzzmb/s815/LC+Lesson+8-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="590" data-original-width="815" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjulD5dMS6NYkyV1KjjSzOlToqV3DLfzxRm2c9p7BQWYl5830ZhEBza-bBi-aUpuMfios36A3KR73fuUfuRN5Uw1sl_pMEydULQtA9MW8XDJ-Q_NNtjQ7uN6gb2fGqxs0huzzmb/s400/LC+Lesson+8-14.png" width="400" /></a></div>
You should end up with something like this. Note that you can also use the "Data/Tables" pad and drag and drop fields directly on the window. This seems a more logical way of doing things, and the cursor works better too. Try deleting the "ZIPcode" control and dragging it again from the "Data/Tables" pad instead.<br />
<br />
<h2>Moving and Aligning Columns</h2>
For a professional look, we need to move these columns around and align the sides and bottoms of all the columns in the screen. First, we move the controls to their approximate positions on the form.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0g6ugyeOy0p6R9FNii2DfEb4OfKqEnxmAI6IlwK7_16dJGPVhO3eFle-FzQNIzz8HbEonE8SiPljYsXrvH2tp4KVfEDZo62AAdeRB7PjRayUq9bBjaTMRghV8j5l_hXE3X_-9/s618/LC+Lesson+8-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="481" data-original-width="618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0g6ugyeOy0p6R9FNii2DfEb4OfKqEnxmAI6IlwK7_16dJGPVhO3eFle-FzQNIzz8HbEonE8SiPljYsXrvH2tp4KVfEDZo62AAdeRB7PjRayUq9bBjaTMRghV8j5l_hXE3X_-9/s400/LC+Lesson+8-15.png" width="400" /></a></div>
Click on the "State Code" input control, and then Shift-Drag it to the left, to move it closer to the "State Code" caption. Then use the grab handle in the middle of the right-hand side to make the input box a more suitable size, as shown above. Ctrl-Click on the "State Code" caption to select it as well. Shift-Drag the collection upwards and to the right of the "City" field.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpkHhfQ48fCAFLm-pqtnpHLmxuBiDFREYFMVrpn1xEUVtbJOhQlkULflPZDSlLgPEbMFAx0zO8UaIJIVK_eNwLBwcyKDHAbXRjO6FI1xiYxNvo0GlL_C6hF3WE_vWYZWUrtNuX/s621/LC+Lesson+8-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="492" data-original-width="621" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpkHhfQ48fCAFLm-pqtnpHLmxuBiDFREYFMVrpn1xEUVtbJOhQlkULflPZDSlLgPEbMFAx0zO8UaIJIVK_eNwLBwcyKDHAbXRjO6FI1xiYxNvo0GlL_C6hF3WE_vWYZWUrtNuX/s400/LC+Lesson+8-16.png" width="400" /></a></div>
Repeat the same steps with the "ZIP Code" controls. Note the blue "guidelines" that appear when you are dragging the controls, to help you line them up with the other controls. This is very useful to keep things uncluttered and professional.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLvPMRaKe0cpQaXjDmExCYNRxy6Q1uhBe0FQM1DfK-Ied_wDXne8eZAXLBbzEv0bC1taZjxNIl1pUKJnBGEpKI6yihpeWrhtC0Rzkmg3Y_RBwUo_l5ZwomebyJz8yhnYLA4Qyo/s609/LC+Lesson+8-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="377" data-original-width="609" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLvPMRaKe0cpQaXjDmExCYNRxy6Q1uhBe0FQM1DfK-Ied_wDXne8eZAXLBbzEv0bC1taZjxNIl1pUKJnBGEpKI6yihpeWrhtC0Rzkmg3Y_RBwUo_l5ZwomebyJz8yhnYLA4Qyo/s400/LC+Lesson+8-18.png" width="400" /></a></div>
Shift-drag the "City" caption closer to the "City" input field, to remove the large gap between the caption and the control. Shift-drag the "Address" caption to the right, until its right-hand side lines up with the right-hand side of the "City" caption below. Shift-drag the "Address" input control so that its left-hand edge is above the left-hand edge of the "City" input control. Then resize the address control until its right-hand edge lines up with the right-hand edge of the "Zip Code" control, as shown.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5TxtihkbqxRN1MC_oDJQ8OqPf-KASqmIhZoTEpnTmjoU0DLjf_JzpYrTwdAv-2vjxmjfiUrdPzlL24nkM-S9gsRDnJTsqbIQYOu-kh3QTwpO4CU7cB34p3OxePbHvxqjauasz/s620/LC+Lesson+8-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="471" data-original-width="620" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5TxtihkbqxRN1MC_oDJQ8OqPf-KASqmIhZoTEpnTmjoU0DLjf_JzpYrTwdAv-2vjxmjfiUrdPzlL24nkM-S9gsRDnJTsqbIQYOu-kh3QTwpO4CU7cB34p3OxePbHvxqjauasz/s400/LC+Lesson+8-20.png" width="400" /></a></div>
Click on the "City" caption. This becomes the anchor. Now shift-click on all the other captions on the left of the form, and then use the "Align Rights" button to align all the captions to the right edge of the anchor control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVKhnZAFlzl8dw7JTP-auMTHkhJ8LcjLenFz1yxi-z9i0rX5phmBPu5GQ-I5KFLQz5uzecu15Y3EJ3bXnaupNmx2QrJRbNsZ3KFGTgmYhFLZ0XNok25nBZECP0PEM8BaRHhvmG/s619/LC+Lesson+8-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="485" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVKhnZAFlzl8dw7JTP-auMTHkhJ8LcjLenFz1yxi-z9i0rX5phmBPu5GQ-I5KFLQz5uzecu15Y3EJ3bXnaupNmx2QrJRbNsZ3KFGTgmYhFLZ0XNok25nBZECP0PEM8BaRHhvmG/s400/LC+Lesson+8-21.png" width="400" /></a></div>
Click on the "City" input field. This is the new anchor. Shift-click on all the input fields above it, and then use the "Align Lefts" button so that all the left-hand edges line up with the left-hand edge of the anchor field. You have created two (invisible) "sight lines", one to the right of the captions, and the other to the left of the input fields, that remove the clutter and make the form easier to read, like margins on a printed page.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzcDX-W48GHaK6fBC2hC0d-UTXPwG-v1Sx_aP62MPEHd8qXoG6uVx1Tv-HaPPJiPwA4lfE5xkaCLEqvnLXQoXCsXPxI_cWM-bpHUJHe-T18RMtQa76kMEmwPlKrUVeaII7HlrQ/s612/LC+Lesson+8-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="383" data-original-width="612" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzcDX-W48GHaK6fBC2hC0d-UTXPwG-v1Sx_aP62MPEHd8qXoG6uVx1Tv-HaPPJiPwA4lfE5xkaCLEqvnLXQoXCsXPxI_cWM-bpHUJHe-T18RMtQa76kMEmwPlKrUVeaII7HlrQ/s400/LC+Lesson+8-22.png" width="400" /></a></div>
Click on the "Last Name" input field, and then Shift-click on the "Last Name" caption. Move it up and to the right of the "First Name" input field. Click on just the "Last Name" input field, and widen it until its right-hand edge lines up with the right-hand edge of the "Zip Code" and "Address" fields. This is another sight line. Widen the "company" field to match up, too.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdo7KJLgLRXSYJliIN82_sOXLsZzxPHlxxP_KHsDzIIncwXEwLjzuhKF3Xh58EPuDwDaYEjnRN9d467c0JuSAEP87Dz5SpGTdHjDL5RTt6fWjVOpaVgRM6D1KeHFSjUOyY3DB/s624/LC+Lesson+8-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="483" data-original-width="624" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtdo7KJLgLRXSYJliIN82_sOXLsZzxPHlxxP_KHsDzIIncwXEwLjzuhKF3Xh58EPuDwDaYEjnRN9d467c0JuSAEP87Dz5SpGTdHjDL5RTt6fWjVOpaVgRM6D1KeHFSjUOyY3DB/s400/LC+Lesson+8-23.png" width="400" /></a></div>
Select ONE input control from each line, and then use the "Spread Vertically" button to space them out evenly between the top and bottom controls. Don't panic when it doesn't move all the controls.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj4gijk2Zhy1TySUjYuoHmqCgcD9ZrUawATiuY-j-lnhF1jUiNSNZjySnHnK_KNuVvxhBPACUbwDyLPyJ8Eg-bdrxfgdXOfjIDIAmKddrWym9fAvjWLvxowu43g5hsHRC8fKM6/s619/LC+Lesson+8-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="476" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgj4gijk2Zhy1TySUjYuoHmqCgcD9ZrUawATiuY-j-lnhF1jUiNSNZjySnHnK_KNuVvxhBPACUbwDyLPyJ8Eg-bdrxfgdXOfjIDIAmKddrWym9fAvjWLvxowu43g5hsHRC8fKM6/s400/LC+Lesson+8-24.png" width="400" /></a></div>
Select the "Address" input field as an anchor. Then shift-click on the "Address" caption and click on "Align Middles" to line them up. Select the "First Name" input field as an anchor. Shift-click on the "First Name" caption, the "Last Name" caption and the "Last Name" input field. Use "Align Middles" to line them up with the anchor. Try the same steps with "Company", "CustNumber" and "City" input fields (one line at a time) to make sure all the middles are lined up.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxP-RHLKKhY-6FAMI3mtSiBz7vGiwwxo-HwpJ7GpeX4GoRjsWKWN5ChxWdpq_I5m1gAXHCgXMSA8St-Hfi620cY2uIgcK9Gcl7OmK1Qgu_enA6nlE3nbVjKuDvBVoeIfx0BZ5D/s610/LC+Lesson+8-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="379" data-original-width="610" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxP-RHLKKhY-6FAMI3mtSiBz7vGiwwxo-HwpJ7GpeX4GoRjsWKWN5ChxWdpq_I5m1gAXHCgXMSA8St-Hfi620cY2uIgcK9Gcl7OmK1Qgu_enA6nlE3nbVjKuDvBVoeIfx0BZ5D/s400/LC+Lesson+8-25.png" width="400" /></a></div>
The end result should be something like this. The form window is almost done. Before you go any further, <b>save your work</b>! Click on the "Save and Close" button to return to the Application Tree. Click on the "Accept Changes" (Save) button.<br />
<br />
<h2>A Quick Font Tweak</h2>
From the Application Tree, select the "UpdateCustomer" procedure and choose "Properties" instead of "Window".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIkFNN0LW49_x__FOSAGrAY6XCF1C_QWrniyY3DsXcNVe2JQrKCIfa7yEint-djohNeSHwKUgAVN3CA4sX0fRWZb61IENR9RoDX84zLM1OMyc-tussZA1DZPt318Sph5YDW8Ln/s639/LC+Lesson+8-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="429" data-original-width="639" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIkFNN0LW49_x__FOSAGrAY6XCF1C_QWrniyY3DsXcNVe2JQrKCIfa7yEint-djohNeSHwKUgAVN3CA4sX0fRWZb61IENR9RoDX84zLM1OMyc-tussZA1DZPt318Sph5YDW8Ln/s400/LC+Lesson+8-26.png" width="400" /></a></div>
From the "Procedure Properties" screen, click on the ellipsis to the right of the "Window" button. This takes us to the Structure Editor". Add in ",FONT('Segoe UI') at the end of the first line, like we did in the previous lesson. Click on the green "Save and Close" button and then on the regular "Window" button to see the new font setting in action.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><b>Control templates</b> generate all the source code required to create and maintain a specific type of control (or set of controls) on your window. All the entry controls we just placed on this window are <i>simple controls</i>, not <i>control templates, </i>because they do not need any extra code to perform their normal function. <i>Control templates</i> are only used when a specific control needs extra functionality that the "bare" control itself does not provide. For example, the OK and Cancel buttons are both control templates: the OK button’s control template saves the row to disk, while the Cancel button’s control template has all the "cleanup" code necessary to cancel the current operation.<br />
<br />
<h2>Adding a BrowseBox Control Template</h2>
Now we will use the extra space and add a browse list box for the related Phone table rows. We will use a BrowseBox Control template that displays all the rows from the Phone table that are related to the current Customer row.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUueO3hwIrPn6gZaEE_zl_fyPHPMmHbrep7SQ9lGRi4fG46tj1NZKO-9BNuBYE7pr4OKIa3Ri6zaEkVJaFwqAciWceqJXy8kQaB0SgJtubN-1xQIfjcUY8AXU28Qtf4e0Fh41/s1008/LC+Lesson+8-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="603" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisUueO3hwIrPn6gZaEE_zl_fyPHPMmHbrep7SQ9lGRi4fG46tj1NZKO-9BNuBYE7pr4OKIa3Ri6zaEkVJaFwqAciWceqJXy8kQaB0SgJtubN-1xQIfjcUY8AXU28Qtf4e0Fh41/s400/LC+Lesson+8-27.png" width="400" /></a></div>
Select the "Control Templates" pad in the bottom right of the screen. Click on the "BrowseBox" control template and drag it to the screen, just below the "City" caption, and release it. The "Select Column" dialog box will appear. Double-click on the "<ToDo>" entry in the "File Browsing List Box" section and select the "Phone" table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg-15nBlH-vcXOJAV_0QYFP9TYBAZIYT63LDSya6S8kVs1Jm1JGt6KlEvvsZspR7iMOgIGH6gP0hd6OgLRp0WMINDcFxXYZxjPdDcvDTfYB3biRlLSS3CvjE7JgUGkN-rP05GN/s843/LC+Lesson+8-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="586" data-original-width="843" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjg-15nBlH-vcXOJAV_0QYFP9TYBAZIYT63LDSya6S8kVs1Jm1JGt6KlEvvsZspR7iMOgIGH6gP0hd6OgLRp0WMINDcFxXYZxjPdDcvDTfYB3biRlLSS3CvjE7JgUGkN-rP05GN/s400/LC+Lesson+8-28.png" width="400" /></a></div>
Click on the "Change" button and choose the "KeyCustNumber" key. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRl04EqY2Lrukth-Dl0zBrzsXm4jml62U6i2w7IRh5ZYrQ5G9TPO2qEFRKrQcQ1zdbiWJpHsJp1R46I8sVKQXOaUSOz3uMfo9aIvGps_UK_GcZF1ds8ojemMkzp5hpbX0a3bn5/s723/LC+Lesson+8-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="345" data-original-width="723" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRl04EqY2Lrukth-Dl0zBrzsXm4jml62U6i2w7IRh5ZYrQ5G9TPO2qEFRKrQcQ1zdbiWJpHsJp1R46I8sVKQXOaUSOz3uMfo9aIvGps_UK_GcZF1ds8ojemMkzp5hpbX0a3bn5/s400/LC+Lesson+8-29.png" width="400" /></a></div>
Notice how the Phone table is sorted by the "pho:KeyCustNumber" key. Select the "CustNumber" column on the right, and click "Select"<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS39LLy_VJLW-lj9k3n34DKZFh1h91w-zwAJ9KQiZx-NYjMBQQFjdvhHwEhXSHIKIo6GhA4s47KOlqL0x39grxe_iMP8qSQ3VpGiKZe1yqQXId_Tg9Oj9b9j_PHlqhyphenhyphen9uAtca7/s524/LC+Lesson+8-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="341" data-original-width="524" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS39LLy_VJLW-lj9k3n34DKZFh1h91w-zwAJ9KQiZx-NYjMBQQFjdvhHwEhXSHIKIo6GhA4s47KOlqL0x39grxe_iMP8qSQ3VpGiKZe1yqQXId_Tg9Oj9b9j_PHlqhyphenhyphen9uAtca7/s400/LC+Lesson+8-30.png" width="400" /></a></div>
Adjust the size of the list box control to fit the space on the form, as shown here. I have also widened the "Action Message" to the right of the "Cancel" button to line up with the right-hand sight line.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYd7h2j767HH-3E5_0L6MhHwD5FBUqN8vKFoFlSQHkGIuX9XQwRHMt1Mh3xuSxkkv8tkjDJ5NopwTtuXGaqNrQ2KSmpLzsK6cSia10EbX_cxFfpgA7WH2qZ2P3GlcuNmq7eqfR/s628/LC+Lesson+8-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="628" data-original-width="621" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYd7h2j767HH-3E5_0L6MhHwD5FBUqN8vKFoFlSQHkGIuX9XQwRHMt1Mh3xuSxkkv8tkjDJ5NopwTtuXGaqNrQ2KSmpLzsK6cSia10EbX_cxFfpgA7WH2qZ2P3GlcuNmq7eqfR/s400/LC+Lesson+8-31.png" /></a></div>
Right-click on the browse box, and select "List Box format ..." from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA84JyfiaSTLwodBrwm6TwIzSxI8GPjpVPdmRxdt96m2ZB0KFt9uYboIEPNzkZOZV1rQiP7dig6BI-g_o2-b5nR0hFz_aNVHJM2UVonFDKaujU5-E7PXp1xP0nErhpfaUhgHSo/s558/LC+Lesson+8-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="558" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA84JyfiaSTLwodBrwm6TwIzSxI8GPjpVPdmRxdt96m2ZB0KFt9uYboIEPNzkZOZV1rQiP7dig6BI-g_o2-b5nR0hFz_aNVHJM2UVonFDKaujU5-E7PXp1xP0nErhpfaUhgHSo/s400/LC+Lesson+8-32.png" width="400" /></a></div>
The List Box Formatter now appears, ready for you to choose the rest of the columns to display. Change the "DataJustification" property to "Center". The default for numeric values is "Right". Also check the "Right Border" and "Resizable" properties are set to "True". This adds a right border to the column and allows the user to resize the column width at runtime.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajTKqtIxriKbxc0GQVYAIXWrdXmuADnGU5HcZhCKaRnKkjQ3l-kQ5SDNwnMab8_TzoJVwyiU112aTvYKCm73OJNat8C0us9WpcTosum2bjLATUfBw1IbBXpKHTO1nAJ0rdvA-/s721/LC+Lesson+8-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="603" data-original-width="721" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjajTKqtIxriKbxc0GQVYAIXWrdXmuADnGU5HcZhCKaRnKkjQ3l-kQ5SDNwnMab8_TzoJVwyiU112aTvYKCm73OJNat8C0us9WpcTosum2bjLATUfBw1IbBXpKHTO1nAJ0rdvA-/s400/LC+Lesson+8-33.png" width="400" /></a></div>
Click on the "Insert Field" button, and choose the "PhoneNumber" field from the Phone table as shown. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQreGEsUw93dOoHKGAiGTprZaQxt0ej7WbpaIVQftdeP2c-9yrT9NhxxzAflNVkFVZlmglky-_JjhyEs0Xexvv9lDXuDqlM47UlH9gSdA6pi5ldEAXAwhdZsubjz4XZ-3BHCWP/s561/LC+Lesson+8-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="549" data-original-width="561" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQreGEsUw93dOoHKGAiGTprZaQxt0ej7WbpaIVQftdeP2c-9yrT9NhxxzAflNVkFVZlmglky-_JjhyEs0Xexvv9lDXuDqlM47UlH9gSdA6pi5ldEAXAwhdZsubjz4XZ-3BHCWP/s400/LC+Lesson+8-34.png" width="400" /></a></div>
Change the Header "Width" property to <b>62</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7w7v2jOl85sNJEYGt0-NOkYflGRwq9RQhiLzkiok_OKbBWEH701rK0g-fFjiDAamXCkhDVPGSj-_Xz8TP5taBQNcGP2ub3-oMTelXi1tpeNt_DqPlkv-gBmsLkrlyJPJsQs51/s562/LC+Lesson+8-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="548" data-original-width="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7w7v2jOl85sNJEYGt0-NOkYflGRwq9RQhiLzkiok_OKbBWEH701rK0g-fFjiDAamXCkhDVPGSj-_Xz8TP5taBQNcGP2ub3-oMTelXi1tpeNt_DqPlkv-gBmsLkrlyJPJsQs51/s400/LC+Lesson+8-35.png" width="400" /></a></div>
Use the "Insert Field" button to add the "Extension" and "Phone Type" fields, and set the header width of each of them to 56. Click on the "CustNumber" field and set the Header "Indent" property to 2. Click "OK" to close the List Box Formatter.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFYjtDOb_bdgc7RjjhV16j7MmunJ82Si1YK18z1dQ2SBuFdLk_qyKWdMMO5lDG_i9nl4AXY2gBonjZIQyQCTIdkDzEOGKM_7GH3RL2tq0aUV1ZIi7PSaq4CoI23mAwfyMWCmfa/s619/LC+Lesson+8-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="583" data-original-width="619" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFYjtDOb_bdgc7RjjhV16j7MmunJ82Si1YK18z1dQ2SBuFdLk_qyKWdMMO5lDG_i9nl4AXY2gBonjZIQyQCTIdkDzEOGKM_7GH3RL2tq0aUV1ZIi7PSaq4CoI23mAwfyMWCmfa/s400/LC+Lesson+8-36.png" width="400" /></a></div>
Right-click on the List Box and select "Actions ..." from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid3OL3V9XxbsPMgy08-KQOo2PBPshTXQ6ZbWIEkJK2aFzBbMwR8nKDocEXVE3MzcD_lbbvoJM8AcKLuI5MyDeVV8iCte6hFTj5E3fzYJOCs_AaaApR_unm0Qe1eckt7rqW3iLR/s841/LC+Lesson+8-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="761" data-original-width="841" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid3OL3V9XxbsPMgy08-KQOo2PBPshTXQ6ZbWIEkJK2aFzBbMwR8nKDocEXVE3MzcD_lbbvoJM8AcKLuI5MyDeVV8iCte6hFTj5E3fzYJOCs_AaaApR_unm0Qe1eckt7rqW3iLR/s400/LC+Lesson+8-37.png" width="400" /></a></div>
Click on "Browse Box Behaviour" and then find the ellipsis to the right of the "Range Limit Field" and select "PHO:CustNumber" to specify which field we want to limit the range on. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyFVZGfCRfPBhK6LbnudSKe4jBG8hj5OBz80n5OxbySFOxszM9eyE7KAP8bUn4u72ugd6uyfKzVQPUWu9LLy9sELpYEQBAcNaRcXDPVemi6tsHTsOeFuLdnMmPl7uAnuQUwrIF/s906/LC+Lesson+8-38.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="763" data-original-width="906" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyFVZGfCRfPBhK6LbnudSKe4jBG8hj5OBz80n5OxbySFOxszM9eyE7KAP8bUn4u72ugd6uyfKzVQPUWu9LLy9sELpYEQBAcNaRcXDPVemi6tsHTsOeFuLdnMmPl7uAnuQUwrIF/s400/LC+Lesson+8-38.png" width="400" /></a></div>
Change the "Range Limit Type" to "File Relationship" and then click on the ellipsis on the right of the "Related File" field. Choose "Customer" in the "Select Table" dialog, and click "Select". This identifies the Customer table as the related table. These steps limit the rows displayed in the list box to only those rows related to the currently displayed Customer table row. Click "OK" and "OK" to return to the Window Designer. <b>Save your work</b>: click on the green "Save and Close" button, then on the "Accept changes" (Save) button, and then use the "Window" button to return to the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRMaT7RLMpNRBLhuQKmDrTaMuY1ryzNochNLjfCKxxKx9aiMv1iMAi7t8LwkAPEugxO059v-0V5fIOXqx1GFOTSbs4K923T2in34a_UY4aEITrlslqHmohXhF8I8nH0NxAdvwS/s621/LC+Lesson+8-39.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="581" data-original-width="621" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRMaT7RLMpNRBLhuQKmDrTaMuY1ryzNochNLjfCKxxKx9aiMv1iMAi7t8LwkAPEugxO059v-0V5fIOXqx1GFOTSbs4K923T2in34a_UY4aEITrlslqHmohXhF8I8nH0NxAdvwS/s400/LC+Lesson+8-39.png" width="400" /></a></div>
Now we need to make space for a row of buttons for the list box. Reduce the height of the list box and make the form slightly taller. Move the existing buttons down a bit, as shown above.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgvLBDBh5r3wAKKWG6vK_x8uX5ICamAsHuZhimcwCY5GJ8HfCK5JQOc04r77mnzxQzLQXRdXh2avNlTdpWdPmWmM5dMNoYDL4yg4JrmB7_Vfm_O5G3_ceVR9-KKVVmfoQigSzM/s790/LC+Lesson+8-40.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="585" data-original-width="790" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgvLBDBh5r3wAKKWG6vK_x8uX5ICamAsHuZhimcwCY5GJ8HfCK5JQOc04r77mnzxQzLQXRdXh2avNlTdpWdPmWmM5dMNoYDL4yg4JrmB7_Vfm_O5G3_ceVR9-KKVVmfoQigSzM/s400/LC+Lesson+8-40.png" width="400" /></a></div>
In the "Control Templates" pad, search for the "BrowseUpdateButtons" template, and drag it to the empty area below the Browse Box, as shown. Try to centre them below the list box, in a way that doesn't associate them with the "OK" and "Cancel" buttons below. We don't want to confuse the user. <b>Save your work</b>: click on the green "Save and Close" button, then on the "Accept changes" (Save) button, and then use the "Window" button to return to the Window Designer.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The <b>Insert</b>, <b>Change</b>, and <b>Delete</b> buttons are the buttons that will allow the toolbar buttons to function, so they must be present in the window design. They do not have to be visible to the end-user, so you can hide them if you choose. However, since this Browse Box is placed on an update form procedure, for this application we’ll leave this set of BrowseUpdateButtons visible. This will allow the user to use either set of buttons. The toolbar update buttons will only function for this list when the list box has focus (not when the user is inputting data into any other control) so keeping these buttons visible will ensure that the user can easily maintain the Phone table rows.<br />
<br />
<h2>Specify "Edit in Place" for Phone Update</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT8pkAAsM8pJvziFdtOJOrSR5NjBBCGHg3nAdOeDC67X0au-TFmFxAXeiO6CmsxsdrvXNyEtfbE1ztppJcaX3XMQTG2Igce_DjQykvQdh37-RaGnycljs5VEsyt5cebdyZnywT/s621/LC+Lesson+8-41.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="605" data-original-width="621" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT8pkAAsM8pJvziFdtOJOrSR5NjBBCGHg3nAdOeDC67X0au-TFmFxAXeiO6CmsxsdrvXNyEtfbE1ztppJcaX3XMQTG2Igce_DjQykvQdh37-RaGnycljs5VEsyt5cebdyZnywT/s400/LC+Lesson+8-41.png" width="400" /></a></div>
Right-click on the "Delete" button and select "Actions..." from the popup menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6svD22rOiC-ep6nQ9wwOMNi3U9DgDyKFLOAH-v8-dM_1Fw5gWpxLVR-PrzzTnSv5ToQguYL3xvC1M3piFdmAn-XJz31R9sHBwXRTWXDSJUvkWyqyDtICrBPRY_zloM8nO7zoD/s828/LC+Lesson+8-42.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="545" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6svD22rOiC-ep6nQ9wwOMNi3U9DgDyKFLOAH-v8-dM_1Fw5gWpxLVR-PrzzTnSv5ToQguYL3xvC1M3piFdmAn-XJz31R9sHBwXRTWXDSJUvkWyqyDtICrBPRY_zloM8nO7zoD/s400/LC+Lesson+8-42.png" width="400" /></a></div>
Check the "Use Edit in Place" box. Click "OK". <b>Save your work</b>: click on the green "Save and Close" button, then the green "Save and Exit" button, and finally the "Accept changes" (Save) button in the Application Tree window to <b>save your work</b>.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Setting the Actions for one button sets them for all three buttons in the set, because they all belong to the same control template. Since the "Phone" table is a small table with just a couple of columns, there’s no need for a separate update procedure.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You created a new Form Procedure, without using a wizard.</li>
<li>You learned just how quickly you can populate data entry controls onto a Form by using the Columnbox toolbox.</li>
<li>You learned to use the Window Designer’s tools to move and align controls.</li>
<li>You used the List Box Formatter again and created a range limited list box.</li>
<li>You learned how to implement edit-in-place for simple updates which don’t require a Form procedure.</li>
</ul>
Now you’ve created all the procedures necessary to maintain both the "Customer" and "Phone" tables. In the <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">next lesson,</a> we’ll create the procedures that will maintain the "Product" data table.<br />
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2021/07/learning-clarion-part-7.html">Learning Clarion (Part 7)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Learning Clarion (Part 6)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">Learning Clarion (Part 5)</a> ]<br />
[ Learning Clarion (Part 4) ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-3.html">Learning Clarion (Part 3)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com1tag:blogger.com,1999:blog-19298483.post-45004899808888453322020-11-27T18:50:00.012+02:002021-07-31T21:11:02.681+02:00Learning Clarion (Part 3)<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" style="display: block; padding: 1em 0px; text-align: center;"><img alt="SoftVelocity Clarion" border="0" data-original-height="149" data-original-width="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgokz9Q-8UTsY4BUBQgyIM-YVqYyOsziQLwp1okYc7qRi2AGG14oa9gocOERww8NYJpB4jfNsMwsuSG5Q_YyPS764ShoJpXL1DYweQWJRaCNTs5WiuslVgxIWU_Z3p2IJ6JBiAH/s0/Clarion.jpg" /></a></div><br />
This follows on from <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a>. Now that we have finished defining the data dictionary, we will import some data into the tables.<br />
<br />
<h1>Lesson 5: Importing Existing Data</h1>
You may have existing data from legacy applications that you want to save and use in your <i>Clarion</i> application. So this chapter shows you:<ul>
<li>How to import a table definition from an existing table.</li>
<li>How to browse and edit a table using the Database Manager.</li>
<li>How to convert data from one table format to another.</li></ul>
First, we need to open the LCLesson.dct dictionary file.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPdWiwwgXmYB9-D38367NFzuLOlDWCBDin_Z39QAXO2j7fA82DisLH_RFpabpdo56VfoFgWnK7Gk45-bAvEnuItc9w5JF3LpSjJqER57_reiUF7MyeWeP7NQNXZpukuohsykk-/s942/LC+Chapter+5-1.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="334" data-original-width="942" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPdWiwwgXmYB9-D38367NFzuLOlDWCBDin_Z39QAXO2j7fA82DisLH_RFpabpdo56VfoFgWnK7Gk45-bAvEnuItc9w5JF3LpSjJqER57_reiUF7MyeWeP7NQNXZpukuohsykk-/s400/LC+Chapter+5-1.png" width="400" /></a></div>
<br />
<h2>Importing a .CSV File Definition</h2>
One easy way to convert tables is to export your old data from the previous application to Comma Separated Values (.CSV) files. This is the file format originally used by the Basic language. The data is contained in DOUBLE-quotes, commas separate fields, and a Carriage Return/Line Feed separates records. Clarion’s BASIC file driver will easily read from and write to these .CSV files.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />We will import the definition of an existing .CSV file containing Customer data, then generate a simple table conversion program (to show you just how easy it is to do) to place the data into a TopSpeed (.TPS) table.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwXX51wC6nXPNAfSISOaNJIai9FcwEzccP-YU1jkfXux7m_Fn3c10UGe_6oGv9Q__4UksdfUmJQ2_GsTIF67FJm9lwVel5iJluUEePn8xvzxFLQI-21GmAeS6ZaJUVdiQ0unz9/s958/LC+Chapter+5-2.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="512" data-original-width="958" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwXX51wC6nXPNAfSISOaNJIai9FcwEzccP-YU1jkfXux7m_Fn3c10UGe_6oGv9Q__4UksdfUmJQ2_GsTIF67FJm9lwVel5iJluUEePn8xvzxFLQI-21GmAeS6ZaJUVdiQ0unz9/s400/LC+Chapter+5-2.png" width="400" /></a></div>
In the "DCT Explorer", press the "Add" button drop list, and select the "Import Table" option.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5hU48JjFTwHaBfOGZY10Brv-A-c9v5HIjV5YGrc4yW3sHSnhZmC9ejrWhYopwkX2Khyphenhyphenft_NrsQEoEF-C9ip3RHhLxwSMbTEfEgUFHSsXDu2M4NPRciALjoNM6Zk-jwT_07T1u/s520/LC+Chapter+5-3.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="413" data-original-width="520" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5hU48JjFTwHaBfOGZY10Brv-A-c9v5HIjV5YGrc4yW3sHSnhZmC9ejrWhYopwkX2Khyphenhyphenft_NrsQEoEF-C9ip3RHhLxwSMbTEfEgUFHSsXDu2M4NPRciALjoNM6Zk-jwT_07T1u/s400/LC+Chapter+5-3.png" width="400" /></a></div>
In the "Select Server" entry, choose "Comma Delimited Files (Basic)" from the dropdown list. Press the ellipsis button to the right of the "Select Dictionary" entry to open the "Select Database" dialog. Alternatively, you can also press the "Next" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-33agzD5R2V3wkCImbGc_DRa7djK1aXL5XMJe-vBWahnpzI4VhCjtZ8ivf4dISyDtqt91v6g4IPD5ZLJ-dNlrv4mpk1YpFafcetqNc8NTdvueXEWu7oKu1WPEs4ngQVm5KOQT/s1079/LC+Chapter+5-4.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="410" data-original-width="1079" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-33agzD5R2V3wkCImbGc_DRa7djK1aXL5XMJe-vBWahnpzI4VhCjtZ8ivf4dISyDtqt91v6g4IPD5ZLJ-dNlrv4mpk1YpFafcetqNc8NTdvueXEWu7oKu1WPEs4ngQVm5KOQT/s400/LC+Chapter+5-4.png" width="400" /></a></div>
Select "C:\Users\Public\Documents\SoftVelocity\Clarion11\Lessons\LearningClarion\IMPORT1.CSV" then press the "Open" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOu6alULNmiqtyYOYMgFSvIhq9kK8rxBQo_6Db7yYMEYxMlUXG2TmGWZ4fnCWzYKi_wyPTmrsaZuvi1e9n2GCdaw3S-HqvuORK9unRtFBmr5Xtaxsrux3x9FRTgmC_m8KILn8/s899/LC+Chapter+5-5.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="361" data-original-width="899" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHOu6alULNmiqtyYOYMgFSvIhq9kK8rxBQo_6Db7yYMEYxMlUXG2TmGWZ4fnCWzYKi_wyPTmrsaZuvi1e9n2GCdaw3S-HqvuORK9unRtFBmr5Xtaxsrux3x9FRTgmC_m8KILn8/s400/LC+Chapter+5-5.png" width="400" /></a></div>
In the "Driver Options" field, press the ellipsis button to open the "BASIC Driver String Builder" dialog. Locate and check the "First Record is Header" check box. Press the "OK" button to close the "BASIC Driver String Builder" dialog.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYYXn_li5TmArNXRV4qwYQw-PiTpecIEtY3o8SfnbaIrGkzdF86YkYCyUNkAMeUFm88O_cYsJoVKEz87XsimCvg4-8sjSg1zZiB1m7CF7f1nPgWjqSmNfBQdodz98LGWvS4l_T/s983/LC+Chapter+5-6.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="607" data-original-width="983" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYYXn_li5TmArNXRV4qwYQw-PiTpecIEtY3o8SfnbaIrGkzdF86YkYCyUNkAMeUFm88O_cYsJoVKEz87XsimCvg4-8sjSg1zZiB1m7CF7f1nPgWjqSmNfBQdodz98LGWvS4l_T/s400/LC+Chapter+5-6.png" width="400" /></a></div>
Once the wizard has finished, notice the "IMPORT1" table definition has been added to the dictionary.<br />
<br />
<h2>View the imported data</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIWtHGnysuhg68QpmbcWWcaS4UYMTgZLoxuUhxFjZbOZk-hZa0Ap5QZjpLSDIy5CIKQdPR-UaLiXWxcMRFPLnOX9I0t1xruzevg0bicQ2itFjpAY72fBtKoj_Hbhp6Q772yrFH/s487/LC+Chapter+5-7.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="487" data-original-width="481" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIWtHGnysuhg68QpmbcWWcaS4UYMTgZLoxuUhxFjZbOZk-hZa0Ap5QZjpLSDIy5CIKQdPR-UaLiXWxcMRFPLnOX9I0t1xruzevg0bicQ2itFjpAY72fBtKoj_Hbhp6Q772yrFH/s400/LC+Chapter+5-7.png" /></a></div>
Right-Click on the IMPORT1 table, select "Browse Table" to call the Database Browser. Or press the "Browse" button on the DCT Explorer toolbar (highlighted in blue above).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM2sdOaOHcT6AJ-EuL33sk9XdGKq6E3SNK9lyqt5ux3cYf9Til0N6_6oAB7V2G_XrTBuMtlfGwZkJb5Ppz4w9Zlke-C-tA5P9OAIp4KzgL1iPIr8A1K8dbUsun7b7eOz560YEg/s858/LC+Chapter+5-8.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="297" data-original-width="858" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM2sdOaOHcT6AJ-EuL33sk9XdGKq6E3SNK9lyqt5ux3cYf9Til0N6_6oAB7V2G_XrTBuMtlfGwZkJb5Ppz4w9Zlke-C-tA5P9OAIp4KzgL1iPIr8A1K8dbUsun7b7eOz560YEg/s400/LC+Chapter+5-8.png" width="400" /></a></div>
The <i>Clarion</i> Database Browser allows you to directly edit the data in your tables. This is a programmer’s tool, designed to allow you to do whatever is necessary to change the actual data contained in your tables. This means that there are no safeguards against violating your database’s Referential Integrity or Data Integrity rules. Therefore, you must take care when you use this tool.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />In this lesson, we do not need to make any changes at this time, and simply wanted to identify this IDE tool if needed. <b>Close</b> the Database Browser at this time and return to the DCT Explorer in the already opened GSLesson dictionary.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The "Customer" data file doesn't exist yet.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb_yiQK2qqG6hoJg35oGF8XkSjAMzeSqVadWi4gaYJ6EW9jCgdfAsCi71TWLBNpAj_ys18GKKdRwkZo-M4Hxkz8dwQTfDuYqerCRAsJkDnGzba2YhCaoJhZtZu_XoSqrgfI3Iz/s958/LC+Chapter+5-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="512" data-original-width="958" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb_yiQK2qqG6hoJg35oGF8XkSjAMzeSqVadWi4gaYJ6EW9jCgdfAsCi71TWLBNpAj_ys18GKKdRwkZo-M4Hxkz8dwQTfDuYqerCRAsJkDnGzba2YhCaoJhZtZu_XoSqrgfI3Iz/s400/LC+Chapter+5-12.png" width="400" /></a></div>
Right-click on the "Customer" table name and select "Browse Table".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5azpcxFjYaCUEgCqQ_0BEXpUCGRuqoCIc2dJnNAtGLQSK4_FQ35mw7IKoiNwcFxhsbX3Z7vxN-ypEpSVg5HqcyQdzTVzu36kWYTxsReMJOsGwLG_okWRJOrxJ7Duz_8NZWY8/s962/LC+Chapter+5-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="513" data-original-width="962" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh5azpcxFjYaCUEgCqQ_0BEXpUCGRuqoCIc2dJnNAtGLQSK4_FQ35mw7IKoiNwcFxhsbX3Z7vxN-ypEpSVg5HqcyQdzTVzu36kWYTxsReMJOsGwLG_okWRJOrxJ7Duz_8NZWY8/s400/LC+Chapter+5-13.png" width="400" /></a></div>
Answer "Yes" to create the file.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoDUSHjc-kcKlmw8__qSz8MQgliM4X7DeEQ_Otif3ujUvrteZ_PB6iyZHfU-pAz0pe70Im9ndZ-9BXP_7GRt1-e3ImZ2UyFNaho2uBWlUo33aSntWzbJ0ujT3_Zgzh-kA4BSeJ/s959/LC+Chapter+5-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="246" data-original-width="959" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoDUSHjc-kcKlmw8__qSz8MQgliM4X7DeEQ_Otif3ujUvrteZ_PB6iyZHfU-pAz0pe70Im9ndZ-9BXP_7GRt1-e3ImZ2UyFNaho2uBWlUo33aSntWzbJ0ujT3_Zgzh-kA4BSeJ/s400/LC+Chapter+5-14.png" width="400" /></a></div>
Close the empty table once it opens.<br />
<br />
<h2>Generate a table conversion program</h2>
In the DCT Explorer, right-click on the "Customer" table, and select the following conversion option:<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxMqlewYuZz0HteGdhtDqR0xn1nysNzddPsrD7zqjq10nn07WnQtJM7KY1v_FVjkpcef70g8perGIhLOW2XAqFUlB-U-RUIx-F8UjBOSRv6m02j76f2HuqAKtE56_jqPpd0mxH/s958/LC+Chapter+5-9.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="484" data-original-width="958" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxMqlewYuZz0HteGdhtDqR0xn1nysNzddPsrD7zqjq10nn07WnQtJM7KY1v_FVjkpcef70g8perGIhLOW2XAqFUlB-U-RUIx-F8UjBOSRv6m02j76f2HuqAKtE56_jqPpd0mxH/s400/LC+Chapter+5-9.png" width="400" /></a></div>
You can specify a table to convert from three different sources. The target can be directly on disk (using Data File), a table definition in the current dictionary (using Table Definition), or a table definition in another dictionary (using Table Definition from another DCT). We have chosen a table from our current dictionary.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXG4F6E6p13cJzID2Rzq-UomD4cUWNMFQog20brYPV2Vdw6QHMxCR7mZjH5kO8_-FSpgZ1X0BLV8cw5AdK5Zg9PcEDbNfcHVm9qbRsmLJ5iHurwmO0QNYIu9_UrRAkmUmtCuMy/s961/LC+Chapter+5-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="515" data-original-width="961" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXG4F6E6p13cJzID2Rzq-UomD4cUWNMFQog20brYPV2Vdw6QHMxCR7mZjH5kO8_-FSpgZ1X0BLV8cw5AdK5Zg9PcEDbNfcHVm9qbRsmLJ5iHurwmO0QNYIu9_UrRAkmUmtCuMy/s400/LC+Chapter+5-10.png" width="400" /></a></div>
Select the "IMPORT1" table as the data source and click "Select". The table that you select <i>first</i> in the conversion program process is always the <b>target</b>. In our example, the "Customer" table is the target, and "IMPORT1" is the <b>source</b>.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujPjtDaW1M0-_crRuqTjBiHWvd5Gvqm8CJw1W7U-WRWqWt-TnkjWSCxHe072laMmraYlSXjtiTyXVgzVlUe4mxE3lzjnbYZP3VhCXFjUVfaaGf6S0-Tc6me3ftsD_9OpL9Lig/s618/LC+Chapter+5-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="404" data-original-width="618" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgujPjtDaW1M0-_crRuqTjBiHWvd5Gvqm8CJw1W7U-WRWqWt-TnkjWSCxHe072laMmraYlSXjtiTyXVgzVlUe4mxE3lzjnbYZP3VhCXFjUVfaaGf6S0-Tc6me3ftsD_9OpL9Lig/s400/LC+Chapter+5-11.png" width="400" /></a></div>
The "Select New Project File" dialog appears. Accept the default name (convert.cwproj), and the default LearningClarion folder name, by pressing the Save button. Project files determine what source file to compile, and how to build (link) it. The default extension of project files is *.cwproj.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbkgDz_5ikitKWdHDL7CLm3EkuYiMLIy9_DzxTftwV35NE8OQTkWspCNmHmjBuVBFoofunionqz_PR0bdkxLTNAUm2XY5Hu4iZZkDcoqr-vxUNpffUrO9shGMIgvgOFrOo_Enz/s616/LC+Chapter+5-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="402" data-original-width="616" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbkgDz_5ikitKWdHDL7CLm3EkuYiMLIy9_DzxTftwV35NE8OQTkWspCNmHmjBuVBFoofunionqz_PR0bdkxLTNAUm2XY5Hu4iZZkDcoqr-vxUNpffUrO9shGMIgvgOFrOo_Enz/s400/LC+Chapter+5-15.png" width="400" /></a></div>
Select the target table file (Customer.TPS) and click "Open".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9KgfAk0AiEwp0Knm3vY_bv5sN-NTYKNTt17fkxIMyHVRgNEiwBAdQVI-PFZrClp0JGezm8MSojUf6Ch2YDVUvee96jCUAUHNL4SDOQnF8qUxIZlbHnoRxj93y2_H35uf2-78u/s960/LC+Chapter+5-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9KgfAk0AiEwp0Knm3vY_bv5sN-NTYKNTt17fkxIMyHVRgNEiwBAdQVI-PFZrClp0JGezm8MSojUf6Ch2YDVUvee96jCUAUHNL4SDOQnF8qUxIZlbHnoRxj93y2_H35uf2-78u/s400/LC+Chapter+5-16.png" width="400" /></a></div>
Another dialog pops up that asks you if you would like to load the data conversion program. Press the "Yes" button. The wizard completes, but the conversion project is not opened (No idea why). We will return to the conversion program shortly.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The best reason to generate <i>Clarion</i> source code for the data conversion is to provide you the opportunity to modify the code before you compile and execute it to handle any special data conversion needs you may have. This makes the conversion process completely flexible to handle any situation that can occur.<br />
<br />
<h2>Delete the "IMPORT1" file definition</h2>
The only purpose this file definition served was to allow the Dictionary Editor to generate file conversion source code for you. Therefore, we can delete it from the Data Dictionary right now.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbk72qoqoWDiDa1wswnXjuWmFPgGlx_V-ZKIHzwp2B6zsonxazPw46_9DmRy4b3xC4YyweZ_qEHd8-60KO7a_Y9GTdVIaXjGz0foqevNYtHTQoKLItoaMJVgnfzFvqIMdpj51E/s960/LC+Chapter+5-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbk72qoqoWDiDa1wswnXjuWmFPgGlx_V-ZKIHzwp2B6zsonxazPw46_9DmRy4b3xC4YyweZ_qEHd8-60KO7a_Y9GTdVIaXjGz0foqevNYtHTQoKLItoaMJVgnfzFvqIMdpj51E/s400/LC+Chapter+5-17.png" width="400" /></a></div>
Highlight the "IMPORT1" table in the DCT Explorer, and press the Delete button in the DCT Explorer toolbar. Press the "Yes" button when asked to confirm the deletion. Press the green "Save and Close" button to exit the Data Dictionary Editor.<br />
<br />
<h2>Load the conversion program</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqmUX3kw65OfdETUKpDEY2bhhxvdlS2wb-KSDrKz-jR60uVquOwL-cCSOauPhtcpQi2H052uHJuzFQPLDO_9BG9vxZt1wXRXMH5kBmWpX5ILtvYF9qykDbGikwx-4K290NIk71/s1006/LC+Chapter+5-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="650" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqmUX3kw65OfdETUKpDEY2bhhxvdlS2wb-KSDrKz-jR60uVquOwL-cCSOauPhtcpQi2H052uHJuzFQPLDO_9BG9vxZt1wXRXMH5kBmWpX5ILtvYF9qykDbGikwx-4K290NIk71/s400/LC+Chapter+5-18.png" width="400" /></a></div>
From the "View" menu, select "Solution Explorer". If it doesn't open, click on the tab on the far right, shown by the red arrow. Expand the project to find the "Convert.clw" generated code, and click on the "Open" button (or double-click on the file name).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEdegov4sizhHirE6G16rTsEJpl4OAIQyaLee7Fdpqq5jjXV1U6hGobn0-2TbxTOjbXcTzgt3eLRFecJc67Jufwz6tvfykP2m4oroRxnJ9eD0RIswfW0HgUg9GL6yo1UxUFHzM/s1009/LC+Chapter+5-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1009" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEdegov4sizhHirE6G16rTsEJpl4OAIQyaLee7Fdpqq5jjXV1U6hGobn0-2TbxTOjbXcTzgt3eLRFecJc67Jufwz6tvfykP2m4oroRxnJ9eD0RIswfW0HgUg9GL6yo1UxUFHzM/s400/LC+Chapter+5-19.png" width="400" /></a></div>
<i>Clarion</i>’s Text Editor appears with the file loaded, ready to edit. The Dictionary Editor created the conversion program code in this file. This contains all the <i>Clarion</i> language source code necessary to read the data from the BASIC (.CSV) file and copy it to the TopSpeed table.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Scroll down until you find the routine called "AssignRecord". Change the line that reads<br />
<pre>CUS:State = Source:State</pre>
to read:<br />
<pre>CUS:State = UPPER(Source:State)</pre>
This will make sure that all the 2-letter state codes are converted to upper case during the transfer.<br />
Also, comment out the two lines in the previous routine by using the exclamation point (see above). For some reason, the generated code tries to copy the Customer file over itself, and then deletes the original file, so the data is lost.<br />
Click on the "<b>Save</b>" button on the main toolbar to save your work.<br />
<br />
<h2>Compile/Build and run the conversion program</h2>
The Dictionary Editor generated the Convert.cwproj file for you at the same time it created the Convert.clw file. Every <i>Clarion</i> program has a project that controls the options for compiling the source code and linking to create the resulting .EXE file. For hand-coded programs (and conversion programs generated by the Database Manager), these settings are contained in a .cwproj file.<br />
Click on the "<b>Start without debugger (Builds solution)</b>" button to compile and build the program, and then run it.<br />
<img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This compiles the program, links it into an .EXE, then runs the resulting executable to perform the file conversion. A status window appears as the program runs, letting you know the progress of the file conversion. Since there are only a few records to convert in this case, you probably won’t be able to read it (it’ll go by too fast).
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBn7ES16yyfR7UPfGKMHEvA_PU_3rOQv4uR5F-9Qd8s8rZ0Q4kTkyCrT9eGrWU4Ta5BVV95vtM6VWoJR_al2NAGSLXc1cwxj4I90Rop4DOd7aZeHATp80QhgL4j_JTUa318JdK/s638/LC+Chapter+5-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="514" data-original-width="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBn7ES16yyfR7UPfGKMHEvA_PU_3rOQv4uR5F-9Qd8s8rZ0Q4kTkyCrT9eGrWU4Ta5BVV95vtM6VWoJR_al2NAGSLXc1cwxj4I90Rop4DOd7aZeHATp80QhgL4j_JTUa318JdK/s400/LC+Chapter+5-20.png" width="400" /></a></div>
Choose "Close" from the "File" menu, "File" to close the program source file and exit the Text Editor. Then choose "File", "Close", "Solution" to close the conversion project.<br />
<br />
<h2>Check it out</h2>
Now you can check the data in the new file by opening it with the Database Browser and browsing through the records.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia4ttcxHw1D0rCPSWQcxNmcSwkR-73ws4c1a_7kGv0ADvgRw_3S82hMaCrUls6KqzK4n4IHSqoCZluAjIMwoLigla7ZPQorAhRRpiG3exYnA4A-Fq9kabqPRbNiyvFN3mdmoHl/s1011/LC+Chapter+5-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1011" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia4ttcxHw1D0rCPSWQcxNmcSwkR-73ws4c1a_7kGv0ADvgRw_3S82hMaCrUls6KqzK4n4IHSqoCZluAjIMwoLigla7ZPQorAhRRpiG3exYnA4A-Fq9kabqPRbNiyvFN3mdmoHl/s400/LC+Chapter+5-21.png" width="400" /></a></div>
Choose "Browse Table" from the "Tools" menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqObMdvUI-xE4M2bvA2uVfI4OxPL0eK37GufX8fv6Jplo1OYswK5et-pUcfErJRtRQ6eD9TXooKBioN3Yby65rPZwzwnEBx6arflvxpPtZAt1XSJbf6IkcFKZsbORpYC6YMavn/s491/LC+Chapter+5-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="491" data-original-width="396" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqObMdvUI-xE4M2bvA2uVfI4OxPL0eK37GufX8fv6Jplo1OYswK5et-pUcfErJRtRQ6eD9TXooKBioN3Yby65rPZwzwnEBx6arflvxpPtZAt1XSJbf6IkcFKZsbORpYC6YMavn/s400/LC+Chapter+5-22.png" /></a></div>
In the "Select Driver used to Browse the Table" dialog window, highlight "TopSpeed (TPS)" and press the "Select" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxxBkVltw5xw8LQirJH8nGNJ3MSE4HJXHbIUOa9Epquy5iFQprkgHz2_crJX65YmN05hN41soxg7pimt2oJOj8vhA0dCb-QWPicn8gW9mD6s_-P6jTfugRW31rzMZvZWbQmOG/s388/LC+Chapter+5-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="139" data-original-width="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBxxBkVltw5xw8LQirJH8nGNJ3MSE4HJXHbIUOa9Epquy5iFQprkgHz2_crJX65YmN05hN41soxg7pimt2oJOj8vhA0dCb-QWPicn8gW9mD6s_-P6jTfugRW31rzMZvZWbQmOG/s400/LC+Chapter+5-23.png" /></a></div>
In the "Open TopSpeed File" dialog, press the ellipsis button, and select the "CUSTOMER.TPS" file, then press the "Open" button, then click "OK".
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAnEZfWvrXN5SxLuvzWaFOraMv8HpTM8oYWQwfArBSYSYe-vB6XySX-jGH_JgiQD02mBGMzs390lTy1r2N-i2DYVL22hA-MK8q7ZyLiW5RFd49WY8p1_Wy4r60RuNR5Hu7rkcG/s1009/LC+Chapter+5-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="600" data-original-width="1009" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAnEZfWvrXN5SxLuvzWaFOraMv8HpTM8oYWQwfArBSYSYe-vB6XySX-jGH_JgiQD02mBGMzs390lTy1r2N-i2DYVL22hA-MK8q7ZyLiW5RFd49WY8p1_Wy4r60RuNR5Hu7rkcG/s400/LC+Chapter+5-24.png" width="400" /></a></div>
This demonstrates another way to open the Database Browser, other than from within the Dictionary Editor.<br />
There are two obvious problems with this data. The first record is not data at all, but the names of the column headings. The other problem is that we can't see the ZIP codes.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKD1I0_k5lwPWb8gK2mEhgMR_F8sNmufAxL4d4ALMyaMENtafmOsfEOmXJFUNeD5iwcXrNO7oGX2FW_0MD6M0393rwr0qYG8ACIxCVlkUEo3ioyKJamoKPcGVQcYId31iifHrA/s960/LC+Chapter+5-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="359" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKD1I0_k5lwPWb8gK2mEhgMR_F8sNmufAxL4d4ALMyaMENtafmOsfEOmXJFUNeD5iwcXrNO7oGX2FW_0MD6M0393rwr0qYG8ACIxCVlkUEo3ioyKJamoKPcGVQcYId31iifHrA/s400/LC+Chapter+5-25.png" width="400" /></a></div>
Click on the "Format Columns" button, select "CUS:ZIPCODE" from the drop-down list and apply the "@P#####P" picture that we used in the <i>Getting Started</i> exercises. Click on "Apply Formatting" and "Close". Now we can read the ZIP code data.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iJY85ocu-s0RUmOiL90MHB7ICdZsaJM_I1PJo9BdioHDEzSm-biGXF3M5SJddJJIIzShT6NKcj8hMdcI5WLvR9AlE6D6xc3t0N1miZGJQTKhv03RACmEPdGV64yKUgnJoc-M/s955/LC+Chapter+5-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="355" data-original-width="955" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7iJY85ocu-s0RUmOiL90MHB7ICdZsaJM_I1PJo9BdioHDEzSm-biGXF3M5SJddJJIIzShT6NKcj8hMdcI5WLvR9AlE6D6xc3t0N1miZGJQTKhv03RACmEPdGV64yKUgnJoc-M/s400/LC+Chapter+5-26.png" width="400" /></a></div>
Notice that the data is sorted by default according to the first column. The first row (CustNumber = 0) is meaningless. It came from the "Header" record of the CSV file, so it's time to delete it. Click on the "Delete record" button at the bottom of the window. Then click on the "Save" button and close the file.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You imported a table definition from an existing .CSV file.</li>
<li>You used <i>Clarion</i>’s Database Browser utility to examine the contents of the .CSV table.</li>
<li>You used <i>Clarion</i>’s Conversion Program utility to generate code to create a table conversion program.</li>
<li>You compiled and executed a table conversion program to import data from a .CSV table into a TopSpeed table.</li>
</ul>
Now you’ve converted some valuable existing data to the TopSpeed table format so your <i>Clarion</i> applications can use it. In the next chapter, we will begin building an application "from scratch" using the Application Generator.<br />
<br />
<h1>Lesson 6: Starting the Application</h1>
With the <i>Data Dictionary</i> complete, you now can use the <b>Application Generator</b> to create your application. This chapter shows you:<ul>
<li>How to create the .APP file, which stores all your work for the project.</li>
<li>How to define the first (Main) procedure to create an MDI application frame, and how to call procedures from the application’s menu.</li>
</ul>
We begin the lesson with an empty <i>Clarion</i> IDE.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7TBdSFQhOGdZaYnK87uRgry31p28poLdZEEpP5xuxdXoF4S97V5ynfARjYBnaaNfDf8akxoZDydeRflVY5_I0T36u42CP3f4F4IdX8uRyHcMBp69aBch4ivYHC0llzxCWEbku/s1007/LC+Chapter+6-1.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="650" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7TBdSFQhOGdZaYnK87uRgry31p28poLdZEEpP5xuxdXoF4S97V5ynfARjYBnaaNfDf8akxoZDydeRflVY5_I0T36u42CP3f4F4IdX8uRyHcMBp69aBch4ivYHC0llzxCWEbku/s400/LC+Chapter+6-1.png" width="400" /></a></div>
From the "File" menu, select "New", "Solution, Project or Application".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZDZQ5eJIwi8rSPhmRcHMxd6gIfDM6Jox08RnfEQW4LpKoobAJw1MAU2dP-Ntsdx4xn0vffG18qZe2nQiAUfhd7A53bDSbTkfCb7agRJbuvttJ2EQR7waApnI1M0NAiGi7Y204/s533/LC+Chapter+6-2.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="533" data-original-width="528" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZDZQ5eJIwi8rSPhmRcHMxd6gIfDM6Jox08RnfEQW4LpKoobAJw1MAU2dP-Ntsdx4xn0vffG18qZe2nQiAUfhd7A53bDSbTkfCb7agRJbuvttJ2EQR7waApnI1M0NAiGi7Y204/s400/LC+Chapter+6-2.png" /></a></div>
In the resulting dialog box, type in "LCLesson" for the application name, and remove the check mark from "Auto create project subdir". Click on the "Create" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCVZ3omFMuyaWZ6eR8VEmRRECbi5hwcsBXiPp6rGlvk8-5qYdGzdA71ynsLIy1e-yEaUrq59Nj1f94HEeCVOBN5UQ5uM9_UJgOg6HcYsfsF99qsbng4cBulfE93M1njlDX4-lE/s523/LC+Chapter+6-3.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="381" data-original-width="523" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCVZ3omFMuyaWZ6eR8VEmRRECbi5hwcsBXiPp6rGlvk8-5qYdGzdA71ynsLIy1e-yEaUrq59Nj1f94HEeCVOBN5UQ5uM9_UJgOg6HcYsfsF99qsbng4cBulfE93M1njlDX4-lE/s400/LC+Chapter+6-3.png" width="400" /></a></div>
Type in the dictionary file name "LCLesson.dct" or use the ellipsis button to select it. Remove the check mark from "Application Wizard" because we are going to do some steps manually instead. Click the "OK" button.<br />
<br />
<h2>Creating the Main Procedure</h2>
The Application Tree dialog appears. This lists all the procedures for your application in a logical procedure call tree, which provides a visual guide to show the order by which one procedure calls another. You previously saw it in the <i>Getting Started</i> exercises.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The "Main" procedure is the starting point. The lesson application will be an MDI (Multiple Document Interface) program. Therefore, the natural starting point is to define the "Main" procedure using the "Frame Procedure" template to create an application frame. A frame is a type of visual program-wide starting point, providing menus, toolbars, and other options.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwjM5FYvP5-iTYruezdTmOda-IVU6fmxhZFDu_hDIsSG6TfkL9jzYDeoR-1PllRm_q2-zEcLMm0BCzVBMZ31JUL9lEhGG43Cld-vNuNccFie4uRSNR0AhFXF24yzQNvJH323NR/s1006/LC+Chapter+6-4.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwjM5FYvP5-iTYruezdTmOda-IVU6fmxhZFDu_hDIsSG6TfkL9jzYDeoR-1PllRm_q2-zEcLMm0BCzVBMZ31JUL9lEhGG43Cld-vNuNccFie4uRSNR0AhFXF24yzQNvJH323NR/s400/LC+Chapter+6-4.png" width="400" /></a></div>
Click on the "Main" procedure object, and then on the "Properties" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0TE_uxR_YBRL-V3rGzsBrs6VWQRYAkNJkFxNrsczcoCHV5cj5k3-3fUCXfR0wEVRU8H9-Kmv49ZluulL3pIFS1dGDadsEhKfPxyylQ1od5vCvSi24txn4DWtsjfWKJQi_Xy2W/s634/LC+Chapter+6-5.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="404" data-original-width="634" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0TE_uxR_YBRL-V3rGzsBrs6VWQRYAkNJkFxNrsczcoCHV5cj5k3-3fUCXfR0wEVRU8H9-Kmv49ZluulL3pIFS1dGDadsEhKfPxyylQ1od5vCvSi24txn4DWtsjfWKJQi_Xy2W/s400/LC+Chapter+6-5.png" width="400" /></a></div>
Click on the "Defaults" tab, and choose the "Default MDI Frame" template. Click "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDKvI_4StroViGpiz1m_mbNKAj2-uYTYsHyuCVUS5qdO6DpeJSPHEnsPX-0_pXmN8eNXu1VBbGALgZMqRPZRol2koNHpQsMxPtDuWOvcg3n1OsPXWNhRljJIYC8MSpeZENr5NQ/s958/LC+Chapter+6-6.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="509" data-original-width="958" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDKvI_4StroViGpiz1m_mbNKAj2-uYTYsHyuCVUS5qdO6DpeJSPHEnsPX-0_pXmN8eNXu1VBbGALgZMqRPZRol2koNHpQsMxPtDuWOvcg3n1OsPXWNhRljJIYC8MSpeZENr5NQ/s400/LC+Chapter+6-6.png" width="400" /></a></div>
The Procedure Properties dialog appears. It defines the functionality and data structures for the procedure. Press the "Actions" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvZxTx-cABYcxdnOy_0mU5Sbqv-5aRnhXoh_Z9TdpnCESnnNjDesvsIkwCNMWVn0-OYJS9ED_sCirip7B8IMHZfgI7l2JXqEX-a_3cyx1g4Zr0AT0DtUknugnvGuFr74j3WnS/s829/LC+Chapter+6-7.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="345" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyvZxTx-cABYcxdnOy_0mU5Sbqv-5aRnhXoh_Z9TdpnCESnnNjDesvsIkwCNMWVn0-OYJS9ED_sCirip7B8IMHZfgI7l2JXqEX-a_3cyx1g4Zr0AT0DtUknugnvGuFr74j3WnS/s400/LC+Chapter+6-7.png" width="400" /></a></div>
In the "Main – Properties" dialog, type "SplashScreen" in the Splash Procedure field, then click "OK". This names the procedure containing an opening screen that will appear for just a brief period when the user first opens the application.<br />
<br />
<h2>Edit the Main Window</h2>
Usually, the first task when creating a procedure is to edit the main window. You can place controls, or if the procedure template has controls already, you can customize them.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The application frame itself never has controls. <i>Windows</i> doesn’t allow it. We will, however, customize the window caption (the text that appears on its title bar). Then we will add items to the predefined menu, which is also built into the Frame Procedure template, and create a toolbar for the application (a toolbar can have controls).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwI_6_YB_erM2whPrKFHIKiaivnu36-Eedyn1ceAKN0dml0AWA7gshhtZGjkLkuldh-hfnR7sRc9gAUDEgtytBG3_SwdUDRmkiicqqYJKdWoBA010RoalMJCoemwyHOjEzBsBn/s962/LC+Chapter+6-8.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="962" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwI_6_YB_erM2whPrKFHIKiaivnu36-Eedyn1ceAKN0dml0AWA7gshhtZGjkLkuldh-hfnR7sRc9gAUDEgtytBG3_SwdUDRmkiicqqYJKdWoBA010RoalMJCoemwyHOjEzBsBn/s400/LC+Chapter+6-8.png" width="400" /></a></div>
Now click on the "Window" button to open the Window Designer.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijaLCYi_PRtZuu43kFD5npTMnVTNl9YZhfi0RLuUZ4xg6AHtY8st0Jguj-GTzj9zBtje4MfBZb666krL9kyhaE5D6AtEvm3St9jprecIifs8Ew1_ymNlp8jC8Hzqj53WKT1QAd/s1008/LC+Chapter+6-9.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="539" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijaLCYi_PRtZuu43kFD5npTMnVTNl9YZhfi0RLuUZ4xg6AHtY8st0Jguj-GTzj9zBtje4MfBZb666krL9kyhaE5D6AtEvm3St9jprecIifs8Ew1_ymNlp8jC8Hzqj53WKT1QAd/s400/LC+Chapter+6-9.png" width="400" /></a></div>
The Window Designer appears. Here are all the tools that allow you to visually edit the window and its controls. On the far right, you should see the "Properties" pad. Click on it (red arrow above) to display the application properties. Find the "Title" property and click in the field to change it to read "LCLesson Application" as shown. (If the properties pad isn't available, you can select it from the "View" menu.)<br />
<br />
<h2>Editing the Menu</h2>
From the Window Designer or Properties Pad, you can call the Menu Editor, which allows you to add or edit menu items for the application frame window. As you add each menu item, you can access the Actions dialog to name the procedure to call when the user chooses that menu item.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />For each new procedure you name for the menu to call, the Application Generator automatically adds a "ToDo" procedure to the Application Tree. You can then define that procedure’s functionality, just as you are now defining the application frame procedure’s functionality.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />When the Application Generator generates the source code for your application, it automatically starts a new execution thread for each procedure you call from the main menu (this is required for an MDI application).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2EZNzMif8oh_CRRB1ho20_4TFzoXLTAj5pFeW1X0vjczeoG4FUfU-KfqtQynk8rql41R-qWmgCDxX7xiT9uJaEv7K9Lefpxcd86pbfe6rhUGmQ6kZwvS4pUuilkHeivqOuWR8/s1006/LC+Chapter+6-10.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="515" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2EZNzMif8oh_CRRB1ho20_4TFzoXLTAj5pFeW1X0vjczeoG4FUfU-KfqtQynk8rql41R-qWmgCDxX7xiT9uJaEv7K9Lefpxcd86pbfe6rhUGmQ6kZwvS4pUuilkHeivqOuWR8/s400/LC+Chapter+6-10.png" width="400" /></a></div>
In the Window Designer, click on the Menu bar and then the "Edit Menu" task at the bottom of the properties window.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMIcdUKlSLPqigDDZJv-YEJzC_fIquj34_Hf5sA48RssMm60OQVNuCuq9eKsra8mLHNvMaFNhoS9K4IHZQuG_gFz0tKV6S-U4mPEOiEE5-edZ0JUzptwZ1EtcLNPGWjDdpX4ju/s962/LC+Chapter+6-11.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="962" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMIcdUKlSLPqigDDZJv-YEJzC_fIquj34_Hf5sA48RssMm60OQVNuCuq9eKsra8mLHNvMaFNhoS9K4IHZQuG_gFz0tKV6S-U4mPEOiEE5-edZ0JUzptwZ1EtcLNPGWjDdpX4ju/s400/LC+Chapter+6-11.png" width="400" /></a></div>
Click on the "Paste" entry because we want to insert another menu below it. Then click on the "Add New Menu" button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg64NO_yJJq3gDd_xPXSWzZ4PQgU2CWhVodLWcrxzoMqn9rQ4mnzAr3C3Gk_o3qRcA2LVzn58TM6lhAXj0q9RQ_P6ERLh698VSLKIUaTIx5RDwTgc6y8i9dYNG08s5Ytgt0bzeY/s963/LC+Chapter+6-12.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="514" data-original-width="963" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg64NO_yJJq3gDd_xPXSWzZ4PQgU2CWhVodLWcrxzoMqn9rQ4mnzAr3C3Gk_o3qRcA2LVzn58TM6lhAXj0q9RQ_P6ERLh698VSLKIUaTIx5RDwTgc6y8i9dYNG08s5Ytgt0bzeY/s400/LC+Chapter+6-12.png" width="400" /></a></div>
Use the "Menu Down" button to move it to the main menu level, and then change the text of the menu to read "&Browse" as shown. This defines the text that appears on the menu to the end user. The ampersand (&) indicates that the following character (B) is underlined and provides keyboard access (the user can press ALT+B to drop down this menu).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoZ0zyQ5nh7VKJu00hWZ09iY-UuWO6ZD_UazIBlgUwwvCyh8rcFbnta2ZEUoBkF_31vtXP38h_0vvtBpuCMVmVhoeUmiSVKHmYVFxXBP16xuqlSyEUwZkky26IK_2Zi_88Aq31/s961/LC+Chapter+6-13.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="512" data-original-width="961" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoZ0zyQ5nh7VKJu00hWZ09iY-UuWO6ZD_UazIBlgUwwvCyh8rcFbnta2ZEUoBkF_31vtXP38h_0vvtBpuCMVmVhoeUmiSVKHmYVFxXBP16xuqlSyEUwZkky26IK_2Zi_88Aq31/s400/LC+Chapter+6-13.png" width="400" /></a></div>
Press the "New Item" button (or press INSERT). This adds a new <b>menu item</b> — a command on the dropdown menu — under "&Browse".<br />
Type "&Customers" in the "Text" field then press TAB three times.<br />
Type "?BrowseCustomer" in the "Use" field. (This is an equate for the menu item, so code statements can reference it. The leading question mark (?) indicates it is a field equate label.)<br />
Next, click on the "Actions ..." button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0ZqBQUr2I1Slr-P9x3KCVSRA8LtM2qRPCAA7TQduqz5NRFR7JzREoRy10l4sW39UMRUnN1j_uHxHT1qgSY7FitsV_R9pP-zZwRu79_gpLt1myREi3kqcIBY36kT8jFnvhnWp0/s828/LC+Chapter+6-14.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="828" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0ZqBQUr2I1Slr-P9x3KCVSRA8LtM2qRPCAA7TQduqz5NRFR7JzREoRy10l4sW39UMRUnN1j_uHxHT1qgSY7FitsV_R9pP-zZwRu79_gpLt1myREi3kqcIBY36kT8jFnvhnWp0/s400/LC+Chapter+6-14.png" width="400" /></a></div>
For the "When Pressed" setting, choose "Call a Procedure" from the drop-down list.<br />
Type in "BrowseCustomers" in the "Procedure Name" field. This names the "ToDo" procedure for the Application Tree. Enable the "Initiate Thread" checkbox. Click "OK". The BrowseCustomers procedure will display an MDI "child" window, and you must always <i>start a new execution thread</i> for any MDI window called directly from the application frame. The Thread Stack field defaults to the minimum recommended value.<br />
<br />
<h2>Add the second menu item</h2>
Press the "New Item" button. Type "&Products" in the "Text" field and press TAB three times.<br />
Type "?BrowseProducts" in the "Use" field.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Normally, the next step is to define the action for the menu item—what happens when the end user executes it from the menu. We’ll skip over this step for now, for this menu item only. Later, you’ll create a procedure by copying it, then attaching it to this menu, just to show you this capability of the <i>Clarion</i> environment.<br />
<br />
<h2>Add the third menu item</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-h3ljlMC5jROLFYLY8apHYpmcEJSwSdozNOlrT8Eri-3zxhe2eZN3Oolfus6nMKOS2iPS8oZqm5VrWmnjEG744uIrxBCC5Zg_mdpLDFamrmZABs2AwzhyIkrKH4wfOoxqznES/s960/LC+Chapter+6-15.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="509" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-h3ljlMC5jROLFYLY8apHYpmcEJSwSdozNOlrT8Eri-3zxhe2eZN3Oolfus6nMKOS2iPS8oZqm5VrWmnjEG744uIrxBCC5Zg_mdpLDFamrmZABs2AwzhyIkrKH4wfOoxqznES/s400/LC+Chapter+6-15.png" width="400" /></a></div>
Press the "New Item" button. Type "&Orders" in the "Text" field and press TAB three times.<br />
Type "?BrowseOrders" in the "Use" field. Click on the "Actions ..." button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ViN_RHlBIBJUHTxuWZtTmxy5cukZ2oY8fHqJybEcMvaKUR64cvQvQKDou6It0JVx_g2QOKOirwxfKGZenZF1DML0oS3JkeInzMQcVNLeFnKFwnMdb_UNw42gqYVzz9iA8rg7/s829/LC+Chapter+6-16.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="346" data-original-width="829" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0ViN_RHlBIBJUHTxuWZtTmxy5cukZ2oY8fHqJybEcMvaKUR64cvQvQKDou6It0JVx_g2QOKOirwxfKGZenZF1DML0oS3JkeInzMQcVNLeFnKFwnMdb_UNw42gqYVzz9iA8rg7/s400/LC+Chapter+6-16.png" width="400" /></a></div>
In the Actions dialog, choose "Call a Procedure" from the "When Pressed" drop-down list.<br />
Type "BrowseOrders" in the "Procedure Name" field.<br />
Check the "Initiate Thread" box.<br />
Press "OK" to close the ?BrowseOrders Prompts dialog.<br />
<br />
<h2>Fixing the Menu Font</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI_HJZsP6UoexzKLtm-8imTZwi59is0moRwFUN9uV5DFrCT7nt-6Tn9L2QYNbXO0eVwlUPW9qxusL_Qw1kK6hAmyQZnVHq_slwvSbUaq7NOpfdMhcezd7v2RqHM2R2mqPTFNvb/s957/LC+Chapter+6-17.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="483" data-original-width="957" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI_HJZsP6UoexzKLtm-8imTZwi59is0moRwFUN9uV5DFrCT7nt-6Tn9L2QYNbXO0eVwlUPW9qxusL_Qw1kK6hAmyQZnVHq_slwvSbUaq7NOpfdMhcezd7v2RqHM2R2mqPTFNvb/s400/LC+Chapter+6-17.png" width="400" /></a></div>
Before we leave the menus, click on the top line "MENUBAR" and change the font to "Segoe UI"<br />
Press the green "Save and Close" button to close the <b>Menu Editor</b>.<br />
Press the green "Save and Close" button to close the <b>Window Designer</b>.<br />
Press the green "Save and Close" button to close the <b>Procedure Properties</b> dialog.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi461xSmYGlP0tIyDjZpq5Jdp1eyeYTaMYbWOKOV2RH_KKXaeclB5s5lpdOIwqwA0YMVPfeTGsaGAUwKd0KT8D7ernM-EoUOpU-Sf0TILQamziTpGfyy6BcEWEEckRS6CQdq4MO/s957/LC+Chapter+6-18.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="508" data-original-width="957" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi461xSmYGlP0tIyDjZpq5Jdp1eyeYTaMYbWOKOV2RH_KKXaeclB5s5lpdOIwqwA0YMVPfeTGsaGAUwKd0KT8D7ernM-EoUOpU-Sf0TILQamziTpGfyy6BcEWEEckRS6CQdq4MO/s400/LC+Chapter+6-18.png" width="400" /></a></div>
This returns you to the <b>Application Tree</b> dialog. There are now three new procedures marked as "(ToDo)": "BrowseCustomers", "BrowseOrders", and "SplashScreen". These were the procedures you named in the Menu Editor. Choose "Save" from the "File" menu, or press the "<b>Save</b>" button on the toolbar.<br />
<br />
<h2>Creating the SplashScreen Procedure</h2>
We named a Splash procedure, and now we’ll create it.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2G1ZTjMBgtHIgkwZ3M0rJuh1LUQGGK9vWaKc8ocVCESWsmQ2yjln0eV2Z-gfBHZ7L69ThR4aVsvBJJF8SJ0XxS-gfvWnSG1RxPyhU8qgwiyuY196vEk_Fb3VbW_SGGywI64br/s962/LC+Chapter+6-19.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="514" data-original-width="962" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2G1ZTjMBgtHIgkwZ3M0rJuh1LUQGGK9vWaKc8ocVCESWsmQ2yjln0eV2Z-gfBHZ7L69ThR4aVsvBJJF8SJ0XxS-gfvWnSG1RxPyhU8qgwiyuY196vEk_Fb3VbW_SGGywI64br/s400/LC+Chapter+6-19.png" width="400" /></a></div>
Select the "SplashScreen" procedure, click on the "Properties" button, go to the "Defaults" tab, choose the "Default Splash Window" template. Click on "Select".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL1rTA4UkCplZOsfCOKaNSexOpnYgES83nw3AoaiDSnQ2ztE9fGZWxiTN-BSnaRxRHB458pnLHfDeixy1-fIcwse33vbvDi32l04e2q_XhNChMiEyok91rkGf7hBBWqI-gA3vO/s960/LC+Chapter+6-20.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL1rTA4UkCplZOsfCOKaNSexOpnYgES83nw3AoaiDSnQ2ztE9fGZWxiTN-BSnaRxRHB458pnLHfDeixy1-fIcwse33vbvDi32l04e2q_XhNChMiEyok91rkGf7hBBWqI-gA3vO/s400/LC+Chapter+6-20.png" width="400" /></a></div>
We will use all the defaults for now. Just type in "Startup Splash Screen" in the "Description" field. If you are like me and want to fiddle with the fonts and layout, click on the "Window" button. Use the green "Save and Exit" buttons to return to the Application Tree. <b>Save</b> your work.<br />
<br />
<h2>Adding an Application Toolbar and Toolbar Controls</h2>
Now we return to the Main procedure to add in an application toolbar below the menu.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiytgpjIth4k8ms8lszw1kAAwgIWoWlf0rRDivkolUu2hkIsp83KfZpm3fSPKHaMQuwtHvzNhM8XiSKEylr_agQQ9Zck_P262AGkAnPEsG0OMmW-25tsyR5npop1KSDDjIvFh6N/s960/LC+Chapter+6-21.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="507" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiytgpjIth4k8ms8lszw1kAAwgIWoWlf0rRDivkolUu2hkIsp83KfZpm3fSPKHaMQuwtHvzNhM8XiSKEylr_agQQ9Zck_P262AGkAnPEsG0OMmW-25tsyR5npop1KSDDjIvFh6N/s400/LC+Chapter+6-21.png" width="400" /></a></div>
Click on the "Main" procedure, and then on the "Window" button to the right. This opens the Window Designer directly.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLf73S0wMszi9fwYdpNBxK8s48dKVSesuPNODYMJYM0FWMCrbDXbgwY8gnhqf2iq7H-6cdNCuallSY80FeONISZRgn-c-pJtWJnuoZ1I7H6dUbZK7QM7RpVCF93ctOvuZR9p6P/s1007/LC+Chapter+6-22.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLf73S0wMszi9fwYdpNBxK8s48dKVSesuPNODYMJYM0FWMCrbDXbgwY8gnhqf2iq7H-6cdNCuallSY80FeONISZRgn-c-pJtWJnuoZ1I7H6dUbZK7QM7RpVCF93ctOvuZR9p6P/s400/LC+Chapter+6-22.png" width="400" /></a></div>
For some inexplicable reason, every time I open the Window Designer, the "Control Templates" pad blocks part of the screen. The quickest way to remedy this is to click on the "Properties" pad on the right. See the red arrow above.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtWsX72w08nhM6Nm7QbTkwxjhn9yENLR2y4IqZ8FnjoJ52KpCMRuMOXcMzWvGSS75bIN4JUiVQXg0p-gTgR09tlMA-6HS-XhNDnisfsYNGokJ7SMV3GPFHx31B1wl9EGrhcmjW/s1010/LC+Chapter+6-23.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1010" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtWsX72w08nhM6Nm7QbTkwxjhn9yENLR2y4IqZ8FnjoJ52KpCMRuMOXcMzWvGSS75bIN4JUiVQXg0p-gTgR09tlMA-6HS-XhNDnisfsYNGokJ7SMV3GPFHx31B1wl9EGrhcmjW/s400/LC+Chapter+6-23.png" width="400" /></a></div>
Open the "Toolbox" pad, and use the "pin" button to pin it in place on the left. This will move the window over to the right, so you can see it properly.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk87I_KJw8wKjQG1EcEya5C8eDhaEX6v2lf8enjoFXdLcWvYTzRfDL8MU2kdEcuXTy4UgSuvoTZLVTC0h9lXn_8karmcuBoQGou4JVnKdzBpQh6kCsE1DOPJo_PehBvS86QstE/s1006/LC+Chapter+6-24.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk87I_KJw8wKjQG1EcEya5C8eDhaEX6v2lf8enjoFXdLcWvYTzRfDL8MU2kdEcuXTy4UgSuvoTZLVTC0h9lXn_8karmcuBoQGou4JVnKdzBpQh6kCsE1DOPJo_PehBvS86QstE/s400/LC+Chapter+6-24.png" width="400" /></a></div>
Scroll down and drag the "TOOLBAR" control onto the frame, and let go just underneath the menu bar. This will put the toolbar control in place. Next, we need buttons on the toolbar.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioYgqtDOY7e6-gQHxWNQrZ0dPOPEC59MZ0U-3p7BSZ3ZBvmSfQtb_W48LJdFj5Ix-i4kfmjU-HXKYChjMUKQgTI7N_L-s_H_90Mn6fjIRqZRXpSEGlmhyphenhyphenVrrwwRE0d0MKETqSr/s1010/LC+Chapter+6-25.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="558" data-original-width="1010" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioYgqtDOY7e6-gQHxWNQrZ0dPOPEC59MZ0U-3p7BSZ3ZBvmSfQtb_W48LJdFj5Ix-i4kfmjU-HXKYChjMUKQgTI7N_L-s_H_90Mn6fjIRqZRXpSEGlmhyphenhyphenVrrwwRE0d0MKETqSr/s400/LC+Chapter+6-25.png" width="400" /></a></div>
Scroll up the list of Clarion Window Controls to find the "BUTTON" control. Drag and drop a button onto the toolbar control, as shown. Move the button to the left of the toolbar, just below the "File" menu. Also, adjust the height of the toolbar, so the button fits nicely.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0slf18UKMzrHRW9iY3mJVKhdfNyseE387zuhh78jV3-irLXBq6YOfVNtOdXcNAmOyUqBtuk7AZsT4I6ZtsKOxZ689hgFRr_sJCSVdgpMIa69fuhSt9TNeMFMjjmNIs-U7w89m/s1009/LC+Chapter+6-26.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="547" data-original-width="1009" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0slf18UKMzrHRW9iY3mJVKhdfNyseE387zuhh78jV3-irLXBq6YOfVNtOdXcNAmOyUqBtuk7AZsT4I6ZtsKOxZ689hgFRr_sJCSVdgpMIa69fuhSt9TNeMFMjjmNIs-U7w89m/s400/LC+Chapter+6-26.png" width="400" /></a></div>
Press F4 to display the button properties. Use the delete or backspace buttons to remove "Button1" in the "Text" property field. Do not use the spacebar to replace the text with a space. There should be no text at all. Change the "Use" property to "?CustomerButton".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDQz8JfKl6tsGbKZrNAJi3x9UOoz7dBVTpXi_FGxrLOJYico4ReXhyJFBsbebiGM57mBvyc0GDypygoZhE0fbeJwtYo7UMChPOKZ_P486BwPVTPJzcTfwDyikn_2K8YoXFLXgb/s787/LC+Chapter+6-27.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="536" data-original-width="787" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDQz8JfKl6tsGbKZrNAJi3x9UOoz7dBVTpXi_FGxrLOJYico4ReXhyJFBsbebiGM57mBvyc0GDypygoZhE0fbeJwtYo7UMChPOKZ_P486BwPVTPJzcTfwDyikn_2K8YoXFLXgb/s400/LC+Chapter+6-27.png" width="400" /></a></div>
Find the "Icon" property and from the drop-down list click on "Choose File ...". The Select Icon File dialog appears. Select "GIF Files" from the Files of type drop-down list. Select the "CUSTOMER.GIF" file, and click on "Open".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL4w_To9RursrOR8iJbpnXL9XsObgUo7TqMaCIWjXRHFh4T3sTTkApbX0nY6acUWgkFAPB7GIh35Ta1g0UnAwaVYed71OSRkPCDuoYfn7zKSG0AqccWHhL15wxjilXrXJuLd5z/s769/LC+Chapter+6-28.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="534" data-original-width="769" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjL4w_To9RursrOR8iJbpnXL9XsObgUo7TqMaCIWjXRHFh4T3sTTkApbX0nY6acUWgkFAPB7GIh35Ta1g0UnAwaVYed71OSRkPCDuoYfn7zKSG0AqccWHhL15wxjilXrXJuLd5z/s400/LC+Chapter+6-28.png" width="400" /></a></div>
Scroll down to find the "Tip" property and type in "Browse Customers". This adds a tool tip to the button that will display whenever the mouse cursor hovers over the button. Find the "Flat" property and toggle it to "True".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7yZCUCkKeqU7ZvSUxdvPxchQeiS6MOpx12qL7fcb8fdlnxcChVyg61wgX_p4GeACdH_g8_8vB4MOt6j0NNeIJqE7JCjzbixnM7cMh0ckShcnShH99qhxiu98nGIR_bJTI4pr/s502/LC+Chapter+6-29.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="502" data-original-width="248" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhc7yZCUCkKeqU7ZvSUxdvPxchQeiS6MOpx12qL7fcb8fdlnxcChVyg61wgX_p4GeACdH_g8_8vB4MOt6j0NNeIJqE7JCjzbixnM7cMh0ckShcnShH99qhxiu98nGIR_bJTI4pr/s400/LC+Chapter+6-29.png" /></a></div>
Scroll down to the "AT" property and expand it. Remove the check mark from the Height and Width's "Default" property. Next, set the "Value" property of the height to 14, and for the width set the "Value" property to 16.<br />
At the bottom of the "Properties" pad, click on the "Actions ..." link.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhql_-RZYD0oiMJIYo7-wzTJS_jHlQW-tXac4Jz-Rt47g9ycCnph1DqOD4aT0KddkNR8pRet0jud69P9RaM-NsTF4qXx6e4IrGBvr1xR11yRJyGtoBDL9xg2mS-TbQWqQNhGg8O/s830/LC+Chapter+6-30.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="344" data-original-width="830" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhql_-RZYD0oiMJIYo7-wzTJS_jHlQW-tXac4Jz-Rt47g9ycCnph1DqOD4aT0KddkNR8pRet0jud69P9RaM-NsTF4qXx6e4IrGBvr1xR11yRJyGtoBDL9xg2mS-TbQWqQNhGg8O/s400/LC+Chapter+6-30.png" width="400" /></a></div>
For the "When pressed" action, select "Run a Procedure". Choose "BrowseCustomers" from the drop-down list. This is the procedure name you typed for the "Browse" menu "Customers" menu item. Pressing the button will call the same procedure. Often, a command button on a toolbar serves as a quick way to execute a menu command. Remember to enable "Initiate Thread" as before. Click "OK".<br />
<br />
<h2>The second button</h2>
One way of adding a button is by drag and drop, which we did with the first button.<nr>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0-uMtuyKhLmQMJTeboed2CnIeu4AbiTmbLK61NVt_ypjzVRrwSf45d8CGgTojeG_n9MDXFUNgdgzrK5ZcGTyXW4aJvOLkHgJpoFLZ9H8rG1wrtIhlc4BYew8UU-Y5Be4LCI_/s1006/LC+Chapter+6-31.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq0-uMtuyKhLmQMJTeboed2CnIeu4AbiTmbLK61NVt_ypjzVRrwSf45d8CGgTojeG_n9MDXFUNgdgzrK5ZcGTyXW4aJvOLkHgJpoFLZ9H8rG1wrtIhlc4BYew8UU-Y5Be4LCI_/s400/LC+Chapter+6-31.png" width="400" /></a></div>
Another way is just click-and-click: click on the button control in the toolbox, and then click on the toolbar where you want the button to appear. Notice that the toolbar control is de-selected once you have created the button, to prevent another control being created when you click somewhere else. Move the button into place next to the Customer button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNdSzVQOtPl-PFEqGwK-GYckge54r2vc5gc8UjpyV_ilr7e0DjbwG1k7xQVn-JmJdrQyVG0id4eLgFvXHlgIYWHw_iS1d5wEX_jvWA05unx8kloI04icyqIGCeGPVqQ8R88weg/s1011/LC+Chapter+6-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1011" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNdSzVQOtPl-PFEqGwK-GYckge54r2vc5gc8UjpyV_ilr7e0DjbwG1k7xQVn-JmJdrQyVG0id4eLgFvXHlgIYWHw_iS1d5wEX_jvWA05unx8kloI04icyqIGCeGPVqQ8R88weg/s400/LC+Chapter+6-32.png" width="400" /></a></div>
Press F4 to display the button properties. Use the delete or backspace buttons to remove "Button2" in the "Text" property field. Do not use the spacebar to replace the text with a space. Change the "Use" property to "?ProductButton".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIOmRnWDvSmp0G9P8own6JuIHLZEiX31Ui88baHpNJaOaix__4XJ1qR-Gtr-UB12Oslbfk8HARuJ2hJ5DHDW9ccNW6FsuvaRiKykuFgKNnUOKmxX0FxB0YYH7i_D7kW58i2C0/s1011/LC+Chapter+6-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1011" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIOmRnWDvSmp0G9P8own6JuIHLZEiX31Ui88baHpNJaOaix__4XJ1qR-Gtr-UB12Oslbfk8HARuJ2hJ5DHDW9ccNW6FsuvaRiKykuFgKNnUOKmxX0FxB0YYH7i_D7kW58i2C0/s400/LC+Chapter+6-32.png" width="400" /></a></div>
Find the "Icon" property and from the drop-down list click on "Choose File ...". The Select Icon File dialog appears. Open the "PRODUCTS.GIF" file. Find the "Tip" property and type in "Browse Products". Toggle the "Flat" property to "True".
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Normally, you attach an action to the button at this point. Skip this step for now, for this button only. Later, we’ll copy a procedure, then call it at the point in the generated source code which handles what to do when the end user presses the button to demonstrate using <i>embed points</i>.<br />
<br />
<h2>The third button</h2>
Drag and drop a button control onto the toolbar control.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuR48mXzWplMGQLKthlVrQ9v8f4EeB3f2WQPM35TjIALUSTxJYhI23cQFS_KDj3pIVSbYuGuLdZoabdbGoBcfrn_f9Y7KA2MOrYiM64oIy36E10TQYxqdqoEBhENLQ8IR4og-U/s1007/LC+Chapter+6-33.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="655" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuR48mXzWplMGQLKthlVrQ9v8f4EeB3f2WQPM35TjIALUSTxJYhI23cQFS_KDj3pIVSbYuGuLdZoabdbGoBcfrn_f9Y7KA2MOrYiM64oIy36E10TQYxqdqoEBhENLQ8IR4og-U/s400/LC+Chapter+6-33.png" width="400" /></a></div>
Press F4 to display the button properties. Use the delete or backspace buttons to remove "Button3" in the "Text" property field.<br />
Change the "Use" property to "?OrderButton".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIOmRnWDvSmp0G9P8own6JuIHLZEiX31Ui88baHpNJaOaix__4XJ1qR-Gtr-UB12Oslbfk8HARuJ2hJ5DHDW9ccNW6FsuvaRiKykuFgKNnUOKmxX0FxB0YYH7i_D7kW58i2C0/s1011/LC+Chapter+6-32.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1011" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfIOmRnWDvSmp0G9P8own6JuIHLZEiX31Ui88baHpNJaOaix__4XJ1qR-Gtr-UB12Oslbfk8HARuJ2hJ5DHDW9ccNW6FsuvaRiKykuFgKNnUOKmxX0FxB0YYH7i_D7kW58i2C0/s400/LC+Chapter+6-32.png" width="400" /></a></div>
Find the "Icon" property and from the drop-down list click on "Choose File ...". The Select Icon File dialog appears. Open the "ORDERS.GIF" file. Find the "Tip" property and type in "Browse Orders". Toggle the "Flat" property to "True". Click on the "Actions ..." link.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWj6cjknN9u47ZwBMDeoobhrxCs2fi1_F9fhcBAgc2ydTYed1UadRHfbXm89xMeiNGMUK4X2N3vwbpYV5GWpvvpEGfZtGS6r98q1GYnrgkjfxVTpctw99ywTnhzVAiDxogEZAz/s831/LC+Chapter+6-34.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="347" data-original-width="831" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWj6cjknN9u47ZwBMDeoobhrxCs2fi1_F9fhcBAgc2ydTYed1UadRHfbXm89xMeiNGMUK4X2N3vwbpYV5GWpvvpEGfZtGS6r98q1GYnrgkjfxVTpctw99ywTnhzVAiDxogEZAz/s400/LC+Chapter+6-34.png" width="400" /></a></div>
For the "When pressed" action, select "Run a Procedure". Choose "BrowseOrders" from the drop-down list. Remember to enable "Initiate Thread" as before. Click "OK".<br />
<br />
<h2>Position and align the buttons</h2>
The Window Designer has a set of alignment tools that easily allow you to line up and resize your window controls.<br />
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />With the "Orders" button still selected, Ctrl-Click on the "Customers" button. This gives both buttons "handles". With both buttons still selected, Ctrl-Click on the "Products" button.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /><b>Ctrl-Click</b> is the "multi-select" action that allows you to perform actions on several controls at once. Once multiple controls are selected, you can move them all by dragging on any one of the selected controls, or you can use any of the Alignment menu’s tools on the entire group.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiREzyX6W01QzK-IOLR1rD3TDAM0E_-boW6NwKiES-LXEEho5L5BcFPdePf3i3Qzt69lVtGOkzP-yEh1wO61_H6Sgf8hjMJL6NKDsIP-oF4uIVwjtIyAAB0VjIm4nT09AREvwjY/s766/LC+Chapter+6-35.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="535" data-original-width="766" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiREzyX6W01QzK-IOLR1rD3TDAM0E_-boW6NwKiES-LXEEho5L5BcFPdePf3i3Qzt69lVtGOkzP-yEh1wO61_H6Sgf8hjMJL6NKDsIP-oF4uIVwjtIyAAB0VjIm4nT09AREvwjY/s400/LC+Chapter+6-35.png" width="400" /></a></div>
Now all three buttons have "handles", and the "Orders" button has the <i>white handles</i> that indicate it has focus and is the "key control" for the alignment actions. Click on the "Align Tops" button on the toolbar above, as shown. Notice how all the buttons have the same top position as the key control. Drag the group up to the top of the toolbar control, so they fit under the menu bar.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5zRmSEAkZ3QM5nfuMX05ERthA5TdJHG7exiENyCaHWoDYT9uSF8oXxb_xopFqwe10IxT7fbWzFC3t7dSzUycVFGmC6-G3PnFaGdOplRdObWB1KgnOX9-mP3EUh4U-fCr6VmK/s766/LC+Chapter+6-36.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="532" data-original-width="766" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj5zRmSEAkZ3QM5nfuMX05ERthA5TdJHG7exiENyCaHWoDYT9uSF8oXxb_xopFqwe10IxT7fbWzFC3t7dSzUycVFGmC6-G3PnFaGdOplRdObWB1KgnOX9-mP3EUh4U-fCr6VmK/s400/LC+Chapter+6-36.png" width="400" /></a></div>
Click on the "Spread Horizontally" button to space the buttons evenly. Another way to do this is to right-click on the group, select "Format", "Horizontal Spacing", "Make Equal".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyrUVV67UhHOtBW1TtKSJgLAXdyWt_csvKJuLyT0HGikVpZesyU3C3ne8L1O3l268tlOngM_BjT0ofz47LIIql0HZuS0xO8kox8P_MeTHokGEwPEJuclCOdxKAUsr0j49UWZrD/s766/LC+Chapter+6-37.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="536" data-original-width="766" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyrUVV67UhHOtBW1TtKSJgLAXdyWt_csvKJuLyT0HGikVpZesyU3C3ne8L1O3l268tlOngM_BjT0ofz47LIIql0HZuS0xO8kox8P_MeTHokGEwPEJuclCOdxKAUsr0j49UWZrD/s400/LC+Chapter+6-37.png" width="400" /></a></div>
If the buttons are too far apart, use "Format", "Horizontal Spacing", "Decrease" to move them closer together. Make sure they don't overlap! We need more space to the right for what is coming next.<br />
<br />
<h2>Add the Frame Browse Control buttons</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1yOBKfniXbcXrSTso6H4_JbHkhJG01LkLqJbwAbgoV95Deq-Bh1E2CBU7fzrSmPMkixMdeYp8UcJWrADmaEiHAez3ej-IiXe3pxBH9OGhFmMjFzqlVcXOyI8GEGj5OGjukzEA/s1008/LC+Chapter+6-38.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1yOBKfniXbcXrSTso6H4_JbHkhJG01LkLqJbwAbgoV95Deq-Bh1E2CBU7fzrSmPMkixMdeYp8UcJWrADmaEiHAez3ej-IiXe3pxBH9OGhFmMjFzqlVcXOyI8GEGj5OGjukzEA/s400/LC+Chapter+6-38.png" width="400" /></a></div>
At the bottom left of the screen, click on "Control Templates". Then click on the toolbar control to make sure it is selected. Choose the "FrameBrowseControl" template, then drag and drop just to the right of the 3rd toolbar button.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSndZlO-fjVG-PdqeQLi0tXOUisplYheA9GYm7q76Xxi7nq8jFeXueES5Mw7gZujJjtEH56fSMBk1m5RFazc9W23hnhmeyQ2AWIMx9XMoei9zIeYG0j5z0Yd57AlNzKiNEK31S/s1007/LC+Chapter+6-39.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="651" data-original-width="1007" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSndZlO-fjVG-PdqeQLi0tXOUisplYheA9GYm7q76Xxi7nq8jFeXueES5Mw7gZujJjtEH56fSMBk1m5RFazc9W23hnhmeyQ2AWIMx9XMoei9zIeYG0j5z0Yd57AlNzKiNEK31S/s400/LC+Chapter+6-39.png" width="400" /></a></div>
Move the buttons into position so they are neatly placed.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqE6-AlLNAw-xSo5eq0a5yieXPbX3ydcsExAtLTGUks0mU1sgexCdgL1i6N5w5RtUu2FH9MqWaGV5aN2r4OEwLUCU8lkWZhHQjP0XrO2f6MFPwzxwOWF9iUgup8-XBe85UgVfi/s1009/LC+Chapter+6-40.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="652" data-original-width="1009" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqE6-AlLNAw-xSo5eq0a5yieXPbX3ydcsExAtLTGUks0mU1sgexCdgL1i6N5w5RtUu2FH9MqWaGV5aN2r4OEwLUCU8lkWZhHQjP0XrO2f6MFPwzxwOWF9iUgup8-XBe85UgVfi/s400/LC+Chapter+6-40.png" width="400" /></a></div>
Select the toolbar control again, and change the AT Height value to 20 so all the controls are neatly positioned on the toolbar. Click on the green "Save and Close" button to save your work.<br />
<br />
<h2>Testing an Application under Development</h2>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiryjvPMlGRHeWsKbNFXqxJpTfM31ExYngTVzOdb8ifShVnghXfXOiaavFtKWtfT1UFoQPTr8LN-NUAGxurHHveHhpTdlpnhC_BYBNFxqtgqKxzLa-DbQVjC7gCunyODF7EUJ-a/s1008/LC+Chapter+6-41.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiryjvPMlGRHeWsKbNFXqxJpTfM31ExYngTVzOdb8ifShVnghXfXOiaavFtKWtfT1UFoQPTr8LN-NUAGxurHHveHhpTdlpnhC_BYBNFxqtgqKxzLa-DbQVjC7gCunyODF7EUJ-a/s400/LC+Chapter+6-41.png" width="400" /></a></div>
Before you test your application, always save your work. Click on the "Save" button. Then click on the "Start Without Debugger" button to <b>Generate Source</b>, <b>Build</b> and <b>Run</b> your application.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The Application Generator generates the source code, displaying its progress in a message window, procedure by procedure. Next, the Output window appears, showing you the progress of the build as the compiler and linker do their work. Then your Application window appears.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw1TQHtZ1sgy7EGqkWT4G7HXDmrqoE2YwUM5kPsFAVn_IB-_6pveAQPNJxxmIzf0GuQmqyFNc3453oo5-nGSWI2NO6GszZfngjoD7Gud6C-634LdCMcM-QKoiFh5DsDw363AhD/s627/LC+Chapter+6-42.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="460" data-original-width="627" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjw1TQHtZ1sgy7EGqkWT4G7HXDmrqoE2YwUM5kPsFAVn_IB-_6pveAQPNJxxmIzf0GuQmqyFNc3453oo5-nGSWI2NO6GszZfngjoD7Gud6C-634LdCMcM-QKoiFh5DsDw363AhD/s400/LC+Chapter+6-42.png" width="400" /></a></div>
Press one of the buttons on the toolbar, or choose one of the items on the Browse menu. A message box appears that says, "The Procedure (procedure name) has not been defined".
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />This capability allows you to incrementally test your application, whether you have designed all the procedures or not. You’ll fill in their functionality, starting in the next lesson (Creating a Browse).
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Press the OK button to close the message box. Choose "Exit" from the "File" menu to close the LCLesson application.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />Throughout the rest of this lesson, feel free to Make and Run the developing application whenever the lesson instructs you to save the file.<br />
<br />
<h2>Look at the Generated Source Code</h2>
Let’s take a quick look at what the <i>Application Generator</i> has done for you. The whole purpose of the Application Generator (and its Templates) is to write <i>Clarion</i> language source code for you. There is no "magic" to what the <i>Clarion</i> tool set does to create applications; it all goes back to the <i>Clarion</i> programming language.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx7f15ofg4mvELzPyJpOdl_god7lOp85KPckk-VTjoucHwApKTXtqVLvBQ1JnG_XbDr-YgcNdAFKEDL5W5uJTKpr5ZYTYIE2TzabGPXGqTqaLevMxt4UhAb2868-vnD5JfaHIj/s765/LC+Chapter+6-43.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="511" data-original-width="765" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjx7f15ofg4mvELzPyJpOdl_god7lOp85KPckk-VTjoucHwApKTXtqVLvBQ1JnG_XbDr-YgcNdAFKEDL5W5uJTKpr5ZYTYIE2TzabGPXGqTqaLevMxt4UhAb2868-vnD5JfaHIj/s400/LC+Chapter+6-43.png" width="400" /></a></div>
With the Application Tree dialog open, change the "Tree Mode" drop list to "Module". This changes your view of the application from the logical procedure call tree to the actual source code modules generated for the application.<br />
Highlight the "LCLesson.CLW" module, right-click to display the popup menu, then select "Module Source File".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUsM-DNWpQZEHbE26HmdTG0MUxJtqG4gb9_hl8Tm-ir8ySXH0Axzdt9nQLRoItE3CC1xNtkKC6ZrW7XahH7ci25u7sS23MYyM03K5uQ17L9cudqRoxGnQ6FfVVsL69N3_Xw2Th/s1010/LC+Chapter+6-44.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="651" data-original-width="1010" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUsM-DNWpQZEHbE26HmdTG0MUxJtqG4gb9_hl8Tm-ir8ySXH0Axzdt9nQLRoItE3CC1xNtkKC6ZrW7XahH7ci25u7sS23MYyM03K5uQ17L9cudqRoxGnQ6FfVVsL69N3_Xw2Th/s400/LC+Chapter+6-44.png" width="400" /></a></div>
This takes you right into the Text Editor, looking at the last source code you generated (the last time you pressed the Run button). <i>Any changes you made</i> since the last time you generated code will not be visible here.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />The "LCLesson.CLW" file is the main program module for this application, containing the Global data declarations and code. Don’t be intimidated looking at all this code, we will discuss Clarion Language code in a subsequent lesson.<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mq5IGwI_2Qv71ZHyS6I4n7AHs2WWjmRi4KFJxOntweEifUv5L8uTrBcCRzEWxlGN_KPRtOhpYBGg7HZkhd7g9oJ1zdmSfzVddMWurpaNe4w2hWK3P6LCdiidu4BzSMBoLVw4/s1011/LC+Chapter+6-45.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="653" data-original-width="1011" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-mq5IGwI_2Qv71ZHyS6I4n7AHs2WWjmRi4KFJxOntweEifUv5L8uTrBcCRzEWxlGN_KPRtOhpYBGg7HZkhd7g9oJ1zdmSfzVddMWurpaNe4w2hWK3P6LCdiidu4BzSMBoLVw4/s400/LC+Chapter+6-45.png" width="400" /></a></div>
When you have finished looking at the code, go to the "File" menu, choose "Close", "File" to exit the Text Editor and return to the Application Generator (You can also simply press the Close button "x" in the source window).<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj28_xZNPdDNz29o4pYBm0BZ59ifUpVelYP-jOzhO9wGUnYSZU0koZs1CtUJtbvEKzDfO1xBIHkM8LYmf1rTq3V9bsYCvXKrDBOoSCn-BYRXFDzp3iqrr18r0MeGlTb489umS3e/s1008/LC+Chapter+6-46.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="650" data-original-width="1008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj28_xZNPdDNz29o4pYBm0BZ59ifUpVelYP-jOzhO9wGUnYSZU0koZs1CtUJtbvEKzDfO1xBIHkM8LYmf1rTq3V9bsYCvXKrDBOoSCn-BYRXFDzp3iqrr18r0MeGlTb489umS3e/s400/LC+Chapter+6-46.png" width="400" /></a></div>
With the Application Tree dialog open, change the "Tree Mode" drop list back to "Procedure". Right-click on the "Main (Frame)" procedure and select "Module Source File".<br />
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKhMrr0rqymAUpYL82anGkDRnaPX0hQwAJdEXXkGVYoeNBMOfsJbPrwTDt2KIUxD4OEGVsk7SxTF1gXMzas7sE1xG70f5KqXeGjzmWbR5qWj6BQPzJu5BrWoyzDIMXB7CvgsYQ/s960/LC+Chapter+6-47.png" style="display: block; padding: 1em 0px; text-align: center;"><img alt="" border="0" data-original-height="510" data-original-width="960" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKhMrr0rqymAUpYL82anGkDRnaPX0hQwAJdEXXkGVYoeNBMOfsJbPrwTDt2KIUxD4OEGVsk7SxTF1gXMzas7sE1xG70f5KqXeGjzmWbR5qWj6BQPzJu5BrWoyzDIMXB7CvgsYQ/s400/LC+Chapter+6-47.png" width="400" /></a></div>
This takes you into the Text Editor again, looking at the last source code you generated for the Main procedure. Again,<i> any changes you made</i> since the last time you generated code will not show up in this code.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />You may have noticed that right below the "Module Source File" selection was another called "Embeditor Source". Do not confuse these two, they do very different things. We will demonstrate the Embeditor Source selection later in the lessons.
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" />If you do make any changes to this code, you actually can compile and run the program to see what effect the changes make, however, your changes will be lost the next time you generate source code. Therefore, it is not a good idea to make any changes here. Close the source window. Save your work.<br /><b>Make a <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html" target="_blank">backup</a> of your work</b>.<br />
<br />
<h2>OK, What Did I Just Do?</h2>
Here’s a quick recap of what you just accomplished:<ul>
<li>You created a new .APP file, without using a wizard.</li>
<li>You created an application Frame procedure, without using a wizard.</li>
<li> You created a menu in your application frame.</li>
<li>You created a splash screen procedure for your application.</li>
<li>You created a toolbar under your application’s main menu and placed iconized, flat buttons on it.</li>
<li>You used <i>Clarion</i>’s resize and alignment tools to adjust your screen design.</li>
<li>You used a Control Template to populate your toolbar with a set of standard navigation buttons.</li>
<li>You compiled and ran your work-in-progress to test its functionality.</li></ul>
In the next lesson, we’ll add a Browse procedure to the application.<br />
<br /><br />
<div align="center">[ <a href="https://donnedwards.openaccess.co.za/2021/07/learning-clarion-part-7.html">Learning Clarion (Part 7)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-6.html">Learning Clarion (Part 6)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/02/learning-clarion-part-5.html">Learning Clarion (Part 5)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/12/learning-clarion-part-4.html">Learning Clarion (Part 4)</a> ]<br />
[ Learning Clarion (Part 3) ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-2.html">Learning Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/11/learning-clarion-part-1.html">Learning Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2021/04/backing-up-your-clarion-projects.html">Backing up your Clarion projects</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-2.html">Getting Started with Clarion (Part 2)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/10/getting-started-with-clarion-part-1.html">Getting Started with Clarion (Part 1)</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/introduction-to-clarion-11.html">Introduction to Clarion 11</a> ]<br />
[ <a href="https://donnedwards.openaccess.co.za/2020/09/installing-clarion-11-on-windows-10.html">Installing Clarion 11 on Windows 10</a> ]<br /></div>
<br /><img border="0" height="1" hspace="10" src="https://www.mustang.co.za/img/dot.gif" width="1" /></nr>Donn Edwardshttp://www.blogger.com/profile/07954994300802439618noreply@blogger.com0