- see footer for list info -<
Yes I agree, that is why I am encapsulating the methods for my own use,
keeps it readable.
Making multipleOptions component because we have an application form
with loads and
loads of multiple selects that need to be stored, I just supply my
multiple selection object with
a list of values that can be selected and it does the rest. But will
get back to as to whether it's useful
or not.
Snake wrote:
- see footer for list info -<
As long as no other developer needs to work on your code, I guarantee
bitwise operations will confuse most of them :-)
Russ
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dominic watson
Sent: 25 October 2005 18:22
To: Coldfusion Development
Subject: Re: [CF-Dev] Bitwise operators
- see footer for list info -<
Yes agreed,
Just found the bitwise functions, duh.
Still, I think that a flagset object could be handy (ill use it). You add
options (flags) that can be selected and deselected (32 max), you can output
those options as a query, turn option selections on and off; output the
entire combination of selections as single integer to be stored wherever;
check whether an option is selected or not, etc. Would cut the need for an
extra table in a database possibly.
Anyways, will get back
Well, I'll finish it tonight and see how nicely it works, post it 2mrw.
Snake wrote:
- see footer for list info -<
You have the following functions.
BitAnd
BitOr
BitNot
BitXor
But don't forget you have a limited number of bits to use. Hal Helms
mad ethe mitake of using this approach to handle permissions in
Extended Fusebox, and it really didn't work.
If you need to have dozens of values, then a straight list or structure
is better.
--
Russ
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dominic watson
Sent: 25 October 2005 17:32
To: Coldfusion Development
Subject: [CF-Dev] Bitwise operators
- see footer for list info -<
There aren't any in CF are there? I am interested to know as I would
like to implement a system for setting flags for multiple options.
i.e. options are assigned flag values of 1,2,4,8,16,32,etc. Every
possible combination of selections would product a different integer
result when added together, thus you can have one field that stores all
multiple selections. All that is needed is methods to extract lists of
flag values, or check the presence of a flag, etc.
Anyone know of a UDF (couldnt see one on cflib), or CF function that
does this or should i write one?
Dominic
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go
to http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go
to http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your
help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
-<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
_______________________________________________
For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo
--
CFDeveloper Sponsors:-
- Hosting provided by www.cfmxhosting.co.uk -<
- Forum provided by www.fusetalk.com -<
- DHTML Menus provided by www.APYCOM.com -<
- Lists hosted by www.Gradwell.com -<
- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<