Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command line arguments when running from PB environment

1,241 views
Skip to first unread message

blza...@gmail.com

unread,
Mar 31, 2009, 6:22:09 AM3/31/09
to
Is there any way to pass command line arguments when running
application from PB environment (buy pressing ctrl-r)?
I've tryed putting params in "Arguments" field in the "Run" tab of
application project properties, but it doesn't help.

I use PB 11.2.

blza...@gmail.com

unread,
Mar 31, 2009, 6:58:54 AM3/31/09
to

The solution was to run project from Project Painter.

fisher

unread,
Mar 31, 2009, 12:22:00 PM3/31/09
to
Command line parameters are available as parameter to open event of
application object and commandParm global function

You can check if running from PB IDE - Handle(GetApplication)
And when its 0 then display some window to ask for those parameters or
read them from registry.ini file.

Jason 'Bug' Fenter [TeamSybase]

unread,
Apr 1, 2009, 12:43:32 PM4/1/09
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some great advice I got from Terry Voth (I believe):
I have a non-visual object that I treat as my application manager. It
has a "Open" event with a string parameter passed by reference
(important, that: reference). If I'm running from the IDE, I open a box
to let me type in command-line arguments. I then set the CommandLine
argument of my "open" event to the typed-in value.

My window with the edit box does two nifty things. First, it stores the
value I enter in the registry. That way, when it opens, it can grab the
value I entered last time. Second, it has a timer on it so that if I
don't start typing after a short while, it closes itself.

The "by reference" part is important. When I inherit from my custom
object, my descendant doesn't have to do anything. The descendant sees
the values in the CommandLine argument whether they were passed as true
command line arguments or if they were provided by the custom window
thingie.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknTma4ACgkQFnUQ/Ci/qM6YXwCdEHAjMhmANVY56Etv+mjoJ+ix
5fMAoIGBXCEPwhnfqdG5EUz+L7SX5zZn
=rtHy
-----END PGP SIGNATURE-----

0 new messages