Code-Signing Your Own Exes/DLLs in SetupBuilder

In a discussion on the Skype Clarion channel just now, Wolfgang asked me to post how to Code-Sign your own Exes/DLLs in SetupBuilder.

Saddle up.

1. I’ve got my Certificate information in the “General Information” window.

codesign001 

Now I just want to sign my own files. Of which there are two. An EXE and a DLL.

2. So I go to the Script Editor.

codesign002 

3. Just above the “Features” line, get a couple of blank lines going on.

codesign003

I haven’t experimented past “just get it working”, so there are probably a bunch of different places you could do this.

4. Make sure the line is selected.

codesign004

5. Double-click on the “#embed Vista manifest…” Compiler Directive Script Function in the top right-hand corner of SB.

codesign005

6. As follows after the image:

codesign006 

(a) Add your filename.

(b) Fill out the Name and Description.

(c) Check these two.

7. Double-click on the “#code-sign application” Compiler Directive Script Function in the top right-hand corner of SB.

codesign007

8. As follows after the image:

 codesign008

(a) Add your filename.

(b) Put in a Description

(c) These should be defaulted, if you’ve got the same as me in 1.

(d) Definitely stick this in :)

(e) Check these two.

9. Compile

And there you have it. That’s all I did to get this working.

When you compile, the little “password” appear. SB will fill in the password if you’ve entered it. See (d) directly above.

Hope this has been helpful for Folk.

Stu’s Greatest Hits (Tools)

I make no excuses for this list. These are the tools that I use every day. They are what I consider to be important for development.

That doesn’t mean I won’t change though, or be persuaded otherwise. I’m always hearing of other tools that sound great. Sometimes it’s a monetary restriction. Other times it’s a busy factor. Hopefully I’ll get to most of them.

Information Tools

Product Tools

Honorable Mention Tools

Information Tools

The Newsgroups (news.softvelocity.com)[Back To Listing]

The Newsgroups provide the largest amount of information relating to Clarion (that I know of).

You get answers to questions. You have the questions themselves. The 3rd-Party newsgroup is a most excellent source of specific product questions.

You get information regarding the Clarion Community across the world; What is happening in various countries; The meetings, gatherings, beer swilling.

You get people at their best, and at their worst.

The one true issue I have with the newsgroups is their inability to provide me with accurate and complete searching capabilities. The Google Groups version of comp.lang.clarion goes some of the way, but (as far as i know) it’s not an up-to-date mirror of the actual newsgroup. And that doesn’t account for any of the other individual newsgroups.

Clarion Mag (http://www.clarionmag.com)[Back To Listing]

Clarion Mag really does stomp all over the Newsgroups in a couple of key areas. Much better contextual searching; and it’s got a great Editor (Dave Harms).

Clarion Mag’s range of articles is large. They are written well, edited (as mentioned) well, and the presentation of the site is clean and simple.

Subscription may frighten some people off. Don’t let it. The benefit massively outweighs the paltry fee (less than two hundred big boys). You have a huge contextual well-written repository of information .. that’s peace of mind for problem-solving.

ClarionShop (http://www.clarionshop.com)[Back To Listing]

I know, bad data mapping huh. ClarionShop isn’t really an "Information" site.

ClarionShop is the best place to buy 3rd-Party Templates and Software.

The folks there are friendly and the service is top-notch.

NetTalk Central (http://www.nettalkcentral.com)[Back To Listing]

This site (it’s forums are the main attraction) has quickly become one of the busiest in the Clarion Community.

For anything NetTalk, particularly the Web Server, head on over. I’d say even to prefer it over the 3rd-Party Newsgroup for help, advice and knowledge. Bruce visits often, and there are more and more wise heads logging in.

Product Tools

File Manager 3 (http://www.capesoft.com/accessories/fm3sp.htm)[Back To Listing]

This is, without a doubt, the greatest 3rd-Party Template in existence for Clarion. And I’d suit it up against the development world at large too.

File Manager 3 is a Template from Capesoft. You buy it and you install it.

What it does is give you the freedom to change your File Structures with wild abandon, and not have to worry about writing your own conversion functionality.

Plug it in. Increment the Version. Compile. Nothing Simpler.

Clarion Desktop (http://www.clariondesktop.com)[Back To Listing]

I’ve gushed about Clarion Desktop before (here). You cannot put a price on making the 3rd Party product upgrade process easy. But I will. $3 a month. That’s right! Gary charges you 3 big boys a month, and what you get in return will save so much time.

Let’s be clear on the reason for Clarion Desktop making this list.

I don’t have to manually upgrade my 3rd Party products. Clarion Desktop knows when there is a new version and will download and (in most of mine) run the Installer. Clarion Desktop (the Professional edition) keeps my passwords, and for the Capesoft products (and some others) that really takes a painful equation out of the way.

There are some issues. Sometimes a product’s "version" will be stuck until you do a manual upgrade. I believe this is due to a problem with how Clarion Desktop reads the 3rd Party RSS feed. But I could be wrong.

For me, taking away the pain of manual 3rd Party product upgrades justifies Clarion Desktop’s place on this list.

NetTalk (http://www.capesoft.com/accessories/netsp.htm)[Back To Listing]

I use NetTalk all the time. These days it’s usually the Web Server in conjunction with Emailing and some other facets. But whether you want to build a standalone Web Server with Browse/Form (and a lot more) Template functionality hitting your DB directly .. or whether you are looking to write and E-Mail client, NetTalk is the Template for you.

Particularly, the Web Server is just awesome. You don’t need to worry about IIS. You don’t need to worry about Apache. All you need (this should be a song) is NetTalk.

PDF-Tools (http://www.docu-track.com/home/dev_tools/clarion/)[Back To Listing]

Reporting to PDF is vital in our world today. Face it, without PDFs you cannot expect to compete.

PDF-Tools is a complete package. You plug in the Template and compile. The more you delve into the options (which work by default just fine), the more you understand the power PDF-Tools gives you.

Setup Builder (http://www.lindersoft.com/products_setupbuilder_dev.htm)[Back To Listing]

Putting together an Installation can be tedious and frustrating. Setup Builder is none of those two, and all of awesome.

Learning the ropes on a new product can be daunting, but take the time with Setup Builder and you will be rewarded in full. Once the fog has lifted (I had a few days of heavy fog, the old brain couldn’t work it out right away) you will be hit with just how much control Setup Builder gives in the creation of Installation (and Upgrade, and more) files.

More than just being a great product, the support that Friedrich brings to the product is first-class. Absolutely.

Dr. Explain (http://www.drexplain.com/)[Back To Listing]

A couple of years back, I saw a post on the newsgroups about a piece of Help Authoring software. The word "free" and "blog" jumped at me with feverish excitement, so I downloaded Dr. Explain, wrote a review, and received my copy.

The latest version of Dr. Explain has kicked it up ten notches to take on the big fellows. Basically, you can write your Help files with wild abandon now, not only having something which outputs like Help & Manual, but pulls in SnagIt-like functionality for good measure.

Seriously, this is what Help Authoring software should be. And is with Dr. Explain.

Notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm)[Back To Listing]

A Text Editor is a powerful development tool. You should not get by without one.

Notepad++ trumps the previous place-holder here, Ultraedit, for me. It’s Lightweight. It does what I needed Ultraedit to do. It’s free. And, it’s light. Weight.

The Text Editor is like the proton energy pill. Or something.

Notes:

"Documents and SettingsApplication DataNotepad++userDefineLang.xml""Program FilesNotepad++pluginsAPIs*.api"

Honorable Mention Tools (One’s I Don’t Use But Probably Should)

Clarion Handy Tools (http://www.cwhandy.com/)[Back To Listing]

I didn’t know much about CHT until I started really getting into NetTalk. Now whenever I’m gushing about NetTalk, one of the little men in the back room of my brain is thinking about CHT and humming away to ACDC: "C. H. T. .. It’s Dynamite!"

This is one particular product that I really want to, and will, try out in the near future. If you ask around, on the newsgroups or Skype or elsewhere, CHT will be on the praise list.

What does it give you? From what I can tell .. Everything. And that’s just fine.

Clarion Connection (http://www.outsidetrains.com/cc/)[Back To Listing]

Tom’s site is fantastic. It’s two lists. One being the recent "Clarion Stuff", the other being ALL the "Clarion Stuff". If you like your information methodical and vertical, hit up Clarion Connection.

I need to visit here more often.

Tafres, Security, Automatic Updating, and Online Activation

Last night I successfully got both the Tafres Client _and_ Server to a stage where each of them:

– Checks for updates over the web on startup. If one exists, that is a greater version number by it’s logic, it will ask to download. Once the download is finished, it will ask to install. There is an issue with the Client because it asks to "exit" the program. The update logic works best when the program can shut down silently. Will have to do something about that. Anyway, the installer runs and updates.

– Runs a 10 Day Trial. I haven’t yet worked out whether the 10 day trial will always just happen, or whether the user will need to get the activation code online to get the 10 day trial. Never the less, at the moment, both can be done.

– Allows for the the retrieval of an Activation Code (part of the Licensing information needed) over the internet. This is done using Secwin Online Server, and Secwin.

This is very cool. In terms of support, you want these two things in place before going out into the big bad world. I need my product secure. But it needs to be trialled. It also needs to be updated as painlessly as possible. I’m getting there with the current solution, although there will be some tweaking I can already see.

Along with this, using SetupBuilder I now have the process of creating Installs and Updates working pretty well.

– the file structure is <Product Name>\\<Version>\\ … then in that folder, I have both the Install and Update SetupBuilder files. Also, these folders: <source>, <external source>, and the two that are created by the SB files themselves, which store the Install and Update respectively.

– the updated files (of mine) go in <source>.

– any changes to 3rd Party or stock Clarion files (dlls) go in <external source> (these are used for the Update logic).

– Open up the Install file, change the [DEVFOLDER] value in the script section. Obviously, this is giving SB a base folder to work from. Practically, I just change the version number.

– If I’ve added new functionality that requires new DLLs, I run a static scan on my exe(s), done in the top panel of SB. This adds any new dependencies.

– Compile.

– Open the Update file (close the Install). Change the [DEVFOLDER] value.

– If any changes to 3rd-Party or Clarion DLLs, run the "Project->Task Automation->Perform Auto Update Scan .." action, and check the differences between the <external source> folder in the current version folder against the previous version folder. This adds any changed DLLs to the project.

– If any new dependencies have been added, I run a static scan on the exe (as in the Install).

– The main exe will already be in the Application Folder, with a  "patch" moniker. I open the file’s details in SB and change both the source and patch folders (change the Version number) to reflect the new versions.

– Compile the Update. This takes a little while longer than the Install, but not much. A very nice and small (if only changes in the main exe for example) Update exe.

– I then update the XML file in the <TafresClient-Update> folder (SB creates a folder with the same name as the SB file itself to store the builds in) to reflect the new version number.

– Now it’s time for uploading the Update exe and xml files to the ftp site that Safe Update looks at. Done.

– Finally, I upload the Install.

– I’ve kept my Install and Update filenames generic. I started out sticking the version number in them, for visual reference, but too many things would have been harder. Safe Update, Changing more stuff each time in SB. Generic names keeps the process streamlined. It also means there is only one set of files on the server, not one for each version.

Phew. That’s quite a post. I think I need to spend some time doing this with screenies and wotnot. Might be helpful. I’m planning to do a bunch of stuff for the new Clarion site, and these pieces of development functionality will go in as tutorials at some stage. So probably won’t do it again here.

Aussie DevCon 2007 .. Part 3 (Saturday Content)

This is definitely spanning more posts than I figured. But then, I wrote more notes than last year. A lot more.

Anyway, we are looking at the Saturday content today, which was the most diverse of the days in terms of speakers and .. content. Ha.

Bob, Bruce, Geoff, Russ .. and myself.

Actually, looking at things, this will be a huge post. Hmmm, it’s a good thing people love reading lots of small fonts and dull language.

You’ll notice that as my talk approaches, the notes become more and more .. less. Ha ha.

Let us gird our loins and rush onwards to the battle! I mean .. to the content!

 

Bob Z .. Clarion 7 – the New RTL, Controls and Menus

 

  • We’re looking at Visual Styles (Tabbed Styles) .. Menu .. etc etc
    • You’re free to change the highlight bar to whatever you want.
    • Simple embed point, take full control .. whatever.
    • Icons in the highlight bar .. make it look a lot better.

 

  • Tools-Options -> Use smart tags
    • Rather than go and access commonly used properties .. have a tag window that when clicked comes up with the Menu Editor, selecting the context’d control you were coming off. 

 

  • XP Themes example
    • Tabs Locations
      • The movement of the tabs .. the text doesn’t get distorted (as opposed to the .NET runtime??)
    • Themed Progress Bar
    • Test List, Drop & Combo
      • Fully themed .. don’t have to do anything to get that.
    • Point of this is that you get all controls fully themed by default, just recompile
    • Now that sheets and tabs are fully themed, the prompts need to be checked transparent if you’re using a non-white??? Theme. Not sure about this.
      • Ohhh, TRANSPARENT controls have a background that is the color of the theme.
      • In Clarion 6 and previous, controls such as prompts were not populated with the transparent attribute, because the background was always
      • The body of the sheet tab will pick up the theme color.
      • If it doesn’t have transparent ticked, then it will have the color of the window assigned to it.
    • The "Type" ing of fonts .. True, Clear, .. the drawing of text in all controls has been replaced, and they will display right, but default.
      • If they didn’t have ClearType in by default, weird stuff (in Vista) would happen.
    • Okay, you set the color of the tab .. and at runtime, the header gets the color .. the actual body stays the same as the theme.
    • 4 different tab styles .. 0 (Default), 2 (Colored), 1 (B & W), 2 (Boxed)
    • The User can change their themes .. not sure, faded out for this bit.
    • Control Collection Editor .. for example, from the Sheet properties, you can click to edit the Collection of Tabs.
    • When you want to highlight certain tabs .. give it a color .. if you want to de-emphasise a tab, give it no color.

 

  • Back to the School App
    • Compiling with both C6 and C7 .. we are looking at the different between the two apps.
    • First try didn’t work .. we got themes in both apps. Obviously Bob is trying to show us that when you compile in other the C7 you don’t get the themed support.
    • Showed that you can Opening Working Folder

 

  • By default, brings in the included DLLs into the directory.

 

  • Showing the compile in Clarion6 didn’t work.

 

  • You can have a separate redirection file for .. each .. Project? App? Not sure which one.
    • No, in the Clarion Version options. So you set it for the version of Clarion you are using.

 

  • Bob talked for a while about the output settings by default .. apparently in the Alpha there was a lot of "discussion" as to where the exe outputted .. in Clarion7 they had just done the bin\\debug or bin\\release .. like most other compilers .. but lots of 3rdParty folk didn’t like it.
    • Possible to continue working when compiling (it’s on a different thread).
    • But not possible to compile a second thing at once .. because MSBuild must compile sequentially.
    • Bob showed us in C6 9056 .. "Extended UI" .. enable the XP Menu, and then choose a color type, which is a theme file?
      • What is the Color Type?
        • The color on the body of the tab (that is, the header)
      • compiling in C6
      • something happened, it could have been something between having C7 and C6 opened at the same time ..???? but Bob’s C6 was very very slow doing any compiling, generating .. the ABC stuff at the start.

 

  • Three things missing from the AppGen
    • File Integration, and the .. missed them.

 

Bruce (Capesoft) .. Making Your Clarion Apps Compatible With And Designed For Windows Vista

 

  • Cover what you need to know, to start thinking about
  • How does Vista impact us as Clarion Programmers?
  • And, How does Vista affect our programs running at our customers ..
    • These are the two questions
  • What’s everyone talking about?
    • UAC
      • Making windows more secure by asking the user to allow programs to do things ..
      • Bruce then showed the Mac ad
      • Showing lots of different windows that UAC pops up
        • You can have 7 dialog boxes pop up (not all UAC)
    • Best way to handle UAC
      • Show a UAC error
      • With a trusty magnum .45
    • Go ahead and try to program with UAC turned on
      • Because the Users will have it turned on
        • This is a myth ..??
        • But go ahead and try.
        • Average time to failure seems to be less than 2 weeks (to try and program with UAC on)
      • The camel may be strong, but the knees are buckling
  • Clarion 6 on Vista
    • Keep it out of the Program Files directory
    • Runs fine even with Aero turned on (minor cosmetic issues)
    • SV blog contains more info
  • Vista for Users
    • UAC will probably be on .. although MS might take a lot of it out.
    • Your program needs to be Vista compatible.
    • Turn on UAC (on a test machine) for testing
  • What NOT to do
    • No INI files in the windows dir
    • Registry
      • only write to HKEY_CURRENT_USER, or better yet, not at all.
        • Registry is not the most reliable of data sources
    • Personal opinion
    • No Data files (including INI files) under the Program Files dir .. use GetFolderPath or ds_GetFolderPath
      • These procs (the api) gets the proper data folders, which have changed from XP to Vista
  • What TO do
    • Sign your apps

 

Geoff Spillane .. SetupBuilder 6 – Vista Ready – A Practical Demonstration

 

  • How SetupBuilder can overcome some of the problems faced with development on Vista
    • but also to show how SetupBuilder can manipulate the files and folders to do some housekeeping, to take some basic tasks, make it very easy to use .. to use the Power of SetupBuilder. It’s main power is in the scripting language. Friedrich has made it so you can dragNdrop .. so you don’t have to learn a new language.

 

  • Code Signing .. Vista’s reaction
    • Showing the UAC window, the first one .. "Cancel or Allow" .. heh heh
    • Audible warning as well that happens (ha ha .. very funny)
    • A Code Signed application is a much more genuine window
      • Different color, different wording .. far less aggressive
    • Signing
      • People hiked their prices up with Vista ..
      • If you have a current sub with Lindersoft for SetupBuilder, then you get a significantly reduced price for a cert. with COMODO.
      • But also, for those who haven’t bought SB .. for $25 (US) you can purchase a Lindersoft Community Membership, which then gives you the reduced price for the COMODO cert.
    • Geoff takes us through the purchasing of a cert. from COMODO through the Lindersoft site.
    • Okay, now he’s going into SB -> the General Information .. and you put in the Digital Signature information
    • It sets up the code signing for the Installer .. but you also need to code sign the Uninstaller? But the Uninstaller doesn’t exist, it’s built at runtime .. so Friedrich did some fancy footwork, and code signs it at runtime.

 

  • Code Signing your applications (as opposed to your Installer)
    • So now we go into the Script Editor in SB
    • Geoff drags the Script Function .. the "Code Sign Application" function .. which brings up a window dialog to fill in the necc. Info.
    • We see SB code signing the application, and then the Installer/Uninstaller after this.

 

  • Embedding your Vista Manifests
    • A quick fix :: (for people with sizable apps)
      • Throw in a Vista manifest, set it to require Administrator
        • You then get the friendly warning .. but you still get a warning, although only once I believe
    • Geoff runs through how to add a Vista Manifest in SB, using the script functions .. dragNdrop, fill in the window .. badabing, badaboom.

 

  • How do we put things in the right place?
    • SB makes it very easy
    • Geoff showed us how
    • Including Registry Entries .. same kind of deal .. fairly easy.

 

  • Handling Shortcuts
    • Very easy interface .. here, as everywhere else, SB explains itself

 

  • If you don’t have a complicated install, you can work with dialog windows, but if you do have a complicated one, well, you lead through and work in the scripting .. very powerful

 

  • Shortcuts again
    • Showing how to add a ‘choice checkbox" for the User to choose whether the icons get installed.
    • seems to be you would discover most of how SB works simply by using it .. seems very straight forward.

 

  • Using SB to do some house keeping
    • Dealing with Files and Folders
      • SB elevates it to Administrator level

 

Russ Eggen .. ABC Compliant Classes (And Templates)

 

  • ABC Standards defined
    • Included in apps when used
    • Must work out of box
    • Allow Developer to make changes
    • Support embeds for public methods
    • Generates correct code, whether embeds or not
    • Allow extending the class
      • Without once touching the base code
    • Classes must be able to be exported when using as DLLs
    • Changing which base class is used
  • Coding the CLASS
    • Russ opened up TextPad ..
    • Created a new Projct in C6
    • Then went back to TextPad
    • Wants to put together a very simple class, to show us a few things
    • So sets up TextPad for the coloring etc of the code

Missed a bit, phonecalls .. went to loo ..etc etc

  • Russ has kept going with the coding of the Class .. it’s Clarion this time .. ahhh, he’s got the .clw open in C7.
  • !ABCIncludeFile(ABC) would link in to all apps whether used or not.
  • Three ! (!!!) changes it to a tooltip in the C7 parsed autocomplete.
  • C7 part
    • Setting the Link Flags is very important .. the source GPF’s without them.
    • Eg. _DEMOLinkMode_
  • Back to the Slideshow
  • Coding the Templates
    • So we have a class in LibSrc
    • Russ then goes into TextPad again, starts coding a simple Template.
      • Reminder to make the Template ABC Compliant .. (the default, if you leave it blank, is Clarion (Legacy)
        • So put FAMILY(‘ABC’) at the end of the #TEMPLATE first line.
      • Need a #PREPARE statement for ABC Compliance .. (Russ also lets us know that his own preference is to code the #ENDPREPARE right now, so as to not forget.
      • Okay, above the #PREPARE there needs to be a #BOXED(‘Default prompts’),AT(0,0),WHERE(%false),HIDE .. and #ENDBOXED
        • This is for setup code going on behind the scenes, and you don’t want the prompts visible
      • This doesn’t yet cause the "Loading ABC Defaults" window .. that’s in the #PREPARE statement (not the #BOXED)
      • Russ then went through the #PREPARE body
        • #CALLs ..
      • The template code to EXPORT all Class stuff (which is a previous point of ABC Compliance)
        • #AT(%BeforeGenerateApplication) .. #ENDAT
    • In the middle:
    • #CALL(%AddCategory(ABC),’DEMO’) this takes ‘DEMO’ and prepends it to the ABC link stuff above
    • #CALL(%SetCategoryLocation(ABC),’DEMO’,DemoClass)
      • That’s all you need to make sure it’s exported for DLLs

Okay. I missed a fair bit of Russ’ stuff, mostly because i was in and out of the loo and on the phone with the wifey, talking about my talk. And honestly, for an hour or two, I was pretty wiped out after the exertion of singing and dancing for the crowd. Heh heh.

Apologies Russ!

However all is not in vein. Ha ha. Or vain.

Dave Beggs came to the rescue. I’ll now display his notes verbatim.

Cheers Beggsy!

 

Included in apps when needed

Work out of box

Allow developer to make changes

Embeds for all public methods

Generates correct code whether embeds used or not

Allows extending the class without touching base class code.

Automatic Exporting of the Class if DLL

Allow changing of the base class used

Coding the class

!ABCIncludefile(ABC) would link in to all apps whether used or not

ShowMessage   Procedure() ! ,Extends            The ! ,extends makes it show up in the embed tree

If you put a comment in a class with three !!! then it becomes the tooltip in the C7 parsed autocomplete

Coding Templates

#Template(Democlass,’Devcon Class’),Family(ABC)   ! the default family is Clarion!

#Extension(DemoClass,’Global Demo’,APPLICATION

#Boxed(‘Default prompts’),at(0,0),where(%false),Hide

  #Insert(%OOPHiddenPrompts(ABC))  !in abboop.tpw – calls group ooppprompts – basically loading all classes in memory

#EndBoxed

#Prepare

   #Call(%readabcfiles(ABC))  ! read the abc header files if not already read

   #Call(%SetClassDefaults(ABC),’DC’,’DC’, ‘Democlass’)   !the second one would have the applicationtemplateinstance in a local class

#EndPrepare

#Atstart

   #Call(%readabcfiles(ABC))  ! read the abc header files if not already read

   #Call(%SetClassDefaults(ABC),’DC’,’DC’, ‘Democlass’)   !the second one would have the applicationtemplateinstance in a local class

    ! this is like an init – set the class defaults   this is ths same as the #preopare – the 2 calls needed at both atstart and prepare

#Endat  !not #Endatstart!

#AT(%BeforeGenerateApplication)  !This will generate the export files for multi dlls

#Call(%AddCategory(ABC),’DEMO’ )  !Demo will be made into _demolinkmode_ and _demodllmode_ – MUST BE UPPERCASE

#Call(%SetCategoryLocation(ABC),’DEMO’,’Democlass’)

#Endat

#tab(‘Global Message Instance’)  ! allows the developer to change the class name

   #Button(‘&Message Stuff’)       ! done on a button so you can use the with, and

#With( %Classitem,’DC’)          ! make the global prompt come up as a single instance

      #insert(%GlobalClassPrompts(ABC))

#EndWith

#Endtab

#Tab(‘demo base class’)     !Allow the developer to change the base class

Prompt(‘&DefaultClass’:’. From(%PClassname)),%Classname,DEFAULT(‘Democlass’),REQ

#EndTab

#At(%GatherObjects)

  #Call(%ReadABCFiles(ABC))

  #Call(%AddObjectList(ABC),’DC’)    !puts a value in %thisobjectname

  #Call(%ObjectList,%ThisObjectName)

  #Set(%ObjectListType,’DemoClass’)

#Endat

#AT(%GlobalDataClasses)

#Call(%SetClassItem(ABC),’DC’)

#Insert(%GenerateClass(ABC),’DC’,’Global Instance’),NoIndent   !Generate the code

#EndAt

#If (%Baseclasstouse())

#Call(%Fixclassname(ABC),%Baseclasstouse())

#For (%pClassMethodPrototype),Where(%MethodEmbedPointValid())

#Call(%SetupMethodCheck(ABC))

#At(%DemoClassMethodCodeSection),Priority(5000),Description(‘ParentCall’),Where(%parentcallvalid()) ! Add Parent call embed code

#Call(%GenerateParentCall)

#Embed(%DemoclassMethodDataSection,’Demo class data section’)

#?Code

#Embed((%DemoclassMethodCodeSection,’Demo class codesection’)

#Call(%GenerateNewLocalMethods(ABC)

#AT(%GobalData)

#At(#ProgramProcedures),Where(%ProgramExtension <> ‘DLL’ or ~%GlobalExternal)

  ! this knows whether to include in multi dll

#Call(%GenerateVirtuals

#group(%Parent Call   ! this is called as a function and retuerns the abc version which could not be done as the template wouldt have recognized abc earlier.

Local templates

Classprompts, not globalclassprompts

Default instancenames setclassdefault in prepare – use activetemplateinstance

Finally Russ has skeleton template.

Also 36 page pdf template

 

Bruce + Jono .. Fun With Capesoft

 

(notes taken from Bruce’s actual words .. I realised too late that I should have been doing this all along, rather than trying too hard to understand and write in my own words .. ha ha)

 

  • takes Jono about an hour and a half to knock the app together

 

  • first group of products
    • Around the concept of LookNFeel
    • We judge things based on what they look like, we shouldn’t, but we do.
    • Most of the car purchase is emotional.
    • Emotional attachment comes with benefits
      • Saving you time
      • Saving money
    • There are a lot of little things that we put together
      • In the app, there’s a very subtle shade of background color
    • Draw heading at the top of the window
      • A 21st century look to it
    • On the Form .. entry fields are rounded
    • If you turn you tabs into a Wizard .. you get a line down the bottom under the buttons
    • Large fonts tends to exaggerate everything, so this looks much better in normal mode
    • You can have icons on your Draw headings
    • AnyFont .. allows you to change your font at runtime.
      • When changing from major versions, we change the font, the style, the heading ..
      • Looks different, works the same (People love this)
      • Changing the CharSet of the fonts .. eg. Greek letters
      • A lot of users who don’t have perfect eyesight anymore, nice not to be looking at a 6 point font.

     

    • TearOff
      • Ken got a standing ovation (phoned up Bruce one day) in the middle of a demonstration .. went to the menu item, clicked .. and got a Toolbar window
      • Put icons, icons in text, dock the window

     

    • Hyperactive
      • Allows you to make meaningful data do things.
      • Internet, Email address, word docs, Skype .. how do we make our users use them?
      • Question about Terminal Services etc .. what Api is being called .. 
        • Bruce said he wasn’t sure, but others said it works fine

     

    • KeepingTabs
      • Remembers which tab you were on
      • Trivial .. but makes a huge difference to Users
      • Can store the info wherever you want

     

    • EasyHelp
      • Who likes writing help? Apart from Russ .. maybe that’s the exception that proves the point!
      • Can write your own help at runtime
      • OR more importantly, someone else can write the help for you at runtime.
      • Capesoft uses their Distributors and Dealers to write their help.
      • Question from Warren .. are there tools available for copying help from other files?
        • A: it’s a Topspeed file, so trivial to do it yourself
      • Automatically populates tips and other things from the Dictionary

 

  • Second Group of products are ones that we have tried to be creative with data .. "Addicted to Browses"
    • Insight Graphing
      • It was really nice to seeing guys adding graphs to applications this week.
      • Lots of different types
      • Do heaps of stuff with them .. right-click copy, add to presentation, drilldowns, send to different places, print .. etc etc.
      • Zoom Out, Zoom In, Copy, Save As ..

     

    • HotDates
      • Calendar view of your data
      • Very illuminating, you can see a lot of things from this that you can’t normally
      • The example of the guy who took a sick day on a Wednesday every 6 weeks, had mapped his entire year out
      • Can go month, year ..
      • DragNDrop the records around
      • Go to the form from any of the records
      • Grab one, move it somewhere
      • You can insert, cutNpaste, copyNpaste ..
      • It’s actually adding the records like a browse

     

    • File Explorer
      • GPS coordinates, plugged into Google Maps .. get the place where they had the sighting
        • "Changing a Sighting record"

     

    • Send To
      • Wonderful story
      • Client is leaning over Bruce’s shoulder, getting the browse right, the sort order .. he said "Great, print that!" .. Bruce said no, we have to go to a report.
      • Which is insane .. so kill two birds with one stone
      • Did a proof of concept, then handed it to someone else to code, which is the better way to code .. get all the glory and don’t do the hard work
      • Send it to printer, file, email, ftp or the clipboard ..
      • And when it’s going there, you can decide the format
      • PDF, HTML, Excel, Word, CSV, XML .. you can add your own format if you like
      • It preserves all the formatting, the colors, the graphics, assuming the destination format supports those elements.
      • If your browse is really wide, when it goes to the printer .. prints over multiple pages .. multiple columns of pages .. there was a Sideways reference here, from old Apple days
      • Q: will this work with Clarion .NET
      • A: no idea yet, don’t have it
      • Q: do you have to have Office installed?
      • A: if Excel doesn’t exist, it will be greyed out on the window, gracefully
      • Q: if you don’t want Excel, do you need Office Inside?
      • A: yes you do.

     

    • Office Inside
      • Office Inside does have a nice feature, if the user gives you a file in excel format .. the Import of an Excel file straight into a TPS or whatever file you have
      • Through a wizard interface
      • You can do it one off, or leave the wizard interface for the User to use
      • Bruce’s First Law .. People Lie
      • Bruce’s Second Law (which has been repealed) .. Never Call the Customer a Liar to their face
      • Bruce’s Postal Law .. the further away things are, the faster they get to the destination

     

    • GPF Now
      • I made a comment this week, and people laughed
        • "GPF’s are your friend"
      • But I was serious
        • They are a very important programming tool
        • What is wrong .. and Where it’s wrong
        • What is the biggest problem?
          • We don’t know how to interpret the information
      • "Would you like to GPF?"
        • For the masses (because real programmers code in HEX) we wrote a little app
          • A whole pile of information in the window that comes up after pressing "GPF Now" ..
      • What build of windows
      • What key was pressed
      • What thread was running
      • The line number of the program
      • The procedure, the module
      • All of the line numbers that were used on the way to this line

     

    • NetTalk WebServer
      • The Online Account app on the web
      • A simple clarion exe, no dependencies, no IIS, no Apache
      • Accessible via any browser
      • There’s a danger here, with all these examples
        • You think this is the way this has to look, and get set in the pattern
        • You have complete control as a programmer over what the thing looks like
      • Jono clicks through Invoices, line items, Customers .. showing off various aspects of the Web Serving.
      • Customers->Change button-> a dropdown for Country
        • The Shipper Codes change with the change of DropDown
      • Customers->Invoices Tab->
      • In Jo-Burg, people deployed on Monday the week after the Capesoft Training
      • Online Calculator example
        • BMI Calculator
        • Don’t need a button, because all the fields are dynamic .. but you can if you’d like
        • All of this is done with Clarion code, no custom Javascript in this particular app
        • Q: ????
        • A: we are not taking an existing application and transferring it to the web server
      • What we’ve got are browses and forms for you to create (you can reuse your reports)

     

    • RightReports
      • Spend a few minutes with a brand new product
      • Available in alpha (we have a closed alpha group)
      • RightReports is the ability to include in your own application (all source code, no dlls)
      • The main reason why we went down this road is that you have the ability to write your own code, your own functions that the report engine will make use of
      • Went to the loo
      • A very simple report, Invoice
      • Q: Dropping in Graphs
      • A: hopefully one day