Re: Any serious interest in code with advanced techniques?

Thomas Gruber Yahoo
 

Hi Joy, Jim,
I‘d certainly take a thorough look at this if you publish it. As Jim says, any well documented and working example of clip code is welcome, and I particularly like the part about making it sensitive of which version of NoteTab it‘s running in.
So if you‘re willing to do this then thanks in advance.
And yes - publishing code for others is really a different thing from writing and even documenting it just for your own use. So I appreciate that you‘re willing to go through this.
Kind regards
Thomas (Computerhusky)

Am 02.08.2020 um 03:07 schrieb James McBride <mr.james.e.mcbride@...>:

That sounds like an interesting idea....I think. Are you saying that this will be sort of like drawing an ASCII box around certain text, or removes/changes that box?

Truthfully, any code that is well documented and that we can run it and see what it does to further the understanding of the code is a good thing.

This language isn’t like C++ or Javascript or Python where you can just go out to 1 of hundreds or thousands of websites to find example code with accompanying explanations of that code. There are very few places to find examples of Clipcode. I don’t guess that I would be able to understand and completely follow the code, as it sounds a lot more complex than where I am at right now with Clipcode, but it would certainly be welcome.

--Jim

-----Original Message-----
From: Clips@Notetab.groups.io <Clips@Notetab.groups.io> On Behalf Of joy8388608 via groups.io
Sent: Saturday, August 1, 2020 3:41 PM
To: Clips@Notetab.groups.io
Subject: [NTB-Clps] Any serious interest in code with advanced techniques?

I've put lots of thought into whether I wanted to invest the time and energy into making it available but would do it if there is serious interest. Since we were just talking about compound IF statements and how to learn new techniques, I thought this would be quite the challenge to look at but would be a real learning experience for the brave.

It's a clip that works on selected text and either draws a box around the selected lines, draws an open box, removes an existing box, or converts a previously drawn closed box to an open box.

(An open box does not have the rightmost side which would reduce file size by eliminating spaces to pad those lines.)

The concept is simple but the clip is not.

It can be run directly from the library or toolbar which will cause a wizard to ask for the function.
It can be run with a shift\alt\control key down to specify the function and bypass the wizard.
It can be called as a subroutine.

It will recognize and adapt itself from NTP vrs NTS\NTL which is important because there are some major differences. Some functions are available to some flavors of NT but not to others. The main issue here is the ability to convert tabs to spaces so the right side of the box lines up. There was a lot of thinking about what to do if any tabs are found, what version of NT is running, whether to ask the user what to do if running NTL\NTS and tabs cannot be converted or if the clip should automatically take an action. This is affected by if it is running standalone or called from a subroutine, etc.

In other words, there are a lot of possible conditions where I needed to make decisions like

If (NOT Tab Question Override) AND (NOT called as sub) AND (tabs exist in selection) AND (running NTP) THEN ask-user

which I can do in a single IF statement.

It uses two subroutines which I also use in other clips and works very well. It can even create\uncreate nested boxes.

I use this clip when making notes and also wrote another clip which draws a box around all lines which contain a specified string which calls this clip as a subroutine.

This program is a complete redesign and rewrite in Nov 2019 when I added functions and made it aware of tabs and which version of NT was running.

As discussed before, it does take a surprising and unexpected amount of time to get code ready for the public even if it is already fully documented and commented so please be honest about if you will really take the time to study the code. I'm happy to do it. It's my way of giving back for all the help I've received here over the years.

Joy






Join Clips@Notetab.groups.io to automatically receive all group messages.