Re: cfx_pwtextcrypt CF9

2011-02-13 Thread Jeffrey Battershall

Check the CF9 docs.  There's quite a bit of encryption/decryption support
built in to CF8/9.  You might have transition issues to work through, but
you shouldn't need a CFX for that purpose at this point.

On Thu, Feb 10, 2011 at 3:53 PM, Brook Davies cft...@logiforms.com wrote:


 We've been using cfx_pwtextcrypt since 2002, its worked fine on all CF
 versions right up to CF8. However, it looks like on the 64 Bit CF9, it no
 longer works. I assume it's a COM related issue. Does anyone know for sure?



 The tag was able to generate a public/private key pair using RSA 512 bit
 encryption and subsequently perform encryption/decryption using the keys
 generated. Does anyone know if there is a way to do this with CF9 without
 this CFX?



 Brook D.








 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342172
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Dave Watts

 Presumably you are doing something like so...

 cfset session.myvariable = form /
 cflocation url=foo.cfm /

 I have not tested it, but I am guessing that you are loosing the session
 variables because you are creating a _reference_ to the form scope.  When
 you redirect, the form scope is now empty, and therefore, any and all
 references to it will be empty.  To create a session variable that actually
 holds the *value* (rather than the reference), use duplicate().

 cfset session.myvariable = duplicate(form) /
 cflocation url=foo.cfm /

This is not how references work. You can safely create a reference to
the form (which is itself just a reference) and when the form goes out
of scope, the reference you subsequently created will still be
available. There's no need to use Duplicate here, and it's
unnecessarily expensive.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsit

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342173
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Matt Quackenbush

Dave, as you well know I usually agree with you.  However, in this case, I
do not agree with you at all.  Why?  Because you are 100% wrong in your
statement.  What I showed is **exactly** how references work.

1) If you create a _reference_ to something as my code example did...

cfset session.myvariable = form /

2) and then you change the original...

cflocation url=foo.cfm /

3) the reference **will** be updated to match the value to which it is
pointing at.

In ColdFusion, structures are passed _by reference_ rather than _by value_.
The only way to pass a structure in CF by reference is by using
duplicate().  Can it be an expensive operation?  Ayep.  Is it necessary when
you want to pass by value rather than reference?  Ayep.

The 'form' scope, like all others in CF, is a structure.  Therefore the
rules about reference and value apply to it just as though you had created
the structure yourself with structNew().

Test the code I wrote.  You'll see that I am right.

Now then, if you are setting your session values like so...

cfscript
session.myvariable = {};
for ( key IN form )
{
 session.myvariable[key] = form[key];
}
/cfscript

... then you are creating brand new variables that will are _value_ based
rather than simply a reference to the form scope.  If this is what you are
doing, then, of course, changing the form scope (of form-scoped variables)
will have no bearing on the session variables you created.

HTH


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342174
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Matt Quackenbush

On Sun, Feb 13, 2011 at 11:36 AM, Matt Quackenbush wrote:

 The only way to pass a structure in CF by reference is by using
 duplicate().



Oops.  That is suppose to say

The only way to pass a structure in CF by value is by using duplicate().


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342175
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Reserved function names?

2011-02-13 Thread Pete Ruckelshaus

Hi,

I am creating a site with a codebase that is shared across several domains.
 Each site has a cfc that contains functions that are called in each section
of my base application.cfc.

Will I run into any issues if I name the functions in my site-specific cfc
onApplicationStart(), onSessionStart(), onRequestStart(), etc.?

Thanks

Pete


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342176
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Reserved function names?

2011-02-13 Thread Matt Quackenbush

Have you tried it?  :-)


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342177
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


SQL selecting distinct items by date?

2011-02-13 Thread wabba

More on SQL-topic than CF (MS SQL), but hopefully is an easy one. I have
items with a datetime field that stores when the items are added to the DB.
There is a pivot table that links items to categories. I'm trying to pull
out the top 5 unique categories with the newest-added items. This is what
I'm trying to do even though the syntax doesn't work:

SELECT TOP 5 DISTINCT pivot.CategoryID, Category.Name, Item.DateAdded
FROM Category
INNER JOIN pivot ON Category.CategoryID = pivot.CategoryID
INNER JOIN Item ON pivot.ItemID = Item.ItemID
ORDER BY Item.DateAdded DESC

I can get close, but the DateAdded fields are always unique (sometimes only
seconds apart, but unique) so no matter what I do it always thinks the
result records are unique and won't give me unique CategoryIDs. Ideas?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342178
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: SQL selecting distinct items by date?

2011-02-13 Thread John M Bliss

SELECT TOP 5 DISTINCT pivot.CategoryID, Category.Name, YEAR(Item.DateAdded)
AS theyear, MONTH(Item.DateAdded) AS themonth, DAY(Item.DateAdded) AS theday


On Sun, Feb 13, 2011 at 12:51 PM, wabba must...@wabba.net wrote:


 More on SQL-topic than CF (MS SQL), but hopefully is an easy one. I have
 items with a datetime field that stores when the items are added to the DB.
 There is a pivot table that links items to categories. I'm trying to pull
 out the top 5 unique categories with the newest-added items. This is what
 I'm trying to do even though the syntax doesn't work:

 SELECT TOP 5 DISTINCT pivot.CategoryID, Category.Name, Item.DateAdded
 FROM Category
 INNER JOIN pivot ON Category.CategoryID = pivot.CategoryID
 INNER JOIN Item ON pivot.ItemID = Item.ItemID
 ORDER BY Item.DateAdded DESC

 I can get close, but the DateAdded fields are always unique (sometimes only
 seconds apart, but unique) so no matter what I do it always thinks the
 result records are unique and won't give me unique CategoryIDs. Ideas?



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342179
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Reserved function names?

2011-02-13 Thread Pete Ruckelshaus

I have, and it works, I just wanted to make sure I don't create an alternate
dimension or release a kraken or something.

On Sun, Feb 13, 2011 at 1:49 PM, Matt Quackenbush quackfu...@gmail.comwrote:


 Have you tried it?  :-)


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342180
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: SQL selecting distinct items by date?

2011-02-13 Thread wabba

Here's what I ended up with

SELECT distinct TOP 5 pc.nCategoryID, c.sCategory, YEAR(p.dPartDate) AS
theyear, MONTH(p.dPartDate) AS themonth, DAY(p.dPartDate) AS theday
FROM Category c
INNER JOIN PartCat pc ON pc.nCategoryID=c.nCategoryID
inner join part p on pc.npartid=p.npartid
order by theyear DESC, themonth desc, theday desc

Adding any part-specific fields to the select list results in duplicate
CategoryIDs, and I don't fully understand why the DISTINCT can't remain
exclusive to the CategoryID field, but so far I think it'll do what's
needed. The results can be looped over to get more detail which means
subqueries, but it functions. Combining TOP and DISTINCT with GROUP/ORDER
remains somewhat uncertain...


-Original Message-
From: John M Bliss [mailto:bliss.j...@gmail.com] 
Sent: Sunday, February 13, 2011 10:55 AM
To: cf-talk
Subject: Re: SQL selecting distinct items by date?


SELECT TOP 5 DISTINCT pivot.CategoryID, Category.Name, YEAR(Item.DateAdded)
AS theyear, MONTH(Item.DateAdded) AS themonth, DAY(Item.DateAdded) AS theday


On Sun, Feb 13, 2011 at 12:51 PM, wabba must...@wabba.net wrote:


 More on SQL-topic than CF (MS SQL), but hopefully is an easy one. I have
 items with a datetime field that stores when the items are added to the
DB.
 There is a pivot table that links items to categories. I'm trying to pull
 out the top 5 unique categories with the newest-added items. This is what
 I'm trying to do even though the syntax doesn't work:

 SELECT TOP 5 DISTINCT pivot.CategoryID, Category.Name, Item.DateAdded
 FROM Category
 INNER JOIN pivot ON Category.CategoryID = pivot.CategoryID
 INNER JOIN Item ON pivot.ItemID = Item.ItemID
 ORDER BY Item.DateAdded DESC

 I can get close, but the DateAdded fields are always unique (sometimes
only
 seconds apart, but unique) so no matter what I do it always thinks the
 result records are unique and won't give me unique CategoryIDs. Ideas?



 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342181
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Reserved function names?

2011-02-13 Thread Matt Quackenbush

Heh.  OK.  Well, the answer is, as you have found, yes, it works just fine.
This is what most (all?) of your MVC frameworks do in order to extend the
Application.cfc functionality.  Assuming that the code you place in such
named methods is appropriately placed, there is nothing at all wrong with
naming your methods the same way.  :-)


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342182
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: CF8 cftextarea richtext is stealing form focus, and being referred to by the form

2011-02-13 Thread Michael Benoit

In addition, 

FCKConfig.StartupFocus= false; 

in fckconfig.js

Hi, sorry for necroposting, but has anyone seen a solution to this problem in 
CF8? I'm experiencing the exact same issue, and it's a bit aggravating. 

Thanks! 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342183
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Sean Corfield

On Sun, Feb 13, 2011 at 9:36 AM, Matt Quackenbush quackfu...@gmail.com wrote:
 Dave, as you well know I usually agree with you.  However, in this case, I
 do not agree with you at all.  Why?  Because you are 100% wrong in your
 statement.  What I showed is **exactly** how references work.

Well, yes, your code was about references but unfortunately form scope
is created anew on each request in ACF so whilst

 cfset session.myvariable = form /

leaves session.myvariable pointing at a struct (that was the form
scope on that request), by the time you do this:

 cflocation url=foo.cfm /

The name form is bound to a new struct and the original
session.myvariable is unchanged.

I tried it on Railo and discovered that the form scope is somehow
reused across multiple requests - so on Railo, your logic would be
correct. That's interesting and I'll have to take that up with
engineering to find out why / how it's different.

Which begs the question of the Original Poster: Don / Dan - are you
running on ACF or Railo?
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret At

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342184
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Sean Corfield

On Sun, Feb 13, 2011 at 7:59 PM, Sean Corfield seancorfi...@gmail.com wrote:
 I tried it on Railo and discovered that the form scope is somehow
 reused across multiple requests - so on Railo, your logic would be
 correct. That's interesting and I'll have to take that up with
 engineering to find out why / how it's different.

Some experimentation yields the answer. In ACF, form is a fairly
regular struct object that is created and populated afresh on each
request with whatever is posted into that request. In Railo, form is a
smart object that behaves like a proxy to the current request's form
data so, whilst the contents of the form scope are populated afresh on
each request, the form scope itself is a proxy to that data rather
than actually containing it.
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342185
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Matt Quackenbush

I have two different CF9 installations that behave the way I described.  It
actually caught me out on a quickie application I did for someone awhile
back, because I did not expect that behavior.  But that's exactly what it
does on two different installations.  shrug


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342186
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fusebox seemingly clearing contents of session variables on relocation

2011-02-13 Thread Sean Corfield

On Sun, Feb 13, 2011 at 8:58 PM, Matt Quackenbush quackfu...@gmail.com wrote:
 I have two different CF9 installations that behave the way I described.

Odd. I couldn't repro on CF9.0.1 locally. Do you have a small test
case that shows form scope behaving like that for you? I'd love to try
it on my setup. Thanx!
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342187
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Latest Hot Fix Issues

2011-02-13 Thread Shilpi Khariwal

Hi,

Can you please try this on another machine/Setup?

Shilpi 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm