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!
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
(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)