The List,

Thanks to all (Jacques P., Mark C., Yas) and especially Franz-Josef
Behr regarding my query about reading and writing Brush and Symbol
variables to Ini Files.

The Bad News:

There's no easy way without writing functions to decompose the Brush
and Symbols clauses using Instr() (details below)

The Good News:

James Marlow has done this...  http://rampages.onramp.net/~vaxcrshr/
says last updated 21 June, 1998 but several nuggets on there like the 
ini_api.mb which is a generation or two ahead of the simple lib I have 
been using forever.

I quote:
"The functions available are:

GetIniString:  returns a string variable
GetIniSmallInt:  returns a small integer
GetIniInteger:  returns an integer
GetIniLogical:  returns a True/False value
GetIniFloat:  returns a floating-point value
GetIniSymbol:  returns a symbol value
GetIniFont:  returns a font value
GetIniBrush:  returns a brush value
GetIniPen:  returns a pen value"

as well as the corresponding Set functions.

Aside: Anything like this assembled for using the registry? Would
there be much advantage in storing application  settings like this in 
the registry?

Eric

 


----- Original Message ----- 
From: "Jacques Paris" <[EMAIL PROTECTED]>
To: "Eric Frost (HRA)" <[EMAIL PROTECTED]>
Sent: Monday, November 06, 2000 10:58 AM
Subject: RE: MI-L reading string back in from .ini


> Eric,
> 
> I may be a little late on this one, but I just had the same problem. The
> solution I found was to decompose the brush(...) that is only a string and
> not a brush variable, by using the instr() on "(", ")" and "," to extract
> the 3 values, then using then to create the brush variable.
> 
> I hope that makes some sense to you.
> 
> Jacques
> 
> Jacques PARIS
> 
> e-mail    [EMAIL PROTECTED]
> 
> For MapInfo support, see the Paris PC Consult enr. site  at
> http://www.total.net/~rparis/gisproducts.htm
> 
> For MapBasic questions see the J.Paris site at
> http://www.total.net/~jakesp/index.htm
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Eric Frost
> (HRA)
> Sent: November 3, 2000 5:24 PM
> To: [EMAIL PROTECTED]
> Subject: MI-L reading string back in from .ini
> 
> Great List:
> 
> I am saving user's settings for Brushes and Symbols to a file
> and it seems to go great to write it out...
> 
> this line:
> nRet = PutIniString("DefaultBrushes", "Brush1", h_Brush1Value,
> "ThematicMapperEngine.Ini")
> 
> give me this in the .ini file:
> Brush1=Brush (2, 16777215, 16777215)
> 
> which seems good thus far... but I can't seem to figure out how to read this
> string
> back in and assign it to a Brush variable.
> 
> Either when I compile it says incorrect number of arguments for function or
> I get a
> "could not convert data" in the runtime trying different methods.
> 
> I suppose I can use InStr and Mid or whatever string manipulations to parse
> it out
> and reassemble but does not seem elegant.
> 
> Anyone else struggle with this or am I the only idiot ?
> 
> Thanks in advance! E-mail to me I will summarize.
> 
> Eric
> 
> 
> 
> 
> 
> _______________________________________________________________________
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> put "unsubscribe MapInfo-L" in the message body.



_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to