Author Topic: Beta testers needed for odcl_*ini functions  (Read 7064 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Beta testers needed for odcl_*ini functions
« on: June 19, 2007, 07:40:33 AM »
This should behave like doslib’s

Code: [Select]
(odcl_getini "settings" "strings" "c:\\temp\\test.ini" "default")
(odcl_getini "settings" "strings" "c:\\temp\\test.ini")
(odcl_getini "settings" nil "c:\\temp\\test.ini" )
(odcl_getini nil nil "c:\\temp\\test.ini" )

Code: [Select]
(odcl_setini "settings" "strings1" "value1" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings2" "value2" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings3" "value3" "c:\\temp\\test.ini")
(odcl_setini "settings" "strings2" nil "c:\\temp\\test.ini")
(odcl_setini "settings" nil nil "c:\\temp\\test.ini")

Thanks :-)
« Last Edit: June 20, 2007, 12:48:56 PM by Danielm103 »

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Beta testers needed for odcl_*ini functions
« Reply #1 on: June 19, 2007, 11:50:03 AM »
Daniel, INI files can be read and written via lisp, so what is the advantage of writing them in C++?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Beta testers needed for odcl_*ini functions
« Reply #2 on: June 19, 2007, 12:12:17 PM »
Hi Owen,

An ODCL user requested I put this together,
I suppose this would be up to the community to decide if it finally does become a part of OpenDCL?


Dan

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #3 on: June 19, 2007, 12:43:54 PM »
I think a AutoLisp library of ``supported'' or ``recommended'' methods should/could be put together for use instead of `functions'. -i.e. a set of functions is great, but tends to cause steeper learning curves (The Scheme language was kept `simple' for a reason--I say learn from their example).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Beta testers needed for odcl_*ini functions
« Reply #4 on: June 19, 2007, 12:56:00 PM »
Well it had already been done in a closed source c++ project. It was thought it would be useful in odcl
Window’s WritePrivateProfileString and GetPrivateProfileString are fast and efficient methods of providing this functionality to lisp
« Last Edit: June 19, 2007, 12:57:34 PM by Danielm103 »

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #5 on: June 19, 2007, 01:00:56 PM »
Is this for binary write/read?
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Beta testers needed for odcl_*ini functions
« Reply #6 on: June 19, 2007, 01:06:22 PM »
Nope good ol text .INI stuff, This certainly could be done with lisp with a good bit of code

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #7 on: June 19, 2007, 01:17:44 PM »
I dont think i totaly understand, but ok.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Beta testers needed for odcl_*ini functions
« Reply #8 on: June 19, 2007, 06:28:22 PM »
I asked Daniel if he had this functionality, with a view to adding it to the OpenDCL build.

Sorry for any wasted time I caused you Daniel.

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Beta testers needed for odcl_*ini functions
« Reply #9 on: June 20, 2007, 01:54:20 AM »
Sorry for any wasted time I caused you Daniel.

Not a waste of time, but a pleasurable learning experience and IMO a valuable tool for the lisper’s toolbox.

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #10 on: June 20, 2007, 01:40:12 PM »
Despite my initial thought of using a lisp lib proced for this task, i do think this could be a very valuable tool. Also I have a few more questions on this tool.

Can you document the args; i dont use doslib.

What version is this compiled for?

Can we add a feature or two? (like read and write to binary)
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Beta testers needed for odcl_*ini functions
« Reply #11 on: June 20, 2007, 05:31:37 PM »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #12 on: June 20, 2007, 05:38:11 PM »
*click* ... *gasp!*

Thanx!!
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8690
  • AKA Daniel
Re: Beta testers needed for odcl_*ini functions
« Reply #13 on: June 20, 2007, 09:16:42 PM »

Can you document the args; i dont use doslib.

Since the proggy is just calling the Win API methods WritePrivateProfileString and GetPrivateProfileString,
until I get something written up, please checkout
http://msdn2.microsoft.com/en-us/library/ms725501.aspx
and
http://msdn2.microsoft.com/en-us/library/ms724353.aspx


What version is this compiled for?

The arx is compiled for Acad 2007+ , but I can make builds for other versions too if needed
If it does not make it into odcl, I will post versions for Acad 2000 – 2008 and Intellicad.

JohnK

  • Administrator
  • Seagull
  • Posts: 10625
Re: Beta testers needed for odcl_*ini functions
« Reply #14 on: June 21, 2007, 09:33:33 AM »
good'nuff Thanx dude
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org