I think I already have read this wish to make the ID for AllocateMemory(), OpenWindow(), etc. optional to work only with the pointer, but I didn't find a topic for it.
This would REALLY be useful especially for shared procedures. So procedures here in the forum or in your own program could easily copied&pasted and would just work, especially when you want to allocate lots of different memoryblocks inside them.
It's very unconvenient to handle the IDs when not needed.
At the moment I use GlobalAlloc_() but that is Windows only.
If this is not possible to implement, perhaps a function such as NextFreeMemoryID(), NextFreeOpenWindowID(), NextFreeFileID(), etc. was.
It should return the next available not-already-used ID.
Of course this might cause the conflict that then the program tries to use this ID explizit somewhere in the following, but it's not as bad as before.
Is this planned for a future version ? Pleeeeaaassee ?
EDIT:
Perhaps use a constant named #PB_UNHANDLED with value -1 for these functions ?
...optional IDs for AllocateMemory(), etc.
-
- Enthusiast
- Posts: 423
- Joined: Fri Apr 25, 2003 5:22 pm
- Contact:
...optional IDs for AllocateMemory(), etc.
%1>>1+1*1/1-1!1|1&1<<$1=1
-
- Enthusiast
- Posts: 423
- Joined: Fri Apr 25, 2003 5:22 pm
- Contact: