1. Miguel Leeuwe
  2. PowerBuilder
  3. Friday, 23 July 2021 08:22 AM UTC

 

It took me a while also before I realized that this option existed, so I just wanted to share this information.

regards.

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 23 July 2021 09:46 AM UTC
  2. PowerBuilder
  3. # Permalink

(marking as Resolved, since this is just a tip not a problem).

Comment
  1. Matt Balent
  2. Friday, 23 July 2021 16:39 PM UTC
My English teaching grandmother is whispering to me...'losing'
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 23 July 2021 17:09 PM UTC
haha, Thanks to your Grannie Matt. I'm sorry, my Spanish and Dutch are better than my English.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 23 July 2021 13:52 PM UTC
  2. PowerBuilder
  3. # 1

That's a good tip, Miguel. For anyone that has never used this tool, it's helpful that this feature inserts the code sample using a monospaced font and a lightly-shaded background, and it also automatically colors the inserted code in a similar manner as the PowerScript editor, which is nice. You can choose from several other development languages, but PowerBuilder is the default. SQL is not one of the supported languages, unfortunately.

One drawback that everyone needs to be aware that when using the "Insert/edit code sample" tool, each tab character get translated into eight spaces.

Example:

//345678901234567890
	// This comment preceded by a single tab character.
If IsNull(as_customername) Then Return -1

You'll see this translation when you paste the code into the dialog that opens up. It's rather annoying... Nobody writes code where a tab character translates into eight spaces.

Comment
  1. Miguel Leeuwe
  2. Friday, 23 July 2021 14:16 PM UTC
Hmmm, when I copy the space in front of you comment and paste it into notepad++, I'm getting a TAB !?



I seem to have read in some Python discussions about spaces vs tabs, they actually agreed on 8 spaces for a tab. The only reason to use spaces for me, is when you'd be working on some kind of open source project and everyone has agreed to use spaces. But indeed, 8 is ridiculous and annoying.
  1. Helpful
  1. John Fauss
  2. Friday, 23 July 2021 15:01 PM UTC
To be more correct, I should have said that Tab characters are represented by the equivalent of eight spaces. You are correct that the actual tab characters remain in place. Thank you for catching that! Whenever I use this feature, I try to manually replace each tab with three spaces, mainly because the display width of the postings in this forum is a bit restrictive.

Still, it's a useful feature and I hope more members will use utilize it.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 23 July 2021 15:42 PM UTC
ahh.. I get it now :)
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 23 July 2021 14:19 PM UTC
  2. PowerBuilder
  3. # 2

John,

which language did you choose when pasting that codeblock?
It looks very different to what I get when pasting it (language in the ddlb is "powerbuilder").

//345678901234567890
	// This comment preceded by a single tab character.
If IsNull(as_customername) Then Return -1

Ah, okay, once you've saved it, it looks exactly the same. :)

I'm using Firefox browser and do get TABS.

regards.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.