• enumerate methods

    From Ragnarok@VERT/DOCKSUD to DOVE-Net.Sync_JavaScript on Fri Feb 8 22:15:00 2008
    hi all!

    i try to enumerate methos and properties from one object:
    ------------
    function writeln(str)
    {
    write(str + "\n");
    }

    function document_methods(n,obj)
    {
    for(method in obj._method_list) {

    writeln (n + ":method:" +obj._method_list[method].name);
    writeln (n + ":method:" +obj._method_list[method].desc);
    writeln (n + ":method:" +obj._method_list[method].args);
    }
    }

    function document_properties(n,obj)
    {
    for(prop in obj) {
    writeln (n +":prop:" + prop);
    }
    }

    function document_object(n,obj)
    {
    document_methods(n,obj);
    document_properties(n,obj);
    }

    document_object("System",system);
    document_object("Sqlite",new Sqlite("/tmp/base"));
    --------------

    ragnarok@ntbkragnarok:/sbbs/exec$ ./jsexec -n jsfer.js
    System:prop:host_name
    System:prop:socket_lib
    System:prop:uptime
    System:prop:status
    System:prop:errors
    System:prop:action
    System:prop:useron
    System:prop:connection
    System:prop:misc
    System:prop:aux
    System:prop:extaux
    Sqlite:prop:name
    Sqlite:prop:stmt
    Sqlite:prop:debug
    Sqlite:prop:errormsg
    -------------------------------
    is this code wrong or does not enumerate the methods?

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar

    ---
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Deuce@VERT/SYNCNIX to Ragnarok on Fri Feb 8 18:28:00 2008
    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15 am

    is this code wrong or does not enumerate the methods?

    I've never heard of _method_list

    In general though Spidermonkey extensions start and end with an _


    ---
    Synchronet - Jump on the Web 0.2 bandwagon!

    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Digital Man@VERT to Ragnarok on Fri Feb 8 19:27:00 2008
    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15 am

    hi all!

    i try to enumerate methos and properties from one object:

    You can't enumerate methods directly. It appears you're looking at my jsdocs.js, which enumerates a special array (_method_list) that can be created by compiling Synchronet with BUILD_JSDOCS defined. This is not a SpiderMonkey feature, but something specific to Synchronet and will only work with objects using special Synchronet functions (e.g. js_SyncResolve).


    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #182:
    A rainbow can only be seen in the morning or late afternoon.
    Norco, CA WX: 57.0øF, 38% humidity, 2 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Ragnarok@VERT/DOCKSUD to Deuce on Sat Feb 9 06:43:00 2008
    Deuce escribió:

    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15 am

    is this code wrong or does not enumerate the methods?

    I've never heard of _method_list

    In general though Spidermonkey extensions start and end with an _


    ---
    Synchronet - Jump on the Web 0.2 bandwagon!

    ---
    ? Synchronet ? My Brand-New BBS (All the cool SysOps run STOCK!)

    i read it on the jsdocs.js stock file

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar

    ---
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Ragnarok@VERT/DOCKSUD to Digital Man on Sat Feb 9 06:54:00 2008
    Digital Man escribió:

    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15 am

    hi all!

    i try to enumerate methos and properties from one object:

    You can't enumerate methods directly. It appears you're looking at my jsdocs.js, which enumerates a special array (_method_list) that can be created by compiling Synchronet with BUILD_JSDOCS defined. This is not a SpiderMonkey feature, but something specific to Synchronet and will only
    work with objects using special Synchronet functions (e.g.
    js_SyncResolve).


    yes, im read that file as example.
    my objetive was add my Sqlite class to just appear in the jsobjs.html too =( can be possible if i add the functions that you mean?
    im follow research reading the another objects of sync.

    tanks!

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar

    ---
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Angus McLeod@VERT/ANJO to Ragnarok on Fri Feb 8 20:48:00 2008
    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15:00

    function writeln(str)
    {
    write(str + "\n");
    }

    Why do people redefine writeln() ??? It is already defined, not so?

    ---
    Playing: "Baby Get Lost" by "Elysian Fields"
    from the "Dreams That Breathe Your Name" album.
    þ Synchronet þ Making sure Jason works OK at The ANJO BBS
  • From Angus McLeod@VERT/ANJO to Digital Man on Sat Feb 9 10:03:00 2008
    Re: enumerate methods
    By: Digital Man to Ragnarok on Sat Feb 09 2008 00:27:00

    Snapple "Real Fact" #182:
    A rainbow can only be seen in the morning or late afternoon.
    Norco, CA WX: 57.0øF, 38% humidity, 2 mph NE wind, 0.00 inches rain/24hrs

    Hey, you got your WX machine fixed! Cool! (Only just noticed.)

    ---
    Playing: "Live For The Touch" by "Elysian Fields"
    from the "Dreams That Breathe Your Name" album.
    þ Synchronet þ Making sure Jason works OK at The ANJO BBS
  • From Deuce@VERT/SYNCNIX to Angus McLeod on Sat Feb 9 06:53:00 2008
    Re: enumerate methods
    By: Angus McLeod to Ragnarok on Sat Feb 09 2008 01:48 am

    function writeln(str)
    {
    write(str + "\n");
    }

    Why do people redefine writeln() ??? It is already defined, not so?

    It's a recent addition to the console object... possible the same can be said for jsexec or something. Not sure.

    ---
    Synchronet - Jump on the Web 0.2 bandwagon!

    ---
    þ Synchronet þ My Brand-New BBS (All the cool SysOps run STOCK!)
  • From Digital Man@VERT to Angus McLeod on Sat Feb 9 08:40:00 2008
    Re: enumerate methods
    By: Angus McLeod to Digital Man on Sat Feb 09 2008 03:03 pm

    Re: enumerate methods
    By: Digital Man to Ragnarok on Sat Feb 09 2008 00:27:00

    Snapple "Real Fact" #182:
    A rainbow can only be seen in the morning or late afternoon.
    Norco, CA WX: 57.0øF, 38% humidity, 2 mph NE wind, 0.00 inches
    rain/24hrs

    Hey, you got your WX machine fixed! Cool! (Only just noticed.)

    Yeah, but I need a new one and the one I really want will be about $600 total: http://www.davisnet.com/weather/products/weather_product.asp?pnum=06152

    ... which I can't really justify right now, so perhaps I'll just get a small upgrade, like this one:
    http://www.weathershack.com/honeywell/te923w.html


    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #126:
    A pigeon's feathers are heavier than its bones.
    Norco, CA WX: 74.3øF, 32% humidity, 5 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Ragnarok@VERT/DOCKSUD to Angus McLeod on Sat Feb 9 14:29:00 2008
    Angus McLeod escribió:

    Re: enumerate methods
    By: Ragnarok to DOVE-Net.Sync_JavaScript on Sat Feb 09 2008 03:15:00

    function writeln(str)
    {
    write(str + "\n");
    }

    Why do people redefine writeln() ??? It is already defined, not so?

    ---
    Playing: "Baby Get Lost" by "Elysian Fields"
    from the "Dreams That Breathe Your Name" album.
    ? Synchronet ? Making sure Jason works OK at The ANJO BBS
    jajaj! yes! =) i need to update te scripts.

    --
    Dock Sud BBS
    http://bbs.docksud.com.ar
    telnet://bbs.docksud.com.ar

    ---
    þ Synchronet þ Dock Sud BBS TLD 24 HS - http://www.docksud.com.ar - telnet://bbs.docksud.com.ar
  • From Angus McLeod@VERT/ANJO to Deuce on Sat Feb 9 15:12:00 2008
    Re: enumerate methods
    By: Deuce to Angus McLeod on Sat Feb 09 2008 11:53:00

    function writeln(str)
    {
    write(str + "\n");
    }

    Why do people redefine writeln() ??? It is already defined, not so?

    It's a recent addition to the console object... possible the same can be sai for jsexec or something. Not sure.

    Ah! I see. Legacy code.

    ENVIRONMENT DIVISION.
    INPUT-OUTPUT SECTION.
    FILE-CONTROL.
    SELECT InputFile ASSIGN TO "USER.DAT"
    ORGANIZATION IS LINE SEQUENTIAL.
    SELECT WorkFile ASSIGN TO "WORK.TMP".

    DATA DIVISION.
    FILE SECTION.
    FD StudentFile.
    01 StudentDetails
    02 UserId PIC 9(7).
    02 UserName.
    03 Surname PIC X(8).
    03 Initials PIC XX.
    02 DateOfBirth.
    03 YOBirth PIC 9(4).
    03 MOBirth PIC 9(2).
    03 DOBirth PIC 9(2).
    02 UsageCode PIC X(4).
    02 Gender PIC X.

    . . .
    . . .

    :-)

    ---
    Playing: "The child is gone" by "Fiona Apple" from the "Tidal" album.
    þ Synchronet þ Making sure Jason works OK at The ANJO BBS
  • From Angus McLeod@VERT/ANJO to Digital Man on Sat Feb 9 15:19:00 2008
    Re: enumerate methods
    By: Digital Man to Angus McLeod on Sat Feb 09 2008 13:40:00

    Norco, CA WX: 57.0øF, 38% humidity, 2 mph NE wind, 0.00 inches rain/24hrs

    Hey, you got your WX machine fixed! Cool! (Only just noticed.)

    Yeah, but I need a new one and the one I really want will be about $600 tota http://www.davisnet.com/weather/products/weather_product.asp?pnum=06152

    Hey, that's pretty sweet!

    ... which I can't really justify right now, so perhaps I'll just get a small upgrade, like this one:
    http://www.weathershack.com/honeywell/te923w.html

    That's not bad either!

    I'd like to set up a system at our club that transmitted the data quite a distance, so I'm thinking some sort of cellular transmission. Trouble is,
    we have a power budget. There is only 12v DC power available on-site, maintained by a solar panel. Neither the battery nor the panel are in the best shape, so running anything complex and power-hungry is really not on.

    ---
    Playing: "Carrion" by "Fiona Apple" from the "Tidal" album.
    þ Synchronet þ Making sure Jason works OK at The ANJO BBS
  • From Digital Man@VERT to Angus McLeod on Sat Feb 9 12:20:00 2008
    Re: enumerate methods
    By: Angus McLeod to Digital Man on Sat Feb 09 2008 08:19 pm

    Re: enumerate methods
    By: Digital Man to Angus McLeod on Sat Feb 09 2008 13:40:00

    Norco, CA WX: 57.0øF, 38% humidity, 2 mph NE wind, 0.00 inches rain/24hrs

    Hey, you got your WX machine fixed! Cool! (Only just noticed.)

    Yeah, but I need a new one and the one I really want will be about $600 tota http://www.davisnet.com/weather/products/weather_product.asp?pnum=06152

    Hey, that's pretty sweet!

    ... which I can't really justify right now, so perhaps I'll just get a small upgrade, like this one: http://www.weathershack.com/honeywell/te923w.html

    That's not bad either!

    I'd like to set up a system at our club that transmitted the data quite a distance, so I'm thinking some sort of cellular transmission. Trouble is, we have a power budget. There is only 12v DC power available on-site, maintained by a solar panel. Neither the battery nor the panel are in the best shape, so running anything complex and power-hungry is really not on.

    Some of the better systems can store cumulative data and then transmit it periodically using modem or TCP/IP. Do you have a land line anywhere near the club house? (if it's the same club house I visited with you, I'm guessing "not").

    digital man (xbox-live: digitlman)

    Snapple "Real Fact" #186:
    A female kangaroo is called a Flyer.
    Norco, CA WX: 68.9øF, 35% humidity, 0 mph NE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Angus McLeod@VERT/ANJO to Digital Man on Sat Feb 9 17:58:00 2008
    Re: enumerate methods
    By: Digital Man to Angus McLeod on Sat Feb 09 2008 17:20:00

    Some of the better systems can store cumulative data and then transmit it periodically using modem or TCP/IP. Do you have a land line anywhere near th club house? (if it's the same club house I visited with you, I'm guessing "not").

    No, we don't. I was thinking of the NEW clubhouse, soon (hopefully) to be under construction. No phone there either.

    Amateur packet radio is a possibility, but you're talking some sort of computer, and a transmitter in the 144 MHz band, most likely. Power
    budget rears it's head again. Also, the sub-harmonic of 144 MHz falls directly in the R/C Air band at 72 MHz. I'd hate the system to initiate a transfer and cause some guy to crash his new plane!

    Oh well...

    ---
    Playing: "Itchy Glowbo" by "Cocteau Twins" from the "Blue bell knoll" album.
    þ Synchronet þ Making sure Jason works OK at The ANJO BBS