Page 1 of 1

What IDs must be different?

Posted: Wed Sep 11, 2024 6:40 pm
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
...

Re: What IDs must be different?

Posted: Wed Sep 11, 2024 7:13 pm
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

Re: What IDs must be different?

Posted: Wed Sep 11, 2024 7:35 pm
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

Re: What IDs must be different?

Posted: Wed Sep 11, 2024 8:54 pm
by jacdelad
Basically one for each library.

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 4:59 pm
by boddhi
@Caronte3D
I haven't investigated, but the JSON lib is also missing from your list. :wink:

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 6:59 pm
by Caronte3D
I added JSON (sounds coherent to me) but it's not in the "oficial" list.

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 7:03 pm
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.

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 7:21 pm
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.

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 7:56 pm
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...

Re: What IDs must be different?

Posted: Thu Sep 12, 2024 9:57 pm
by Caronte3D
:mrgreen: