Subj : Javascript weirdness To : Digital Man From : deon Date : Mon Apr 18 2022 11:21:19 Re: Javascript weirdness By: Digital Man to deon on Sun Apr 17 2022 05:02 pm > > if (! this.msgbase.open('r')) { > What significance is this 'r'? I don't think that'll have any effect. Ahh thanks - I just assummed I needed to open it 'r' for read only and 'r+' for read write. I see in the spec that it doesnt take any arguments. > > writeln(ma.areas[i].code+' cannot be opened?'); > 'ma' and 'i' don't appear to be defined in this scope. I don't this error handler is going to execute as intended. Thanks, a hang over from before it was in the object. > > write(); // Needed else this is not working? > That's pretty strange. It is. I'm seeing this in a few places (when parsing throught the output of get_all_msg_headers(). The strange thing is, without it its reporting a different numbers of results. For example, if I'm searching for the message with tags "1826" it doesnt show unless I have the write() statement there. > > It reports 36 (which is correct). If I comment out the "write()" in the function list_tagged, it reports 25. Why? (And I have > > confirmed > > that 23 of the 25 do have a "tags" header.) > > Woudn't 23 be the right answer then? No - and actually a typo. In the message base, there are 38 messages. 36 are tagged (which is correct), and 2 are not (which are the two errors I referred to earlier). When I remove that "write()", I get a list of 15 untagged - and 13 of those 15 *do* have tags. (And if I put any debugging "write" statements to test the logic, I only get the 2.) The strange thing, I'm wondering if it is some memory buffer corruption. I'm sure when I started removing my writeln debug comments, that it was returning a list of 37 of 38, now it is only selecting 15 (and always the same 15). I'll remove some of the tags and re-add them and see what happens. > If put_msg_header() returns false, the details will be contained in MsgBase.error and MsgBase.status. Check/log those property values > upon error. Ahh thanks, I did that and it reports. ERROR:"smb_putmsghdr illegal header length increase: 261 (2 blocks, 11 hfields, 2 dfields) vs 253 (1 blocks)" And the only thing I'm doing is setting msg.tags = "xxxx" after a "var msg = this.msgbase.get_msg_header(msgs[x].number, /* expand: */false)" What's that error mean? ....лоеп --- ю Synchronet ю Alterant | an SBBS in Docker on Pi! * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .