User Tag List

  1. schalker44's Avatar
    Thanks Ian I unfortunately overlooked
    2016-01-28 10:58 AM
  2. NewD's Avatar
    Ian - looks good, M8!!.. Except one thing caught my eye.. Shouldn't these:
    Code:
     if ((obj.extraLocCounty != null) && (obj.extraLocCounty != "") && (typeof(obj.extraLocCounty) != "undefined") {.....
    Be this:
    Code:
    if ((obj.extraLocCounty != null) || (obj.extraLocCounty != "") || (typeof(obj.extraLocCounty) != "undefined") {.....
    ??

    I don't think all three states (null, "", and typeof "undefined") are possible at the same time in a data field.

    Am I wrong?
    2016-01-28 11:01 AM
  3. TiLT1oNE's Avatar
    Thx alot Ian for doing all this in here. I hav a lil iWidget from Poison, its a WW2 based iWidget, and I think it is build with your WW2 template. Would anyone in here do me a favour and bring it to the new yahoo feed?

    I tried it by myself but cant get it work :/
    2016-01-28 11:06 AM
  4. <Ian Nicoll/>'s Avatar
    Ian - looks good, M8!!.. Except one thing caught my eye.. Shouldn't these:
    Code:
     if ((obj.extraLocCounty != null) && (obj.extraLocCounty != "") && (typeof(obj.extraLocCounty) != "undefined") {.....
    Be this:
    Code:
    if ((obj.extraLocCounty != null) || (obj.extraLocCounty != "") || (typeof(obj.extraLocCounty) != "undefined") {.....
    ??

    I don't think all three states (null, "", and typeof "undefined") are possible at the same time in a data field.

    Am I wrong?
    Dammit! Post edited & link updated.
    Funny thing is in UniAW it's always been like that! What you are stating is absolutely true & I did change it while I was coding but it stopped working so I put it back, now after it's all finished it still works after I change it.. go figure.
    Dacal must have had some reason for doing it that way.

    EDIT:
    I just updated the WW2_Only version & it won't work using || (or), put it back to && and all good, it's weird but it is what it is. Instructions updated back to &&.

    This code took me a while as I just couldn't get my head into it, many distractions & when I return to it I forget what I was doing.

    @Ian also in the css file we should input the line about the line color as you said some posts ago,am i right?
    Thanks, it's in the instructions now.
    Last edited by <Ian Nicoll/>; 2016-01-28 at 01:34 PM.
    2016-01-28 11:20 AM
  5. <Ian Nicoll/>'s Avatar
    Thx alot Ian for doing all this in here. I hav a lil iWidget from Poison, its a WW2 based iWidget, and I think it is build with your WW2 template. Would anyone in here do me a favour and bring it to the new yahoo feed?

    I tried it by myself but cant get it work :/

    Link please
    2016-01-28 11:21 AM
  6. nik1975's Avatar
    @Ian could you also include the instructions of @NewD about the additional locations in order to have it all together?
    2016-01-28 11:38 AM
  7. <Ian Nicoll/>'s Avatar
    @Ian could you also include the instructions of @NewD about the additional locations in order to have it all together?
    Dammit again LOL.. I meant to do that.
    2016-01-28 11:41 AM
  8. <Ian Nicoll/>'s Avatar
    The instructions have been updated again with the "Additional Locations" fix from NewD, and the link to the widget in post 1 also updated.
    2016-01-28 12:20 PM
  9. NewD's Avatar
    Ian,
    For some reason only half the wall is showing now.. I made sure to rename Widget.html to Widget1.html because of LockHTML4 seeing the Widget.plist even when not using iWidgets.

    But this is when using on LS. Your most recent update from page 1. Any thoughts? And anyone else getting this on iPhone 6S Plus?

    2016-01-28 01:32 PM
  10. <Ian Nicoll/>'s Avatar
    Ian,
    For some reason only half the wall is showing now.. I made sure to rename Widget.html to Widget1.html because of LockHTML4 seeing the Widget.plist even when not using iWidgets.

    But this is when using on LS. Your most recent update from page 1. Any thoughts? And anyone else getting this on iPhone 6S Plus?

    I think you get to delete all other html files, I'm sure LockHTML will read any name! Or rename it "Widget.html.backup"... maybe.

    BTW, I had to put back &&, it doesn't work correctly with ||.. go figure, weird eh.
    2016-01-28 01:35 PM
  11. <Ian Nicoll/>'s Avatar
    EDIT:
    All links in post 1 updated.
    Standard UniAW7.1 (WW2, GPS & LOCALE)
    UniAW7.1 WW2_ONLY
    WW2_SimpleBase Widget:
    UniAW7.1_LS_by_chevymusclecar_updated
    WW2_Glass_Sital
    Last edited by <Ian Nicoll/>; 2016-01-28 at 03:32 PM.
    2016-01-28 02:09 PM
  12. NewD's Avatar
    BTW, I had to put back &&, it doesn't work correctly with ||.. go figure, weird eh.
    AHA!!! I misread the 'double negative' aspect of the code. In the conditions you're using != and not ==... So && is indeed the correct code for testing to null, "", typeof "undefined". I've come a long way - but sometimes I still just make silly errors..

    So both -
    1) if ((.... != ... ) && (.... != ... )) {.....
    AND
    2) if ((.... == ... ) || (.... == ... )) {.....
    test for the presence or absence of something...

    Thanks! Makes sense now!

    Grant
    2016-01-28 02:09 PM
  13. <Ian Nicoll/>'s Avatar
    AHA!!! I misread the 'double negative' aspect of the code. In the conditions you're using != and not ==... So && is indeed the correct code for testing to null, "", typeof "undefined". I've come a long way - but sometimes I still just make silly errors..

    So both -
    1) if ((.... != ... ) && (.... != ... )) {.....
    AND
    2) if ((.... == ... ) || (.... == ... )) {.....
    test for the presence or absence of something...

    Thanks! Makes sense now!

    Grant
    What?
    I think you were correct the first time.
    Code:
    If (( 1+1 != 3) && (2+2 != 4) && (1f 3+3 != 5) { do something }
            TRUE          FALSE         FALSE      { 
        only if ALL 3 are this case do something 
    }
    But in the code we have this example:
    Code:
    if ((obj.extraLocCounty != null) && (obj.extraLocCounty != "") && (typeof(obj.extraLocCounty) != "undefined"))
    Lets say extraLocCounty = something, therefore the above statement will fire
    If extraLocCounty = undefined, in my logic it should still fire because it doesn't = undefined and null and blank all at the same time!

    Anyway, it works so never mind, moving on, I've had enough code for one day.

    BTW:
    && means "and".
    || means "or".
    != means not equal to
    == means equal to i.e x=4, if (x==4) TRUE, if (x== "4") TRUE
    === means equal to value & type i.e x=4, if (x===4) TRUE, if (x=== "4") FALSE
    Nothing t do with presence or absence of.
    To look for the presence of something I would do this:
    Code:
    if(document.getElementById("something")) { // Does the element "something" exist?
         // Present
    } else {
         // Not Present
    }
    Last edited by <Ian Nicoll/>; 2016-01-28 at 03:55 PM.
    2016-01-28 03:09 PM
  14. NewD's Avatar
    Lol! Yes you are completely correct, Ian..and I know that stuff well.

    When I use BytaFont for some cool font changes on my phone I see code readouts here on my phone with the same cool font. But this font I'm using isn't the best for browsing code. Lesson learned!

    I just plain misread and was skimming too quickly. Sorry to have wasted your time…

    Moving on! Thanks for all your help!!!
    Last edited by NewD; 2016-01-28 at 03:54 PM.
    2016-01-28 03:51 PM
  15. NewD's Avatar
    But still even with only LockBackground.html in the folder the widget is cut off..

    2016-01-28 04:14 PM
  16. <Ian Nicoll/>'s Avatar
    But still even with only LockBackground.html in the folder the widget is cut off..
    Did you delete the Widget.plist file?
    2016-01-28 04:15 PM
  17. NewD's Avatar
    EDITED... Okay.. no.. just the Widget.html file... In the past I recall that being the issue. Now that Widget.html AND Widget.plist are renamed to .backup.. all is fine! Thanks, Ian!
    Last edited by NewD; 2016-01-28 at 04:26 PM.
    2016-01-28 04:18 PM
  18. Clem-Clone's Avatar
    Would someone (Ian) lend a hand with this widget? It's an older version of UniAW. I've edited the appropriate files, but cannot get it right. I'd appreciate any help. If you can point out what I've done wrong, even better.
    TIA
    https://www.dropbox.com/s/gg15rjuum9...W%202.zip?dl=0
    2016-01-28 04:47 PM
  19. <Ian Nicoll/>'s Avatar
    Would someone (Ian) lend a hand with this widget? It's an older version of UniAW. I've edited the appropriate files, but cannot get it right. I'd appreciate any help. If you can point out what I've done wrong, even better.
    TIA
    https://www.dropbox.com/s/gg15rjuum9...W%202.zip?dl=0
    Downloading now but it's 1am & I'm up at 7 so have to catch some shut-eye. Hope you can wait.
    2016-01-28 04:58 PM
  20. <Ian Nicoll/>'s Avatar
    EDITED... Okay.. no.. just the Widget.html file... In the past I recall that being the issue. Now that Widget.html AND Widget.plist are renamed to .backup.. all is fine! Thanks, Ian!

    I really don't understand why LockHTML look for all these files!

    BTW, we are all learning & I just found out that this checks the object exists, is not null, and is not an empty string:

    if (obj.extraLocCounty && obj.extraLocCounty !== "")

    It will come in handy, I will be playing again tomorrow. LOL..

    EDIT: Even better, just putting this:
    if( obj.extraLocCounty )
    will evaluate to true if obj.extraLocCounty is not:
    Null
    undefined
    NaN
    "" (empty string)
    0
    false
    Perfect!
    Last edited by <Ian Nicoll/>; 2016-01-28 at 05:17 PM.
    2016-01-28 04:59 PM
LINK TO POST COPIED TO CLIPBOARD