Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36

Thread: [DHTML] ActiveX Simplified

  1. #31
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Perhaps you should call them "HTA Utility Functions." Also, the purpose of explaining the benefits of namespacing to you was not to have you namespace only my code Namespace identifiers should be something unique, too: the difference is that you only have to have one. "To" does not count as a highly original identifier
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #32
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    ok, I'm going on vacation soon but I'll work on converting them all to use namespace rather than this.variable

  3. #33
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You're not using "this.variable" at all. All those variables you think are nice and safe actually aren't, they're global, about as unprotected as they possibly can be.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #34
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Completly Fixed.. I Hope

    So I got rid of all the global this.variable and I only used this. to call functions within the namespace.

    I also made all the functions in the namespace format with better names that "To".

    Thanks again Twey. I recently saw the this.variable in a function and I misunderstood it's use. I have also been wondering how to do namespaces but I could never find a good tutorial.

    I've been coding for almost 5 years now and it's a little embarrasing to make a mistake that stupid.

  5. #35
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not in Javascript, I hope Advanced Javascript can be a little daunting to those coming from more rigid languages (heck, it took me by surprise). I'm quite worried that as a five-year coder you never thought to look for an character/code conversion function before deciding to hard-code a list of every possible ASCII character using if statements, though
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #36
    Join Date
    Aug 2006
    Posts
    30
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I honestly didn't create the conversion. I found the script on a website and asked premission to use it but no one knew who made it. I recreated it using the codes that already existed (except \n which I added as 00000000) so that it used the this.variable mistake I had been doing. If I had invested time instead of taking the cheap way out it would have looked something like the other persons script that I asked premission to use.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •