1. Jeff Kandt
  2. PowerBuilder
  3. Wednesday, 7 April 2021 18:31 PM UTC

You can add a custom icon to the PowerBuilder IDE toolbar, and one option is to specify in the "Command Line" a path to launch a separate executable.

I'd like to create toolbar buttons that launch small custom utilities which operate against the current workspace or target.

Is there a way to pass a dynamic argument containing the path to the current workspace, or target, or anything else that could pass context)? I'm imagining something like:

/path/to/utility.exe workspace="@WorkspacePath"

Alternately, the help says you must fully-qualify the path to the executable (if it's not in the current search path). But I think I could make this work if it was possible to enter a relative path and PB would interpret that as "relative to the current workspace (or target or whatever)".

If this isn't possible, how can I log a feature request?

Thanks in advance.

 

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 19:24 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Jeff;

  PB Has supported relative pathing since version 2.0 when this user toolbar feature was initially added. For example, here is how my IDE is set-up to run a PB App that automatically adds comments into your current IDE's script painter ...

..\STD_FC_Commenter\Deploy32m\scriptcommenter32m.exe header

BTW: your forward slashes should be back-slashes.

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 7 April 2021 21:22 PM UTC
The only benefit of using my STD "Commenter" as a "hard coded path" would be so that you can use it with any Appeon PB release. For example: 2017 through PB2021 beta. As you can see though, the toolbar mapping can be fixed (absolute) or relative. Its really up to you ... just an old DOS thingy but still valid under MS-Window's. ;-)
  1. Helpful
  1. Jeff Kandt
  2. Thursday, 8 April 2021 19:11 PM UTC
>>The only benefit of using my STD "Commenter" as a "hard coded path" would be so that

>>you can use it with any Appeon PB release. For example: 2017 through PB2021 beta.



Hoping you misspoke and meant to say so you could use it with any target, right? Your comment has me concerned that you're saying it's relative to the PBxxx.exe, which is not what I want!

As I said above, my testing seemed to show it was relative to the Target (pbt). If so, I wouldn't think it matters which Appeon PB release I'm running to work with the target (as long as I've added the same custom button), or where the PBxxx.exe is running from. The custom toolbar button is launching a compiled exe, and I also wouldn't think it matters what release of PB was used to compile it.

Let me know if I'm missing something.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 8 April 2021 19:48 PM UTC
Hi Jeff;

In my case .. All the Apps are in their respective high level folders that match the IDE version, for example ...

C:\Dev\PB2017R3

C:\Dev\PB2019R2

C:\Dev\PB2019R3

So any relative "..\xxxxx" folder designation is relative to the PB IDE version that I am using. HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 9 April 2021 05:26 AM UTC
  2. PowerBuilder
  3. # 1

See the attached file which I downloaded from https://www.appeon.com/developers/library/code-samples/customizing-pb-ide.html

It's old, but maybe it can be of any use.

 

Attachments (1)
Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Thursday, 8 April 2021 20:45 PM UTC
  2. PowerBuilder
  3. # 2

A custom IDE wizard can get the current workspace and target. I did a class on how to do that at the last in person user group meeting.

You could create a generic custom wizard that executes an exe passing the needed arguments.

Comment
  1. Jeff Kandt
  2. Thursday, 8 April 2021 21:39 PM UTC
>>A custom IDE wizard can get the current workspace and target.

>>I did a class on how to do that at the last in person user group meeting.



It's funny Roland, I was just looking into this -- and getting ready to email you about it. Were your ears burning? ;-)

I read Bruce Armstrong's article on "Customizing the PB IDE", which is here on the Appeon Community site (though unfortunately none of the links to code listings, figures or tables work).

I also perused your site (https://www.topwizprogramming.com) to see if you had any info there on custom IDE wizards. Didn't find any code or examples, but I just downloaded and installed your Virtual Library IDE Wizard to see what it could do.

So … how would an IDE wizard get the current workspace and target? It's not something that makes sense at runtime and I don't think custom wizards have ever been officially documented so I suspect isn't in the PB Help...

Do you still have any materials from your user group session?
  1. Helpful
  1. Roland Smith
  2. Friday, 9 April 2021 14:38 PM UTC
I added a download for the session on the Tools page.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 18:35 PM UTC
  2. PowerBuilder
  3. # 3

Feature requests should be emailed to Appeon’s product management team at product@appeon.com.  Thanks.

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.