What IDs must be different?

Just starting out? Need help? Post your questions and find answers here.
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

What IDs must be different?

Post by Caronte3D »

I know we can do:
OpenWindow(0 ...
ButtonGadget(0 ...
We can use the same number (ex: 0) because Windows and Gadgets are different things, but... what are the whole list where we *must* use different numbers for the same "family"?

Window
Gadget
File
Menu
...
User avatar
TI-994A
Addict
Addict
Posts: 2751
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: What IDs must be different?

Post by TI-994A »

Caronte3D wrote: Wed Sep 11, 2024 6:40 pm... what are the whole list where we *must* use different numbers for the same "family"?

Window
Gadget
File
Menu
...

Here's the comprehensive list:
> Overview of the different PureBasic objects
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: What IDs must be different?

Post by Caronte3D »

Thanks TI-994A :wink:

Code: Select all

- Database
- Dialog
- Entity
- File
- FTP
- Gadget (including the ScintillaGadget())
- Gadget3D
- Image
- JSON
- Library
- Light
- Mail
- Material
- Menu (not MenuItem(), as this is no object)
- Mesh
- Movie
- Music
- Network
- Node
- Particle
- RegularExpression
- SerialPort
- Sound
- Sound3D
- Sprite
- StatusBar
- Texture
- ToolBar
- Window
- Window3D
- XML
Last edited by Caronte3D on Thu Sep 12, 2024 6:57 pm, edited 1 time in total.
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: What IDs must be different?

Post by jacdelad »

Basically one for each library.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
boddhi
Enthusiast
Enthusiast
Posts: 524
Joined: Mon Nov 15, 2010 9:53 pm

Re: What IDs must be different?

Post by boddhi »

@Caronte3D
I haven't investigated, but the JSON lib is also missing from your list. :wink:
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: What IDs must be different?

Post by Caronte3D »

I added JSON (sounds coherent to me) but it's not in the "oficial" list.
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: What IDs must be different?

Post by Caronte3D »

jacdelad wrote: Wed Sep 11, 2024 8:54 pm Basically one for each library.
I don't think so.
There are many more libraries that don't require any ID.
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: What IDs must be different?

Post by mk-soft »

PB-Help CreateJSON(#JSON [, Flags])
#JSON A number to identify the new JSON. #PB_Any can be used to auto-generate this number.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
jacdelad
Addict
Addict
Posts: 2031
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: What IDs must be different?

Post by jacdelad »

Caronte3D wrote: Thu Sep 12, 2024 7:03 pm
jacdelad wrote: Wed Sep 11, 2024 8:54 pm Basically one for each library.
I don't think so.
There are many more libraries that don't require any ID.
Oh, come on...I meant each library (which uses IDs) has it's own scope. Of course the libraries which don't use IDs, don't need them...
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: What IDs must be different?

Post by Caronte3D »

:mrgreen:
Post Reply