What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Boolean values

[?] Boolean values
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. [?] Boolean values
Another n00b question.

code:
    show_in_psm = new Boolean(get("show_in_psm")*1);


Should return a boolean value that equals true right? Well, instead I get an object. Whats the deal-i-o? :p
<Eljay> "Problems encountered: shit blew up" :zippy:
02-28-2008 01:02 PM
Profile PM Find Quote Report
TheBlasphemer
Senior Member
****

Avatar

Posts: 714
Reputation: 47
37 / – / –
Joined: Mar 2004
RE: [?] Boolean values
show_in_psm = (get("show_in_psm")*1)>0;
would probably work :)
[Image: theblasp.png]
02-28-2008 01:04 PM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
O.P. RE: [?] Boolean values
Thanks. Had to use *-1 though because it's a negative value in the registry :p

EDIT: But still, why was I getting an object?

This post was edited on 02-28-2008 at 01:11 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
02-28-2008 01:07 PM
Profile PM Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
36 / Male / Flag
Joined: Mar 2004
RE: [?] Boolean values
quote:
Originally posted by SpunkyLoveMuff
Thanks. Had to use *-1 though because it's a negative value in the registry :p

EDIT: But still, why was I getting an object?
because its a wrapper class for a primitive type to get the primitive type use the valueOf method

code:
var x = new Boolean(1);
var bool = x.valueOf();

[Image: dt2.0v2.png]      Happy Birthday, WDZ
02-28-2008 01:30 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On