how to use userdata not shown in examples

Feature requests for future versions of Hollywood can be voiced here
Post Reply
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

how to use userdata not shown in examples

Post by Bugala »

I checked both MakeButton as well as SetInterval, which both can handle userdata, but neither of them give example on how to access that userdata. I did figure it out myself in both cases, but it would be good to have example in manual about using them.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: how to use userdata not shown in examples

Post by airsoftsoftwair »

Huh? Both the documentation on SetInterval() and MakeButton() explicitly mention that user data is passed through the event callback message...
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: how to use userdata not shown in examples

Post by Bugala »

Ah, i see now: "Your interval function will be called by Hollywood with one parameter. The parameter is a message table which contains two fields: "

But I would still suggest you make also example about the usage.

For even after seeing this message it still took me a while to find that piece of text.

Problem is that when I am looking for information on something, I dont start reading everything, but try to read only the relevant piece of text.

In setinterval documentarys case i read all the places where it read "userdata:", this piece of text however is in introduction part and in such place that it isnt obvious to be there when trying to read quick, so when skimming through i missed it twice, first time when i was looking for it for the first time, and second time after i had read your reply. It was only at third time, when i was reading all the text in setinterval that i finally saw it. So problem wasnt that it wasnt there, problem was that it wasnt easy enough to find. But by having example code showing it would help to speed up finding the answer, especially for beginner.
Post Reply