[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-06 Thread Robin Hilliard

On 06/12/2006, at 8:45 PM, Mike Kear wrote:
> But I do think that Andrew's java answer was really cool.


I agree. There are lots of interesting undocumented methods hanging  
around in CFML - For instance application.getApplicationSettings()  
that I blogged about back in 2005:

http://www.rocketboots.com.au/blog/index.cfm? 
mode=entry&entry=8A1C48F5-E081-51EF-A7AF8C312529DABA

Here's a script ("Java Eye for the CF Guy"?) that lists some of the  
methods hidden away in common-garden CFML things:



function hiddenMethods(class) {
writeOutput("Class: " & class.toString() & "");
aMethods = class.getMethods();
for (i = arrayLen(aMethods); i gt 0; i = i - 1)
writeOutput(aMethods[i].toString() & "");
}

// String
s = "hello";
hiddenMethods(s.getClass());

// Array
hiddenMethods(arrayNew(1).getClass());

// XML
hiddenMethods(xmlNew().getClass());

// Struct
hiddenMethods(structNew().getClass());

// Application
hiddenMethods(application.getClass());

// Session
hiddenMethods(session.getClass());

// Template
hiddenMethods(getClass());

// Component
function getClassFromInsideComponent() {
return getClass();
}
instance = createObject("component","WEB-INF.cftags.component");
instance.getClassFromInsideComponent = getClassFromInsideComponent;
hiddenMethods(instance.getClassFromInsideComponent());



As always, use undocumented methods at your own risk :-)

__

Robin Hilliard
Director - RocketBoots Pty Ltd
Consulting . Recruitment . Software Licensing . Training
http://www.rocketboots.com.au

For schedule/availability call Pamela Higgins:
w+61 7 5451 0362
m+61 419 677 151
f+61 3 9923 6261
e[EMAIL PROTECTED]

or Direct:
m+61 418 414 341
e[EMAIL PROTECTED]




--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-06 Thread grant
if we were on expertsexchange  robin would
get the points.

On 12/6/06, Mike Kear <[EMAIL PROTECTED]> wrote:
>
>
> AH!  That's the solution I was trying to recall.   Thanks Robin.
>
> But I do think that Andrew's java answer was really cool.
>
>
>
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Adobe Certified Advanced ColdFusion Developer
> AFP Webworks
> http://afpwebworks.com
> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
>
> On 12/6/06, Robin Hilliard <[EMAIL PROTECTED]> wrote:
> >
> > path = reReplace(path,"/$","");
> >
> > Robin
> >
> >
>
> >
>


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---


[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-06 Thread Mike Kear

AH!  That's the solution I was trying to recall.   Thanks Robin.

But I do think that Andrew's java answer was really cool.



Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month

On 12/6/06, Robin Hilliard <[EMAIL PROTECTED]> wrote:
>
> path = reReplace(path,"/$","");
>
> Robin
>
>

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-06 Thread Robin Hilliard

path = reReplace(path,"/$","");

Robin

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Andrew Scott

Yes Mike it is, the best place is java.sun.com and look at the api, or you
could always go looking into the class source files themselves?



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Mike Kear

Thats not how i did it before, but thats FAR more elegant.  Thanks!

I'm assuming endsWith() is a java string function is it? Where can
i find a list of all these functions?   I ought to know more about
them.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month




On 12/6/06, Andrew Scott <[EMAIL PROTECTED]> wrote:
>
> Mike
>
> 
>  
> 
>
>
>
> Andrew Scott
> Senior Coldfusion Developer
> Aegeon Pty. Ltd.
> www.aegeon.com.au
> Phone: +613  8676 4223
> Mobile: 0404 998 273
>

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Joel Cass

What? there's a manual?





-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED]
Behalf Of Scott Thornton
Sent: Wednesday, 6 December 2006 4:31 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Find and remove a trailing slash from a path - brain
fade time



endsWidth() ???

That is a fucntion that can't be found in my CF MX 6.1 manual.

>>> [EMAIL PROTECTED] 06/12/2006 4:24 pm >>>

Mike


 




Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273








--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Andrew Scott

Scott,

And nor will you either, if you think about it CF sees that as a string and
Java has the method endsWith() so you can leverage of this little trick with
great uses:-)


Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273



--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Bruce Trevarthen \(B2 Limited\)

Arh, CF6

Use this instead...





Bruce

-Original Message-
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Scott Thornton
Sent: Wednesday, 6 December 2006 6:31 p.m.
To: cfaussie@googlegroups.com
Subject: [cfaussie] Find and remove a trailing slash from a path - brain
fade time


endsWidth() ???

That is a fucntion that can't be found in my CF MX 6.1 manual.

>>> [EMAIL PROTECTED] 06/12/2006 4:24 pm >>>

Mike


  



Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273







--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Re: Find and remove a trailing slash from a path - brain fade time

2006-12-05 Thread Andrew Scott

Mike


 




Andrew Scott
Senior Coldfusion Developer
Aegeon Pty. Ltd.
www.aegeon.com.au
Phone: +613  8676 4223
Mobile: 0404 998 273


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---