• file.iniGetObject()

    From MCMLXXIX@VERT/MDJ to Digital Man on Mon Sep 13 17:30:23 2010
    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of an empty object if the section "section" doesn't exist in the file?

    It's kind of a pain to work around that.

    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Digital Man@VERT to MCMLXXIX on Tue Sep 14 23:32:06 2010
    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of an empty object if the section "section" doesn't exist in the file?

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. Now, one caveat is that the method will return null/undefined if the specified section doesn't exist in the .ini file *or* it contains no keys/values. The second condition may prove to be a problem for some scripts. We'll have to see.

    digital man

    Snapple "Real Fact" #93:
    A Kangaroo can jump 30 feet.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MCMLXXIX@VERT/MDJ to Digital Man on Wed Sep 15 03:22:49 2010
    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Tue Sep 14 2010 16:32:06

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of an empty object if the section "section" doesn't exi in the file?

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. Now, one cavea is that the method will return null/undefined if the specified section doesn exist in the .ini file *or* it contains no keys/values. The second condition may prove to be a problem for some scripts. We'll have to see.


    hmm. there's no way to have it both ways?

    e.g. empty object if the section exists with no keys/values, and null/undefined if it's not there at all


    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Digital Man@VERT to MCMLXXIX on Mon Sep 20 22:14:14 2010
    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Tue Sep 14 2010 08:22 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Tue Sep 14 2010 16:32:06

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of an empty object if the section
    "section" doesn't exi in the file?

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. Now, one cavea is that the method will return null/undefined if the specified section doesn exist in the .ini file *or* it contains no keys/values.
    The second condition may prove to be a problem for some scripts. We'll have to see.


    hmm. there's no way to have it both ways?

    e.g. empty object if the section exists with no keys/values, and null/undefined if it's not there at all

    I think I would prefer that behavior. How about you?

    digital man

    Snapple "Real Fact" #94:
    Lizards communicate by doing push-ups.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MCMLXXIX@VERT/MDJ to Digital Man on Tue Sep 21 04:58:34 2010
    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Mon Sep 20 2010 15:14:14

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Tue Sep 14 2010 08:22 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Tue Sep 14 2010 16:32:06

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of an empty object if the section "section" doesn't exi in the file?

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. Now, one cavea is that the method will return null/undefined if the specified section doesn exist in the .ini file *or* it contains no keys/values. The second condition may prove to be a problem for some scripts. We'll have to see.


    hmm. there's no way to have it both ways?

    e.g. empty object if the section exists with no keys/values, and null/undefined if it's not there at all

    I think I would prefer that behavior. How about you?


    certainly.. saw the commit, thanks!





    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)
  • From Digital Man@VERT to MCMLXXIX on Wed Sep 22 21:40:11 2010
    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 20 2010 09:58 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Mon Sep 20 2010 15:14:14

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Tue Sep 14 2010 08:22 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Tue Sep 14 2010 16:32:06

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling
    file.iniGetObject("section"); returned undefined instead of an empty object if the section "section" doesn't exi in the file?

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. Now, one cavea is that the method will return null/undefined if the specified section doesn exist in the .ini file *or* it contains no keys/values. The second condition may prove to be a problem for some scripts. We'll have to see.


    hmm. there's no way to have it both ways?

    e.g. empty object if the section exists with no keys/values, and null/undefined if it's not there at all

    I think I would prefer that behavior. How about you?


    certainly.. saw the commit, thanks!

    Cool. Are you able to build and test?

    digital man

    Snapple "Real Fact" #173:
    Chinese is the most spoken language in the world.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From MCMLXXIX@VERT/MDJ to Digital Man on Thu Sep 23 06:21:32 2010
    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Wed Sep 22 2010 14:40:11

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 20 2010 09:58 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Mon Sep 20 2010 15:14:14

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Tue Sep 14 2010 08:22 pm

    Re: file.iniGetObject()
    By: Digital Man to MCMLXXIX on Tue Sep 14 2010 16:32:06

    Re: file.iniGetObject()
    By: MCMLXXIX to Digital Man on Mon Sep 13 2010 10:30 am

    Would it break anything if calling file.iniGetObject("section"); returned undefined instead of a empty object if the section "section" doesn't exi in the file

    It's kind of a pain to work around that.

    I just committed a change to do that, try it and let me know. No one cavea is that the method will return null/undefined if the specified section doesn exist in the .ini file *or* it contains keys/values. The second condition may prove to be a problem for some scripts. We'll have to see.


    hmm. there's no way to have it both ways?

    e.g. empty object if the section exists with no keys/values, and null/undefined if it's not there at all

    I think I would prefer that behavior. How about you?


    certainly.. saw the commit, thanks!

    Cool. Are you able to build and test?


    I will have a go at it tomorrow





    ---
    þ Synchronet þ The BRoKEN BuBBLE (MDJ.ATH.CX)