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 6235979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:46:10+00:00 2026-05-24T10:46:10+00:00

I can do function yea ():int { … } var cool:Function=yea; I don’t know

  • 0

I can do

function yea ():int {
...
}
var cool:Function=yea;

I don’t know how to do something like

function get wat ():int {
...
}
var mmmh:Function=wat; // this (tries to) assign the wat returned value
  • 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-24T10:46:12+00:00Added an answer on May 24, 2026 at 10:46 am

    Well, the only way I know is capturing getter/setter references from inside of them with arguments.callee. But that’s a rather weird thing to do. 🙂

    package
    {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.MouseEvent;
        import flash.utils.getTimer;
    
        public class GetterTest extends Sprite
        {
            private var getterRef:Function;
            private var setterRef:Function;
    
            private var testValue:int = 0;
    
            public function GetterTest()
            {
                stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
            }
    
            private function onMouseDown(event:Event):void
            {
                if (getterRef != null) {
                    setterRef(getTimer());
                    trace("references: test = ", getterRef());
                } else {
                    test = getTimer();
                    trace("direct: test = ", test);
                }
            }
    
            private function get test():int
            {
                trace("TEST! getter");
                getterRef = arguments.callee;           
                return testValue;
            }
            private function set test(value:int):void
            {           
                trace("TEST! setter");
                setterRef = arguments.callee;
                testValue = value;
            }
        }
    }
    

    While the above works, I think the correct answer to your question is “don’t”. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i saw a function can be define in javascript like var square = function(number)
Which function can I use to get the content of a plain text file?
I can create function pointers in Fortran 90, with code like real, external ::
a lot of times i can see function written like this : name :
Can function argument have hint in cfscript (CF9)? CFML style: <cffunction name=myFunc output=false returntype=void>
can nvl() function be cascaded,...it was asked me in IBM interview .....and why????
Can a function in R return not one, but two vectors? (I am really
Can a function return more than one value directly (i.e., without returning in parameters
What function can I use in Excel VBA to slice an array?
A regular function can contain a call to itself in its definition, no problem.

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.