Direct type access
Blitz3D Forums/Blitz3D Programming/Direct type access
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=216 Can someone explain this to me? I think it has something to do with entityname but I cant see what he is doing. |
| ||
Eek. He is using an undocumented feature of Blitz (not recommended!) The 'Object' allows some kind of direct access to Blitz's internal list of entities. I don't quite understand how the Object.entity(name) works, but his code implies that it returns the object which has that name, and does it faster than the normal method (simply searching through the list of current entities). |
| ||
There is nothing wrong with what he is doing. He is using the entity name to the store the Handle() number. And then quickly retrieving the Type object from the entity name using Object(). Fairly simple really. He is storing the real entity name in the type object \name$. |
| ||
The problem is that Object() is an undocumented feature, which means it could easily change or even vanish altogether in future updates to Blitz. |
| ||
I doubt that it will it has been around since the wheel, and if it gets removed alot of people will complain. :) |
| ||
You ppl worry too much, it's christmas!!! |
| ||
Do you have Christmas in Scotland? |
| ||
Uhhhh!!!! Of course we do. You must have some sort of impressions we all dance about in kilts and sing daft songs... where as we just really all get pissed!! |
| ||
I have an impression of innocent haggises being fattened up for the slaughter. Are they sort of Gerbil things? Help, help, save Santa!! Stop wriggling Santa, you'll be dead soon enough |
| ||
lol a haggis is like the insides of an animal...well, there was somewhere weher i got confused and they had haggies walking about, which started me doubted my sanity.... Santa, right my other thread for me resucing you! |
| ||
EricZann, I wouldn't worry too much. Handle and Object have both been around a very long time and have not as yet changed since their existance. If they are to ever become incompatible, it would be with the invent of BlitzMax I reckon. Which is also a way off ;] For now, they are both very useful. |
| ||
Ross is talking tosh - a haggis is a small furry creature that looks like a set of bagpipes ; ) |
| ||
Lol :D, don't get me confused again :S On topic tho, i don't really see any reason for Mark to take them out. Wouldn't make sense, especially since ppl use them :) |