#209 ability to prototype predefined sphere objects

open
nobody
engine (98)
1
2004-06-20
2004-02-15
Anonymous
No

we can prototype default javascript objects like Array &
Math, but we can't prototype sphere objects like font,
windowstyle, etc. i (& maybe others) would like to be
able to write code that would be prototyped into an
object instead of writing a function that would reference
that object. (example:)<br>
[code]
function Text_Box(f, ws, txt) {
ws.drawWindow(16,16, GetScreenWidth(), 50);
f.drawText(16,16,txt);
}
[/code]
would become
[code]
font.prototype.Text_Box = function(ws, txt) {
ws.drawWindow(16,16, GetScreenWidth(), 50);
this.drawText(16,16,txt);
}
[/code]
etc.
-N e o L o g i X

Discussion

  • Brian Robb

    Brian Robb - 2004-02-16
    • labels: --> engine
    • priority: 5 --> 3
     
  • Brian Robb

    Brian Robb - 2004-02-16

    Logged In: YES
    user_id=387078

    I don't see this as a high priority.

     
  • Brian Robb

    Brian Robb - 2004-06-20
    • priority: 3 --> 1
     
  • Brian Robb

    Brian Robb - 2004-06-20

    Logged In: YES
    user_id=387078

    Seems like alot of work for no real reason.
    Not going to happen anytime soon.

     
  • Nobody/Anonymous

    Logged In: NO

    Presuming Sphere objects have accesible identifiers within
    the Javascript engine. I'm unsure if they can even be
    accessed. Besides, with that example, why not just make a
    textbox object, and work from there?

     

Log in to post a comment.