Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6907069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:23:23+00:00 2026-05-27T08:23:23+00:00

I am using the technique detailed in this answer to manage a library of

  • 0

I am using the technique detailed in this answer to manage a library of small utility functions. (Essentially, each function is loaded as a “mix-in” using cfinclude.)

I have need, however, to know the names of the functions that the object has (once instantiated). A cfdump on the object only shows the init function which is written directly in the CFC.

Some more detail:

I am creating the object in the application scope in OnApplicationStart().

<cfset application.udfs=createObject("component","extensions.udfs").init()>

However, to save the developers from having to constantly write application.udfs.foo(), I thought I’d grab all of the functions and drop them in to the variables scope in OnRequestStart(), so that these hypothetical developers could just write foo().

<cfset foo=application.udfs.foo>

Obviously, though, this needs to be dynamic and to happen for each of the functions in the object, no matter how many there are. If I repeat this line for every function I’ve lost whatever I’d gained by having a library that is dynamically generated.

I thought perhaps I could use a collection loop, but that was invalid. I am fairly certain there’s a way to get the list of methods in an object, but I have not yet been able to find it.

Any clues?

By the by, my fallback is going to be to copy the application.udfs object to a local object with a nice short name (like “u”) so that the developers can simply type u.foo(), so no need to suggest that if what I want to do can’t be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:23:24+00:00Added an answer on May 27, 2026 at 8:23 am

    This should allow you to import all your udfs into the global variables scope:

    StructAppend(variables, application.udfs);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a technique similar to that in Remou's answer to this question to
I'm using this technique to restart the game. Here is the code: function restart(e:MouseEvent)
I am using this technique: is there a way to hold the values? -
I just come across this strange situation . I was using the technique of
First time using this technique, seems that regardless what attributes I try to assign
I am using this technique for a sticky footer: http://ryanfait.com/sticky-footer/ I wanted to create
i'm using this technique to load ajax into a jqueryui dialog load ajax dialog
Just started using this technique and am having strange results on the PC side.
I got the ScriptManager and ScriptManagerProxy to talk to jquery using this technique .
I try to change the value by using this technique in php, but it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.