[comp.sys.amiga] SetPrefs

blgardne@esunix.UUCP (04/29/87)

in article <416@pttesac.UUCP>, vanam@pttesac.UUCP says:
> 
> That reminds me.  Does anyone have a program that will allow changing
> the morerows setting in the system-configuration file or the printers
> setting in the system-configuration file without running preferences
> and without rebooting (to change morerows) ?
 
  Almost! There is a program called Setprefs that will allow you to change
system-configuration files on the fly. The sys-config files can have any
name, you just have to specify tha path & filename. But, even if
MoreRows hasn't been used on a given sys-config, SetPrefs has no effect 
on the morerows setting.
 
  The biggest use I've seen for SetPrefs is to change the mouse pointer,
and the Workbench colors on the fly. There are several nice sys-config
files on PLink. (Fred, how about a Fish Disk full of
system-configuration files?)
-- 
Blaine Gardner @ Evans & Sutherland
UUCP Address:   {ihnp4,decvax}!decwrl!esunix!blgardne
Alternate:      {ihnp4,seismo}!utah-cs!utah-gr!uplherc!esunix!blgardne

bartonr@jove.cs.pdx.edu (Robert Barton) (10/26/89)

 eric@cbmvax.UUCP (Eric Cotton) writes:
>In article <165@ra.abo.fi> rosenber@ra.abo.fi (Robin Rosenberg INF) writes:
>>  Back to preferences: The RKM says you shouldn't do SetPrefs() since that is
>>pulling the rug from beneath the users feet.

  It doesn't say it IS pulling the rug out, it says "You should never use this
routine to make your programming or design job easier at the cost of yanking
the rug out from beneath the user."  It sounds like they anticipated that there
would be times when you might need to use it.

> Agreed on all counts.  SetPrefs() was originally intended to be Intuition
> private.  Notice that there is no mention of this function in the Addison-
> Wesley AMIGA Intuition Reference Manual.  Since it *is* documented in the
> ROM KERNEL manual, the secrets out.

  SetPrefs() is covered on page C-2 of the Intuition manual.

>   I would, however, recommend that you avoid using SetPrefs() for the reasons
> Robin gave above.  All you forward-thinkers (1.4) might want to avoid the
> function too (hint, hint).

  Okay, what if your system is set up for a 640-pixel-wide Workbench screen,
and your viewer program wants to display a 704-pixel-wide picture on a custom
screen, correctly centered.  You need to move the Intuition View to the left.
Since poking IntuitionBase is a no-no, you have to use SetPrefs().  Is there
going to be a new way to do this in 1.4?

eric@cbmvax.UUCP (Eric Cotton) (10/26/89)

In article <1860@psueea.UUCP> bartonr@jove.cs.pdx.edu (Robert Barton) writes:
>
> eric@cbmvax.UUCP (Eric Cotton) writes:
>>In article <165@ra.abo.fi> rosenber@ra.abo.fi (Robin Rosenberg INF) writes:
>>>  Back to preferences: The RKM says you shouldn't do SetPrefs() since that is
>>>pulling the rug from beneath the users feet.
>
>  It doesn't say it IS pulling the rug out, it says "You should never use this
>routine to make your programming or design job easier at the cost of yanking
>the rug out from beneath the user."  It sounds like they anticipated that there
>would be times when you might need to use it.

Sure, I'll buy that.  Applications for which it would be appropriate to call
SetPrefs() would include Preferences replacement programs (PRP :-).  I've seen
a few PD Prefs programs about.  With these there is no "yanking the rug out
from beneath the user."

>> Agreed on all counts.  SetPrefs() was originally intended to be Intuition
>> private.  Notice that there is no mention of this function in the Addison-
>> Wesley AMIGA Intuition Reference Manual.  Since it *is* documented in the
>> ROM KERNEL manual, the secrets out.
>
>  SetPrefs() is covered on page C-2 of the Intuition manual.

I stand corrected.  Note all the warnings and cautions in that chapter.  In
my opinion the only acceptable application use of SetPrefs() is for Prefs
editor(s).

>>   I would, however, recommend that you avoid using SetPrefs() for the reasons
>> Robin gave above.  All you forward-thinkers (1.4) might want to avoid the
>> function too (hint, hint).
>
>  Okay, what if your system is set up for a 640-pixel-wide Workbench screen,
>and your viewer program wants to display a 704-pixel-wide picture on a custom
>screen, correctly centered.  You need to move the Intuition View to the left.
>Since poking IntuitionBase is a no-no, you have to use SetPrefs().  Is there
>going to be a new way to do this in 1.4?

You betcha!
-- 
Eric Cotton
Commodore-Amiga                                               (215) 431-9100
1200 Wilson Drive                        {uunet|pyramid|rutgers}!cbmvax!eric
West Chester, PA 19380            "I don't find this stuff amusing anymore."

bartonr@jove.cs.pdx.edu (Robert Barton) (10/27/89)

 eric@cbmvax.UUCP (Eric Cotton) writes:
>  I've seen a few PD Prefs programs about.  With these there is no
>"yanking the rug out from beneath the user."

  Presumably because it's obvious to someone using one of these programs that
he's changing the Preferences?

>I stand corrected.  Note all the warnings and cautions in that chapter.

  Right.  I should have mentioned that this was the "Internal Procedures"
chapter, not the main part of the book.  It's not in the index, either.

 me:
>>  You need to move the Intuition View to the left.  Since poking IntuitionBase
>>is a no-no, you have to use SetPrefs().  Is there going to be a new way to do
>>this in 1.4?
>You betcha!

  Glad to hear it.  Using SetPrefs() isn't an intuitive way to do something
like this, but it's currently the best way.  Could you elaborate?