Clarion Folk

Making Development Better Than Eating Icecream

Search And Find (Where's my Alt F3?)

What Is Clarion?
What Can Clarion Do For Me?
Stu's Greatest Hits (Tools)

Entries Tagged as 'Clarion Folk Lore (Podcast)'

Clarion Folk Lore #3 - Dutchland, Scope and Slanderers Warned

April 16th, 2008 · · Clarion Folk Lore (Podcast)

Clarion Folk Lore #3 is live!

Download: Here (16:07 mins)

URLs

Answers

  1. What does MEMBER() do vs. MEMBER(’MyApp.clw’)
  2. Every module needs to either have a PROGRAM statement or a MEMBER statement.

    The main module of an EXE/DLL/LIB will have the PROGRAM statement. All others will have a MEMBER statement of some form.

    - The form, MEMBER(’MyApp.CLW’) tells the module to use the global scope of MyApp.CLW

    - The form, MEMBER() has no shared scope what so ever. This form is useful for generic code, these days typically for CLASSes

  3. What is the purpose of having a MAP, when it has no procedures in it?
  4. A MAP is used to declare prototypes for procedure. However an empty MAP isn’t quite as empty as it seems.

    Every MAP brings in %cwroot%\libsrc\BUILTINS.CLW
       so

       MAP
       END

       becomes

       MAP
         INCLUDE(’BUILTINS.CLW’),ONCE
       END

    Other files that are brought in:
       - EQUATES.CLW  (found in %cwroot%\libsrc)
       - Win32.LIB    (found in %cwroot%\lib)

  5. How do you make a QUEUE of QUEUEs ?
  6. You’ll need to use ,TYPEd Queues, and you’ll (typically) use NEW / DISPOSE .

       At it’s core:
       qtChild QUEUE,TYPE
       Name           STRING(42)
                       END

       ParentQ  QUEUE
       ID                  LONG
       Children     &qtChild
                           END

       Here a field of the ParentQ is a reference to another queue. Typically as you’re doing the ADD()s to the parent, you’ll either:
       a) ParentQ.Children &= NULL
       b) ParentQ.Children &= NEW qtChild  !instantiate a new one
       c) ParentQ.Children &= SomeChildQ   !already instantiated

       Remember when you’ve used NEW to instantiate, you are responsible for the matching DISPOSE, so typically when you’re doing DELETE(ParentQ) or wish to FREE(ParentQ) you will want to first DISPOSE(ParentQ.Children).

       qtFolder QUEUE,TYPE
       Name       STRING(FILE:MaxFileName)
       Path       STRING(FILE:MaxFilePath)
       ShortName  STRING(13)
       Date       LONG
       Time       LONG
       Size       LONG
       Attrib     BYTE
       SubFolders &qtFolder
                END

       Above is an example of a structure for a queue of queues, where the child queue is of the same structure as the parent queue.

       These sorts of structures lend themselves to recursive coding, however it’s not required.

[Read more →]

Tags:·····

Clarion Folk Lore #2 - Rastus Wants To Wrestle, Heroes Happen and Twitter Means Awesome

April 2nd, 2008 · · Clarion Folk Lore (Podcast)

Clarion Folk Lore #2 is live!

Download: Here (8:24 mins)

Apologies Jan for mis-pronouncing your name! Didn’t realise it was a y not a j.

I’m still working out Audacity. I seem to have reached the limit of what it can handle with how many different streams, one for every time someone speaks.

Which reminds me, I need to splice better.

I’ll be breaking up the segments again, exporting to high quality mp3, then importing them all in together for #3.

Notes:

 

Answers:

  1. How do you get code to run in a procedure AFTER you’ve RETURN’d?
    1. have a class that is instantiated in the scope of the procedure, make sure that class has a .DESTRUCTOR2)
  2. Name two ways to run code in a procedure PRIOR to getting to the CODE statement
    1. use a class that instantiated in the scope of the procedure, and make sure it has a .CONSTRUCTor
    2. (may require C6+), declare a variable with an initial value, that is an expression
      1. that expression can even be a procedure call
        1. ex:  MyVar  LONG( SomeProc(42) )
  3. How do you figure out where the running executable is?
    1. see COMMAND(’0′)
      1. Obviously Rastus got this a little wrong in the podcast.

[Read more →]

Tags:·····

The Beginning, The First Clarion Folk Lore Podcast!

March 27th, 2008 · · Clarion Folk Lore (Podcast)

Yes, you read it here first .. and only.

Clarion Folk Lore is the "Premium! She Needs Premium Dude!" of Podcasts.

Warts and All (and this is ugly, quite quite ugly), here it is:

Download: Here (10:16 mins)

Updates:

  • The Kuler website is http://kuler.adobe.com/, not the other way around as I mistakenly spoke.
  • "Rastus" was the name of our dog growing up. He was the same age as me, and died when I was thirteen. He was a "bitsa", big enough to scare off people, but not too big. He was an awesome fella. His full name was actually "Rastus McTavish" .. heh heh.

[Read more →]

Tags: