Is it possible to refer label functions to a function contained in a class
Is it possible to refer label functions to a function
contained in a class. eg
labelFunction = myClass.formatFunction
This would save me repeating code.
"nikos101" <[email protected]> wrote in
message
news:ghrj6p$m8l$[email protected]..
> As my applications grow I'm finding it more and more
appealing to starting
> moving my common funcitons into classes, functions like
this for example:
>
> private function dateFilterFunction(item:Object):Boolean
> {
> var t:Boolean = false;
> if(item.valueDate.time >=slider.values[0] &&
item.valueDate.time
> <=slider.values[1]){
> t = true;
> }
> return t;
>
> }
>
> Can Other developers share their experiances of doing
things this way
> please
> ;-)
I don't see where that makes sense as a class method. Could
you provide
more details about how you're using this?
Similar Messages
-
Dear Support,
Is there a possibility to switch off in Firefox the functionality of quick launch key (additional key in laptop) that cause to run the homepage. I would like to switch this functionality off, because the key is malfunctioned and always pressed. I was able to switch off the functionality of this key in Windows system by deleting entries in registry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey. After this change, when somebody works in system the Firefox is not running is not launching all the time. But when I open the Firefox the setting in system is overwritten and when I am using it Firefox returns to the homepage instantly. I think because of this quick launch button. I tried to change settings in about:config like browser.startup.homepage, browser.startup.homepage_override, startup.homepage_override_url,… this is for Firefox version is 10.0.2
Thank you
Best RegardsHi,
Thank you for your interesst.
This internet button key is one of buttons located above the keyboard near the power button. What I have achieved to this moment was to stop it functionality in the system by clearing the entries in the fields Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\17\ShellExecute and entry
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AppKey\7\Association that was http
After these changes in registry the behavior of the button was suppressed, the Firefox stopped to start unexpectedly all the time – so in system it works. But the problem is still when I have opened Firefox. Every time when you want to surf in internet – the homepage is activated also unexpectedly. I wrote this post with intention to ask if there is a possibility to switch off the functionality of this quick launch button in Firefox. Because I assume Firefox overrides the system setup – this I have made in registry. I tried with some option changes in about:config but without success. And I know that for older versions of firefox was some option in about:config do disable_quick launch button. But in 10.0.2 I couldn't locate it.
Thank you
Regards
Lukasz -
How to you refer to a function in another function in a cfc
HI,
How to you refer to a function in another function in a cfc like so
<cffunction name="getApplicationConstants" access="remote" returntype="struct">
<cfset flash.result.users = [the result from the getUsers function]>
<cfreturn flash.result>
</cffunction>
<cffunction name="getUsers" access="remote" returntype="query">
<cfquery name="q" datasource="#datasource#">
select c.*
from USERS as c WHERE looksLikeUserIsDeleted = 'False'
AND userPrivileges = 1
ORDER BY fullName
</cfquery>
<cfset flash.result = q>
<cfreturn flash.result>
</cffunction>Hi, Nikos,
If the CFCs are in the same directory, you could do the following:
CFCA
<cfcomponent>
<cffunction name="getApplicationConstants" access="remote" returntype="struct">
<cfset flash.result.users = cfcB.getUsers() />
<cfreturn flash.result>
</cffunction>
</cfcomponent>
CFCB
<cfcomponent>
<cffunction name="getUsers" access="remote" returntype="query">
<cfquery name="q" datasource="#datasource#">
select c.*
from USERS as c WHERE looksLikeUserIsDeleted = 'False'
AND userPrivileges = 1
ORDER BY fullName
</cfquery>
<cfset flash.result = q>
<cfreturn flash.result>
</cffunction>
<cfcomponent>
If the CFCs were in different directories, the cfset expression in CFCA would be this:
<cfset flash.result.users = path.to.cfc.cfcB.getUsers() />
Where I have path.to.cfc, you would use either a mapping from CF Admin or the hierarchy of folders to the CFC from the web root.
Does that help? -
Javascript _movie.label is not a function.
Ok, am I taking crazy pills? According to the documentation
_movie.label is a method that should return a frame number, however
when I do:
x = _movie.label("Start");
When there is clearly a marker called start, I get
Script error: TypeError _movie.label is not a function.
Not even a function?! I'm totally perplexed and disturbed. Is
Javascript just not implemented like the documentation says?The anonymous function isn't such an issue if one breaks it
out to a named function. I suspect the debugger is having issues
resolving/locating the function. So if you define a method function
and cast it to a class's method, the breakpoint is able to be
located:
function myClass(){
this.myMethod = namedFunction;
function namedFunction(){
trace("Hello World");
The drawback of this is that it pollutes the global
namespace, namedFunction is callable from outside the class
definition and or becomes a risk of being overwritten. Following a
convention of perhaps the classname followed by an underscore and
then method name in lieu of 'namedFunction', i.e.
myClass_helloWorld might be a better way to ensure unique method
names, but again, one only needs to do this to get
debugging/breakpoints working. I prefer the anonymous function
style as it works better with an external editor's code
folding/collapse (i.e. I like to use NetBeans as my editor for
Javascript). -
Is it possible to refer class files by mapping network drive?
Hi,
Is it possible to refer class files from the server(By mapping network of client's server) and specify this in project setting. If yes, how?
Right now I copied all class file needed, to 'myclasses' directory of jdevhome. this approach is working fine but the page is taking 20 to 30 minutes to refresh.
What could be probable reason for taking this much time to refresh a page? what could be alternative for this?
Will the mapping of drive and referring it will improve the performance?
I am connected to server through VPN and using Window based JDeveloper.
Regards,
AdarshHi Adarsh,
For the first part of your query, You can create a new Library in Project Settings to refer to the server classes.
As for the performance issue, there could be many reasons. Do you really think class loading is the only reason for the same? You might want to check in the Log window as to which process is eating up your time before loading the page.
~Srinath. -
Is it possible to turn off the fluid grid function in dreamweaver during the process of building your site by mistake? It was working fine and simply stopped and I don't see how to correct what is wrong.
There is no specific function that turns FGL on or off.
When you say that it has stopped, do you mean that the handles no longer show?
If that is the case, then I think you may have modified the CSS to such an extent that Dreamweaver no longer recognises it as belonging to FGL.
There are a couple of avenues for you
Redo the site and make sure not to touch the FGL CSS
paste the code here so that we can see what has gone wrong. -
Is it possible to switch off the auto reverse function
Hi,
I just bought a new iPod Shuffle. Is it possible to switch of the auto reverse function e.g. that the iPod starts to play from the beginning again after the last song of a playlist is reached?
Thanks
SaschaNo...
Look in settings...general settings....about.. Will show you the iOS version for the iPad. -
Is it possible to refer to paragraph 90, for example in para 110 of a long document and for this wording to automatically change to refer to this paragraph as para 96, if para 90 becomes para 96 because of document changes ?
What I would like to know refers to whether there is a way for a reference to a particular paragraph number in a document can be automatically updated if that paragraph number changes becasue of other alterations to the document e.g can a reference to paragraph 90, in para 110 be automatically updated to refer to this paragraph as para 96, if para 90 becomes para 96 because of document changes ?
-
Is it possible to have the Find My iPhone function on a PC. I have this app running well on all my OS devices. Just wondering if I can locate my OS devices from an "app" on my PC.
I do not believe there's an app for that on PC. I do recommend getting the iCloud dashboard for PC and to try it there. I would myself if my PC was working.
PC ***** get a Mac.
You can always go to iCloud.com to find your phone. -
Calling a function inside a function
How does one do that? I am trying to call function 1 inside function 2. What is the corrct syntax?
If this post answers your question or helps, please mark it as such.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function callFuncs():void{
one();
private function one():void{
txt.text += "In function one()\n";
two();
private function two():void{
txt.text += "In function two()\n";
three();
private function three():void{
txt.text += "In function three()\n";
]]>
</mx:Script>
<mx:Button label="Call Functions" click="callFuncs();"/>
<mx:TextArea width="500" height="500" id="txt"/>
</mx:Application> -
Combing rounding functions with other functions
I am using hyperion reports. Is it possible to combine a rounding function with another function? Specifically, I am taking a variance of actual vs budget where actual and budget are % of total functions. The variance I am getting is off (see ex. below.) I need to keep the actual and budget at 1 decimal point. To correct this problem in excel I am able to round the numbers pulled in by essbase. The ex. below illustrates my problem. Actual .2% Budget .2% Variance .1%
You may want to make a 'Scenario' for rounding that is rounding the input data. If you make it (variance) 2pass, it will show the difference of the rounded numbers (ie. 0%)Rich [email protected]
-
Function Groups and Function Modules
Hi,
Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
Regards,
ChandruHi,
Function Group creation -
A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
FG Creation:
1) Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
2) Then give a name for ur function group (starts with Y or Z) and press ENTER.
3) The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
Function Module:
A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
Both exist within an external program.
Both enable parameters to be passed and returned.
Parameters can be passed by value, by value and result, or by reference.
The major differences between function modules and external subroutines are the following:
Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
tables work areas are not shared between the function module and the calling program.
Different syntax is used to call a function module than to call a subroutine.
Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
Defining Data within a Function Module
Data definitions within function modules are similar to those of subroutines.
Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
Defining the Function Module Interface
To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
To define parameters, you must go to one of two parameter definition screens:
1) Import/Export Parameter Interface
2) Table Parameters/Exceptions Interface
Then in the FM interface screen, give the following
1) Import parameters
2) Export parameters
3) Changing parameters
Then give
1) Define internal table parameters
2) Document exceptions
You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
Syntax for the call function Statement
The following is the syntax for the call function statement.
call function 'F'
[exporting p1 = v1 ... ]
[importing p2 = v2 ... ]
[changing p3 = v3 ... ]
[tables p4 = it ... ]
[exceptions x1 = n [others = n]].
where:
F is the function module name.
p1 through p4 are parameter names defined in the function module interface.
v1 through v3 are variable or field string names defined within the calling program.
it is an internal table defined within the calling program.
n is any integer literal; n cannot be a variable.
x1 is an exception name raised within the function module.
The following points apply:
All additions are optional.
call function is a single statement. Do not place periods or commas after parameters or exception names.
The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
sample FM
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = ' '
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT =
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab =
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Example
1 report ztx1905.
2 parameters: op1 type i default 2, "operand 1
3 op2 type i default 3. "operand 2
4 data rslt type p decimals 2. "result
5
6 call function 'Z_TX_DIV'
7 exporting
8 p1 = op1
9 p2 = op2
10 importing
11 p3 = rslt.
12
13 write: / op1, '/', op2, '=', rslt.
Regards,
Shanthi.P
Reward points if useful ****
Edited by: shanthi ps on Jan 26, 2008 12:03 PM -
Call a functions within a function ?
Hi
Is there anyway to call my functions within a function ?
function musicPlayer() {
trace("Music");
function pauseMusic(){
trace("Pause");
if i call musicPlayer function i will get Music in output now how can i call pauseMusic from outside of parent function !?
is this possible ?
thanks in advanceYou can call functions within other functions, but you don't want define functions inside other functions... they will only have scope within the function if they work at all.
function pauseMusic(){
trace("Pause");
function musicPlayer() {
trace("Music");
pauseMusic();
musicPlayer(); -
Dynamic determination of function text for function code
Hi there,
i have coding that logs all the function codes pressed in a report, that function codes are defined in the GUI Status or dynamic created in a toolbar.
In my log i have now all the function codes, but it would be better if i also have the function text of theese function codes. Is there any chance to get the function text for a given function code?
E.G. user pressed Button "Refresh" , i log the function code "REFR", but i also want to have the text "Refresh". Is that possible?
Thanks
SteffenHi steffen,
try
CALL FUNCTION 'RS_CUA_INTERNAL_FETCH'
EXPORTING
PROGRAM = PV_NAME
LANGUAGE = FS_LANGU
IMPORTING
ADM = FS_ADM
TABLES
STA = T_STA
FUN = T_FUN
MEN = T_MEN
MTX = T_MTX
ACT = T_ACT
BUT = T_BUT
PFK = T_PFK
SET = T_SET
DOC = T_ATRT
TIT = T_TIT
BIV = T_BIV
EXCEPTIONS
NOT_FOUND = 1
UNKNOWN_VERSION = 2
OTHERS = 3.
Regards
Clemens -
I am trying to use IMAQ acquire and other IMAQ functions with Queue functions.
i am trying to use IMAQ acquire and other IMAQ functions with Queue functions.
i mean i would like to acquire the image in a queue and deque it afterwards. would be the queue function accept the IMAQ data type?Refer posting, http://exchange.ni.com/servlet/Redirect?id=8879554
Maybe you are looking for
-
Error while installing AS 10g on Linux AS 2.1
I m trying to install Oracle 9i AS and Oracle AS 10g on Red hat 9.0/Redhat Advanced Server 2.1 but not succeeded. As I have been successfully installed Oracle Database 10g on Red hat 9.0 but when I tried several time to install Application Server 9.0
-
Installing Adobe PhotoShop Elements 11 from DVD
I am trying to install Elements 11 from the DVD, but it gets to a point that states:The following applicatons are using files that need to be updated by this setup. Close these applications and click Retry to continue: ElementsAutoAnalyzer.exe Ple
-
HI I am having soap toABAP proxy synchronous interface , when i test from soap UI tool i am getting the below errro . can any body help me with this error <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP:Body> <S
-
Trouble editing text within form in pdf
We have created pdf fillable forms and was able to add text fields that come with red borders (intentional) inside and outside the forms. However, when trying to edit the texts inside the form, we are not able to click on it to select and delete/move
-
Is it now safe to reinstall adobe flash on my mac pro?
I had uninstalled adobe flash as I had heard of security issues with it. Can I now safely reinstall it? Many utube videos will no play without it. thanks