Direct type access

Blitz3D Forums/Blitz3D Programming/Direct type access

slenkar(Posted 2003) [#1]
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.


EricZann(Posted 2003) [#2]
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).


Beaker(Posted 2003) [#3]
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$.


EricZann(Posted 2003) [#4]
The problem is that Object() is an undocumented feature, which means it could easily change or even vanish altogether in future updates to Blitz.


Drago(Posted 2003) [#5]
I doubt that it will it has been around since the wheel, and if it gets removed alot of people will complain. :)


Ross C(Posted 2003) [#6]
You ppl worry too much, it's christmas!!!


puki(Posted 2003) [#7]
Do you have Christmas in Scotland?


Ross C(Posted 2003) [#8]
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!!


puki(Posted 2003) [#9]
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


Ross C(Posted 2003) [#10]
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!


Hotcakes(Posted 2003) [#11]
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.


Who was John Galt?(Posted 2003) [#12]
Ross is talking tosh - a haggis is a small furry creature that looks like a set of bagpipes ; )


Ross C(Posted 2003) [#13]
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 :)