How to use "For Each" tag loop on each object
-
@Deeeds ok, this is how I did it in my project. Basically, when there is a “request” for a spawned object(in this case the mate wanting a buddy), the wanted ID is added to an array. That array holds all the requests. The array then takes the first index(that would be the oldest request, assuming you append the requests) and spawns the object and then the object sets its ID based on the value in the array, then triggers the array to spawn the next object. But don use the project I gave the link for, because I just realized that it isn’t right....at ALL! I need to fix it.
I’ll make a loop example.
-
@Deeeds so you want it to loop through objects and add there positions to an array? Right?
-
@Murtaza There was a movement to define and steadily and increasingly make a meaningful and less ambiguous and scattered approach/definition to use of the word "Type" in programming over the last few years.
The result is this:
Value Types and Reference Types on the one hand, and the type of objects (lower case) on the other.
Value Types get copied on assignment. Things like functional programming rely on this, almost in exclusivity, it would seem.
Reference Types we've already discussed, are those that point to the original... a reference.
Within reference Types there is the type of object, as defined by its class. Notice I'm using a lower case t for this definition of type.
I'm generally and genuinely curious.
What is a Value type of array in hyperPad. I know you say it's a JSON something... then your writing gets lost and I lose any hope of understanding what you're on about.
JSON arrays are, generally speaking, of only one type of object. Be it ints, strings, whatever... so not altogether dissimilar from any other array in most other languages that are not JavaScript, and those few really dynamic environments where an array can contain a lot of different types. This is, if I remember rightly, one of the only real reasons JavaScript needed JSON arrays, so that it could be sure of what type was in the array, and only that type.
I don't really get what you've done here. Sometimes your Value type array works as a normal array might. Other times it does things I can't explain, or simply doesn't respond. And I'm sorry, I don't understand the documentation on the matter, at all, thin as it is.
-
@Deeeds here! http://bit.ly/2jKzU7X
-
@iTap-Development THANK GOODNESS I DID NOT LOOK AT THAT PROJECT.
I'm already confused enough about arrays and spawning and IDs in this clusterfuck of an environment.
Not having references and instances is doing my head in.
-
@iTap-Development Again, just explain WHY it's better. You've done the hard part, explaining how it works.
-
@iTap-Development and tell me why my way is inferior or suboptimal. Cause my way works. And circumvents the problems I've had with hyperPad so far.
-
@Deeeds I did explain how it works.
-
@iTap-Development explaining how something works, yes. I know. I acknowledged that you did that.
WHY is your way better?
Why is my way lesser?
-
@Deeeds simply that your way seems like more hassle, and uses more behaviors than are needed.
-
@iTap-Development On the contrary. My way is far less hassle.
It's a factory based on the Index. That's the first point I made, that my way is lean, mean and SIMPLE!
Pump out units, use index as ID by virtue of the position property, no communications required, no array of IDs required, nothing. Just pump them out and stamp them with the index via position.
AND QUICK!.
-
@Deeeds ok! To each there own. Or should I say, for each? Did you check out the project?
-
Oops I forgot To post it!
http://bit.ly/2jKzU7X -
@iTap-Development How do I get to this forum in the App?
-
-
@iTap-Development Nevermind, found it It's the ULTRA thing, ridiculous helvetica nueue uber thin text at the bottom.
Another thing that passed focus group testing, I suppose.
-
@Deeeds get your eyes checked, maybe?😁
-
Why am I not surprised?
-
@Deeeds you can’t click the download links in the forum. You have to open in safari.
-
@iTap-Development seriously?
What year is it?