Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Mar 1995 08:03:49 -0700
From:      Steve Misek <misek@boulder.openware.com>
To:        avraad@nyqsdsn1.eq.gs.com
Cc:        oi-users@freefall.cdrom.com
Subject:   Re: my modifications to the .cf file are lost
Message-ID:  <199503091503.IAA02004@marvin.boulder.openware.com>

next in thread | raw e-mail | index | archive | help

 :: 
 :: How are other people dealing with these two common needs?
 ::   1) using non-default colors with dialogs where you can't get access
 ::      to the internal widgets
 ::   2) putting resource settings in the .cf file that uib doesn't
 ::      understand, and thus, doesn't preserve across saves.
 :: 

well, personally, I deal with these problems in one of two ways:
auxilliary config files that I add to my application *after* loading
the primary config file, or before calling build_from_configuration_file()

	cp->add_resources( OI_translate_filename( whatever_the_filename_is ));

as well as the following, UNDOCUMENTED, UNSUPPORTED, EVIL feature within the 
builder 
	 and I'm sure mentioning this in such a public forum will quickly
	come back to haunt me   :-)

When saving config files, the builder automatically
saves, and prepends anything found before a line containing the words
	End of Protected
Thus, if your config file looked like
	!
	! normal header
	!
		special resources
	!
	!End of Protected
	!
		application config

then all of the special resources will be ported forward every time you
save your application.  I added this feature to the builder in late 1991,
so every builder currently in use will probably support it...  it was in
response to a problem posed by a customer (and sent to customer support
with a SMALL TEST CASE -- to paraphrase toml :-).

The caveats:  **EVERYTHING** in the config file is taken into account
when your application is loaded into the builder, so you *WILL* see
some of the resources specified at the top of the file in the Protected
region slowly *bleed* into the bottom of the file.  In most cases this
is irrelevant, however you Must be aware of the problem if you are going
to play games with the protected region.  This is an unsupported feature
of the builder.

I'm guessing that either of these options will solve your problem.

steve misek
misek@boulder.openware.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503091503.IAA02004>