Subj : ptridx in msg_area.grp_list.sub_list To : deon From : Digital Man Date : Tue Dec 03 2024 09:30:30 Re: ptridx in msg_area.grp_list.sub_list By: deon to Digital Man on Tue Dec 03 2024 09:32 pm > Re: ptridx in msg_area.grp_list.sub_list > By: Digital Man to deon on Mon Dec 02 2024 11:29 pm > > Howdy, > > > The best way to uniquely identify a sub-board is via its internal code. > > Then can also reference a sub quickly/easily via > > msg_area.sub[internal_code]. > > Yeah, that's not helping me with what I'm wanting. internal_code's can be > changed, which would throw off what I'm trying to do. Technically, pointer file indexes can be changed (in SCFG) too. Changing a sub's internal code (once the sub has messages, is in use) is not normally recommended, but I don't have the "Danger!" warnings in SCFG like I do for the pointer file index. > Sorry, you've given me other answers to my question, so I want to confirm - > and I'll create an example. > > Lets say I have Sub Board "foo" (internal code GRP-FOO), which in scfg you > edit that sub board, under "Advanced Options", its states "Point File Index" > and a number, eg: 23. > > This number 23 corresponds to a JS object call to > msg_area.grp_list[x].sub_list[y].ptridx with a value of 23. ("y" is not > necessary 23), that is this Sub Board - correct? Correct. > So "foo" will always have ptridx = 23 until it is deleted - correct? Correct. > Nothing else will result in that value being changed? Not automatically, no, but there is that SCFG options... :-) > If I was to go through all the results of msg_area.grp_list[x].sub_list - > only 1 will have a value of ptridx=23, which is this sub board? Correct. > I see you are planning other things with (other?) instances of ptridx - are > you planing on getting rid of this value in the sub board config too? SBBS only uses the sub ptridx for one use case currently, and that use case is on the chopping block (issue #832). I can leave the property/config option if there are other uses for sub's ptridx however. But I still think the sub's internal code is the best "unique identifier" for a sub-board. -- digital man (rob) This Is Spinal Tap quote #17: David St. Hubbins: It's such a fine line between stupid, and uh... and clever. Norco, CA WX: 58.3øF, 51.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.23-Linux * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705) .