Is "this.stations" deprecated? - SOLVED

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Is "this.stations" deprecated? - SOLVED

Post by Lestradae »

And if yes, what is supposed to replace it?

The hyperradio.oxp for example suffers from that ...

/report

L
Last edited by Lestradae on Sat Sep 26, 2009 7:37 pm, edited 1 time in total.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Not deprecated. It never existed.

There is a Station class in JS, but not a Stations class.

Probably some OXP uses stations as a global variable, which would read this.stations inside the OXP?
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Yupp. The Hyperradio uses a property this.stations that holds the number of available playlists :-)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Thanks, guys, aha!

The log I get looks as follows:
[script.javaScript.warning.undefinedProp]: ----- JavaScript warning ("hyperradio" 1.14): reference to undefined property this.stations
Can't see any problem ingame with the functionality, any ideas what I might be getting wrong/not understand here?

8)

L
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: ..

Post by Svengali »

Lestradae wrote:
The log I get looks as follows:
[script.javaScript.warning.undefinedProp]: ----- JavaScript warning ("hyperradio" 1.14): reference to undefined property this.stations
Can't see any problem ingame with the functionality, any ideas what I might be getting wrong/not understand here?
Yupp, you've simply missed two things.
a) hyperradio v1.14 is old and written in v1.72. Latest version is v1.16.
b) Oolite has changed. I'd think that you are using a trunk-version. This part of the script isn't called at all - so the script will fail.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Thanks again, upgrading now :D
Post Reply