AbtIni

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

AbtIni

Postby totallyobjects » Sun May 31, 2009 2:35 am

I am trying to use AbtIni to read windows Ini files. This works really well but I have found in packaging that it seems to have EtTools as a pre-req. and thus cannot be packaged.

I could do with a bit of help in how to access Ini files without have EtTools involved?

Or maybe I have missed something, of course.
David
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: AbtIni

Postby wembley » Mon Jun 01, 2009 11:56 am

David -

The answer to your question depends on what .INI file you want to read.

EmSystemConfiguration has methods for accessing the system .INI (the .INI that is read automatically when your image starts). If you are trying to get information from this .INI, then these methods are the ones to use since they access the in-memory contents of the .INI file.

AbtIni (buried in the AbtOdbcSamplesApp) can be used to access ANY file that is created using .INI syntax (stanza names in [ ] followed by keyword=value lines). AbtIni itself doesn't need any code from EtTools, but other code in the app does. So one thing you could do is create a TobIni class in one of your apps and copy all the methods from AbtIni to this new class. Or you could ask us to move AbtIni to somewhere where it can be more generally useful. AbtIni was created for a specific purpose -- to read the ODBC.INI file that is used by the ODBC samples, so it may not be feature-complete for your purposes.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC

Re: AbtIni

Postby totallyobjects » Thu Jun 11, 2009 3:54 am

I really don't have an issue and have built ini classes before, just not using the OS tools that you use. I was just interested in why it was done the way that it is.

I think that the suggestion that I rebuild it as TOIni is the best idea for now.

David
totallyobjects
[|]
 
Posts: 27
Joined: Wed May 27, 2009 12:57 am

Re: AbtIni

Postby wembley » Thu Jun 11, 2009 4:24 am

David -

Somewhere in the 'way way back time', whoever wrote the ODBC samples needed to read an .ini file. There wasn't a general .ini file reader available in the product, so they wrote one that did what they needed it to do and put it in the sample app. I wouldn't be surprised to find at least one other .ini reader buried somewhere is an out-of-the-way app.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest