Hey all!
Doing my best to learn Window related classes at the moment.
And I've come across this method in VX Ace for the Window_MenuStatus class:
Please note:
There is a public instance variable in this class called pending_index (or @pending_index)
------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As the title suggests, I'm not sure what that "=" is doing in the method name for def pending_index=(index)
Is it that it's:
a) Just a naming choice and doesn't change the method in any meaningful way?
b) Maybe something to do with making @pending_index equal to the established (index)?
c) Something else I'm not quite getting?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm thinking it's just a naming choice as there is a line IN that method that makes @pending_index equal to (index) as well.
But, as it looks like this method isn't called by anything anywhere else in the entire Script Editor, I was thinking maybe that equals sign did something special?
Thanks for any help as always,
- Your favourite up and coming scripter 😛, The_Sarah
Doing my best to learn Window related classes at the moment.
And I've come across this method in VX Ace for the Window_MenuStatus class:
Ruby:
#--------------------------------------------------------------------------
# * Set Pending Position (for Formation)
#--------------------------------------------------------------------------
def pending_index=(index)
last_pending_index = @pending_index
@pending_index = index
redraw_item(@pending_index)
redraw_item(last_pending_index)
end
There is a public instance variable in this class called pending_index (or @pending_index)
------------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As the title suggests, I'm not sure what that "=" is doing in the method name for def pending_index=(index)
Is it that it's:
a) Just a naming choice and doesn't change the method in any meaningful way?
b) Maybe something to do with making @pending_index equal to the established (index)?
c) Something else I'm not quite getting?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm thinking it's just a naming choice as there is a line IN that method that makes @pending_index equal to (index) as well.
But, as it looks like this method isn't called by anything anywhere else in the entire Script Editor, I was thinking maybe that equals sign did something special?
Thanks for any help as always,
- Your favourite up and coming scripter 😛, The_Sarah