the problem of reuse based on the functions

I read the text in quotes as follows a book written by a Microsoft Developer. I googled and found a good number of citations of it, but did not find any explanation.

============
With languages like C, the basic unit of re-use is the function. The problem with reuse based on a function, is that the function is coupled to the data, he manipulates. and if the data world, a change to a function in the context of re-use infringes another function used somewhere else.
============

C using the libraries widely, which is to reuse based on functions. Kindly can anyone give me a scenario where this problem occurs?

Java is usually based on objects for reuse, and I confess that my question is not a Java. But I think that would help to better understand the concept or the benefits of the Java language design. So, thank you for allowing me to ask this question here,

Published by: 799160 on September 30, 2010 12:38

Published by: 799160 on September 30, 2010 12:57

That's what I came to read the quote you posted:

I guess something like the following might happen:

You (being a person in General) have received a class change. You examine the code for the first time, and it has a bunch of methods and variables of class in it. Some methods use class variables. How can you be sure that if you change the functionality for editing a class variable in one method will not affect the other methods when they are used? This problem can be solved by learning everything that is and how it interacts, the correct way to use it. But then again, if you don't think about it and to make changes... Oops!

-----

Maybe another abstract example would be wise:
Imagine a calculator that could be used by 2 people at the same time? I bet it would come with a few funny answers :)

-----

I hope that I wrote a short example of this, he makes some sense:

public class SuperBigProgram
{
     private int globalVar;

     public static void main ( String[] args )
     {
          new SuperBigProgram();
     }

     public SuperBigProgram()
     {
          System.out.println("I'm a super big program.");

          globalVar = 0;

          //Let's pretend these series of events occur during the program:

          doItHighChanceActivity(); //1
          doItHighChanceActivity(); //2
          doItHighChanceActivity(); //3

          //Whoops super rare event occured!
          doesNotHappenALot();

          doItHighChanceActivity(); //4????    but is really 5.
     }

     /**
      * This happens A LOT!
      */
     private void doItHighChanceActivity ()
     {
          superUtilityMethod();

          System.out.println("globalVar: " + globalVar);
     }

     /**
      * This utility method does some awesome utility stuff for our Super Big Program.
      * This changes some global data.
      */
     private void superUtilityMethod()
     {
          globalVar++;
     }

     /**
      * This does not happen a lot, if at all.
      */
     private void doesNotHappenALot()
     {
          //Hey I don't happen a lot but I'm reusing this really cool utility method that contains global data...
          //Code reuse for the win!
          superUtilityMethod();
     }

}

Here is the result:

I'm a great big program.
globalVar: 1
globalVar: 2
globalVar: 3
globalVar: 5

Published by: kilosi on Sep 30, 2010 13:22

Tags: Java

Similar Questions

  • Problems of execution of a SQL function with a variable in the WHERE clause

    Hello world!

    I have programmed a function that returns a boolean value based on the result of the SQL. It's the function:

    FUNCTION existe_secuencial (seq_name VARCHAR2) RETURN AS BOOLEAN

    cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) = sequence_name' | seq_name | ' ;

    BEGIN

    OPEN c2;

    DBMS_OUTPUT. Put_line (nombre_seq);

    Get c2 INTO kk;

    If c2% NOTFOUND = True THEN

    RETURNS false;

    on the other

    RETURNS true;

    end if;

    END existe_secuencial;

    And I give the floor to the function of a procedure in this way:

    IF existe_secuencial ("SEQ_ARQUETA") = True THEN

    DBMS_OUTPUT. Put_line ('exists');

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("' NOT exists");

    END IF;

    The probrem that this SQL is forced to return results because this sequence exists in the comic book, but is not, return me the FALSE value. What makes me mad is that if I change the second line of the function in this way:

    > > cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) sequence_name ="SEQ_ARQUETA";

    It works find and return of sequence existing (real)

    Can someone help me please, I'm quite desperate to find what is the problem with that because I do not understand why if I built the slider with a variable returns no results so that if I do write it works...

    Thanks in advance!

    Itziar

    Frame you your variable in quotes, which makes the string literal ' |. ' seq_name | "rather than the content of the variable.

    I think that something like this would be an improvement.

    function existe_secuencial (seq_name VARCHAR2) return a Boolean value as

    number of exist_check: = 0;

    Start

    Start

    Select 1

    in exist_check

    of all_sequences

    where upper (sequence_name) = upper (seq_name);

    exception

    When no_data_found then

    null;

    end;

    return (exist_check = 1);

    end existe_secuencial;

  • Heating problems Strain Gage; Wait for the function measurement of delay

    Hello

    I am able (using four 350 ohm gauges) of the strain using a NI 9237 module with a cDAQ in connection Full deck Type 3. My test is to measure the strain over long periods of time (~ 10 days). The NI 9237 measure strain at a rate of 2000 Hz (this is the slowest rate). The wheatstone bridge is currently powerd with the NI 9237 of 2.5 V. When I get my data permanently, I see the strain increases with time (which it shouldn't do my test), and I suspect it's because of free heating strain gauges. So, to overcome this problem, I think using "Wait (ms)" and ask the program to obtain data once every 5 min. Five minutes should be more than enough to dissipate any overheating of the gauge.

    My question is: if I use the function 'wait (ms)', is my sensor (extensometer) are constantly under tension during the time-out of 5 minutes? I think that the functions "queue" are used inside a loop to allow a VI to sleep during the prescribed period (correct me if I'm wrong). So, it means that the sensor is not powered during this time?

    Thank you

    SID

    I wouldn't use "wait" function for your timing... software you can use the time elapsed or other timing functions

  • Kalonline-works until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking

    I play kalonline (RPG game), when to start the game it works up until I get the anti-piracy icon so stop saying: there is a problem with the function of anti-hacking. the program stops. I am the admin of it say kal computer run it in administrator mode and I did and I delete and reinstall the game. Solve the problem in win 7 by a right click and run as administrator, they wanted to work in win xp it all fits on how to solve this problem. These are the things, I was told to do to fix it.
    Hello

    It comes to KalOnline.

    Your error message can be corrected by following these steps:

    1. run KalOnline in Administrator Mode.

    2 uninstall KalOnline d_lete the entire Inixsoft folder, then reinstall the game.
    I did it and and it has not worked. then I was told that this was causing the problem

    Please check your computer system.

    This problem has occurred by a kind of problem of piracy.

    And if you have used a kind of memory-editing program, it could be happen too.

    So if your receipt similar to, then please remove it.
    I have none of these things on my computer. All I know is that people who have not updated windows xp can play the game and people who win 7 can play the game if they right click icon and run as administrator, that I still say side here but no way to prove it.

    Hello

    I suggest you to get in touch with the manufacturer of games and see if there are any other fix for this problem.

  • When starting my laptop, a warning poster says c:\program can affect the function of other applications, appointing him to c:\prgram1 will solve the problem

    Hello

    When starting my laptop (Windows vista), pop - up warning message indicating c:\program can affect the function of other applications, by naming to c:\prgram1 will solve the problem options: would you like it to remane, or ignore it.

    Can you help me

    Thank you

    Original title: Cprogram

    Hello

    Method 1:

     I recommend you put the computer to boot.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

    Method 2:

    You can also scan your computer the Microsoft Security Scanner, which would help us to get rid of viruses, spyware and other malicious software.

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner ends 10 days after being downloaded. To restart a scan with the latest definitions of anti-malware, download and run the Microsoft Safety Scanner again.

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

     

    Hope this information is useful.

  • Having the problem with the function on SG300 Dhcp / 500?

    Having the problem with the function on SG300 Dhcp / 500? now I can use the dhcp server on the two model, but have a problem.

    My problem is when I create

    VLAN 1: 192.168.0.1/24 dhcp pool 192.168.0.10 - 250

    VLAN 10: 192.168.10.10 - 250 192.168.10.1/24 dhcp pool

    case 1

    I plug the pc to vlan 1 can I get ip 192.168.0.11. But when I change this pc to a new port in vlan 2 I always get the same ip address. why I can not get IP of vlan2.

    case 1

    I plug the pc to vlan 2 I can get ip 192.168.10.11. But when I change this pc to a new port in the vlan 1 I always get the same ip address. why I can not get IP of vlan1.

    but when I have access to the switch and remove the link after that that i will get correct IP.

    I think this is the bug of this firmware. Could you help this case.

    This is a known bug that is the setting of Cisco

    Sent by Cisco Support technique iPad App

  • Invalidation of the index based on a function because the recompilation

    Hello

    one of our customers has two indices according to the functions that fall under the State "off" in some situations. After looking more closely at the situation, there are some things that my opinion are different from what I expected of a function-based index. Because I am unable to find anything about either on metalink (or I'm not asking the right question) I would appreciate a second opinion of you.

    To keep things simple, I gave an example to illustrate the behavior. I use Oracle 12.1.0.2, although it can also be reproduced on versions 10.2 and 11.2.

    It's my environment and three parameters that I find relevant to the discussion:

    SQL> select banner from v$version;
    
    BANNER
    ----------------------------------------------------------------------------
    
    Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
    PL/SQL Release 12.1.0.2.0 - Production
    CORE    12.1.0.2.0      Production
    TNS for Linux: Version 12.1.0.2.0 - Production
    NLSRTL Version 12.1.0.2.0 - Production
    
    SQL> show parameter remote_dependencies
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ----------
    remote_dependencies_mode             string      TIMESTAMP
    
    SQL> show parameter query_rewrite
    
    NAME                                 TYPE        VALUE
    ------------------------------------ ----------- -------------
    query_rewrite_enabled                string      TRUE
    query_rewrite_integrity              string      enforced
    

    Test case:

    SQL> CREATE OR REPLACE FUNCTION f1 (p_string IN VARCHAR2)
      2  RETURN VARCHAR2
      3  DETERMINISTIC
      4  IS
      5  BEGIN
      6    RETURN lower(p_string);
      7  END f1;
      8  /
    
    Function created.
    
    SQL> CREATE TABLE tmp_t1 (a_string VARCHAR2(10));
    
    Table created.
    
    SQL> INSERT INTO tmp_t1 VALUES ('a');
    
    1 row created.
    
    SQL> COMMIT;
    
    Commit complete.
    
    SQL> CREATE INDEX x1_tmp_t1 ON tmp_t1(f1(a_string));
    
    Index created.
    
    SQL> set linesize 80;
    SQL> column index_name format a10;
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    

    We have our table and our based on an index function which basically converts the values to lowercase. From here on things, download a little weird. What happens with the index based on a function if the underlying function is recompiled? I always thought (and which is also stated in the Concepts and the use of function index (Doc ID 66277.1)) that the index would change its status to "disabled". Here is an excerpt of the said Doc ID:

    The index depends on the State of the PL/SQL function. The index can be

    struck down or rendered useless by changes to the function. The index is marked

    People with DISABILITIES, if he is brought to the function or function is re-created.

    The timestamp of the function is used to validate the index.

    To allow the index after it is created, the function if the signature of the

    the function is identical to the front:

    ALTER INDEX ENABLE;

    If the signature of functions is changed, to make the changes effective

    in the index, the index must be renewed to make it valid.

    ALTER INDEX REBUILD.

    It seems that this is not the case, as the index remains valid and activate.

    SQL> alter function f1 compile;
    
    Function altered.
    
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    

    OK, explicitly recompiling function F1 single timestamp changed. What if we replace the function completely and we change the output of the function - for example we will switch from a LOWER function to SUPERIOR function in the body of the F1. Again, it is change that I thought would be not only to disable the index based on a function, but also force its reconstruction. At least that is my understanding of the explanation in Doc ID).

    SQL> CREATE OR REPLACE FUNCTION f1 (p_string IN VARCHAR2)
      2  RETURN VARCHAR2
      3  DETERMINISTIC
      4  IS
      5  BEGIN
      6    RETURN UPPER(p_string);
      7  END f1;
      8  /
    
    Function created.
    
    SQL> SELECT index_name, index_type, status, funcidx_status
      2    FROM user_indexes;
    
    INDEX_NAME INDEX_TYPE                  STATUS   FUNCIDX_
    ---------- --------------------------- -------- --------
    X1_TMP_T1  FUNCTION-BASED NORMAL       VALID    ENABLED
    
    

    Should not be. Because of the function "create or replace" F1 never go through a "invalid" phase which may be necessary for index becomes unusable? What about queries on the TMP_T1 table? Does optimizer always uses access index or not? What about the results?

    SQL> EXPLAIN PLAN SET statement_id='s1' FOR
      2  SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      3    FROM tmp_t1
      4   WHERE f1(a_string) = 'a';
    
    Explained.
    
    SQL> SELECT * from table(dbms_xplan.display(statement_id=>'s1'));
    
    PLAN_TABLE_OUTPUT                                                                                                   
    ------------------------------------------------------------------------------------------------------------------------
    Plan hash value: 3133804460                                                                                         
                                                                                                                        
    -------------------------------------------------------------------------------------------------                   
    | Id  | Operation                           | Name      | Rows  | Bytes | Cost (%CPU)| Time     |                   
    -------------------------------------------------------------------------------------------------                   
    |   0 | SELECT STATEMENT                    |           |     1 |  2024 |     2   (0)| 00:00:01 |                   
    |   1 |  TABLE ACCESS BY INDEX ROWID BATCHED| TMP_T1    |     1 |  2024 |     2   (0)| 00:00:01 |                   
    |*  2 |   INDEX RANGE SCAN                  | X1_TMP_T1 |     1 |       |     1   (0)| 00:00:01 |                   
    -------------------------------------------------------------------------------------------------
    

    The index is used by the optimizer, see the results.

    SQL> column f1_a_string format a15;
    SQL> column f1_literal format a15;
    SQL> SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      2    FROM tmp_t1
      3   WHERE f1(a_string) = 'a';
    
    A_STRING   F1_A_STRING     F1_LITERAL
    ---------- --------------- ---------------
    a          a               A
    

    A_STRING = value in the table

    F1_A_STRING = value of f1 (a_string) but the value is not evaluated because it comes from an index, so tiny value (remember, at the time index created the function returned small values)

    F1_LITERAL = value of the function f1 newly evaluated, using literal instead of the value in the table.

    Predicate f1 (a_string) = 'a' should return no rows because no character uppercase is equivalent to "a". Query with f1 (a_string) = 'A' should return a line, but it doesn't.

    SQL> SELECT a_string, f1(a_string) as f1_a_string, f1('a') as f1_literal
      2    FROM tmp_t1
      3   WHERE f1(a_string) = 'A';
    
    no rows selected
    

    Anyone know if this is an expected behavior? And, is it possible to disable the index based on a function whenever the underlying function signature is changed? The parameter query_rewrite_integrity = applied from

    DOC-ID 66277.1 does not seem to do the trick:

    (c) session variables

    ~~~~~~~~~~~~~~~~~~~~

    QUERY_REWRITE_ENABLED (true, false),

    QUERY_REWRITE_INTEGRITY (confidence, forced, stale_tolerated)

    determines the optimizer to use index based on a function with

    expressions using SQL, user defined functions functions.

    TRUST: Oracle allows rewrites using relationships that have

    was declared.

    APPLIED: Oracle ensures and guarantees consistency and integrity.

    STALE_TOLERATED: Oracle allows rewrites using vessels of the relationship not applied.

    Used in the case of materialized views.

    Set session variable cost function optimizer to choose the

    a function-based index

    Kind regards

    SAMO

    From the Manual 11.2 ( https://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_indexes.htm#ADFNS254 )

    "If you change the semantics of a DETERMINISTIC run and recompile, then you must manually rebuild all addicts depending on index and materialized views." Otherwise, they report results for the previous version of the function. »

    This note is not that I made my initial comment well - which was based on an incorrect memory the relationship between function-oriented and autonomous pl/sql functions, so I won't try to explain it. In fact, I went back to Oracle 8i practice to see if something had changed between yesterday and today and found that I had described exactly the behavior that the OP has been seeing. It's the way it is supposed to be.

    Concerning

    Jonathan Lewis

  • highlight the function on that I am based on the line of code that I'm

    I tried, but I couldn't find the right combination to find an answer, so sorry if this has been asked before.

    I find myself with 'find the database object' a lot, which is great, when I'm looking for a line of source code.  When I click on the result and get to the line of source in the body, I do a lot of scrolling sometimes to understand what I am in the service.

    Is there a way to have SQLDeveloper highlight automatically the function in the connections tree based on the line of my cursor is on in the code editor?

    Thank you very much in advance.

    In version 4, if you look at the bottom of your editor, you will see the navigation breadcrumbs, which will tell you where you are at.

  • Get this error on pages MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function. Have read and did what I could find to solve problems.

    Hi I keep getting the error MuseJSAssert: error calling the function switch: TypeError: $(...). museMenu is not a function on my Web site which is not published, but I am downloading in British Colombia through muse.

    I'm on a PC.

    I tried export to HTML and still have the same problems locally.

    I saw that someone had a problem with mailchimp forms in one of a previous post. I removed the a widget of external source? for reservation and it was always happening.

    I created a new project like this and downloaded BC site all the files again to see if she could make a difference but still have the error.

    It's my URL BCdraft - home

    I tried to look at the site in the section "console" (where you can see the code of pages) to see if I could see the error that people had already advised but I get nothing... maybe not completely published because?

    I have reloaded the site through the muse in British Colombia with "all files" and is always the same.

    Here are some pictures that can help...

    Once on the home page, it may come with the error immediately or not... If you choose to say the title of the FAQ

    choose faq.png

    You must then (or choose other titles until it is) have this error coming...

    error.png

    Note that the title you have previously chosen as 'FAQ' now as 'price '.

    Changes to old title pricing.png

    This title is for some time and seems strange appears again.

    Here is a picture of scripts/css in the admin of BC as I've seen that this can be a problem but I don't know if this is normal or not and how to fix...

    cpanel.png

    I had taken a break from building the site for about a month and I had added on changes, but not them uploaded to the server just left saved on my PC.

    In the hope of an easy solution; p

    See you soon,.

    Steve.

    I published BC... what I wanted to say is that I did not live.

    Export HTML was to check if the error occurred in the HTML files locally.

    It ended up being a code of the external widget that was causing the problem. With him removed the pages work fine. (I had removed what I thought of them while troubleshooting, but I forgot to a separate embedded image)

    Specifically, it is because it was a pop-up overlay widget made for reservations. When I put it to then start a new page in the tab it works now. Seems that muse has changed to something allowing overlays?

    My thanks to Neha in support

  • When I use the function "cut", the line of results more sharpness compared to the original files. For example, {A: "file.psd"-> cultures 4x6inch, 300 dpi-> B: "cropped file.psd} then the results are as described as a first step. What s the problem.

    When I use the function "cut", the line of results more sharpness compared to the original files. For example, {A: "file.psd"-> cultures 4x6inch, 300 dpi-> B: "cropped file.psd} then the results are as described as a first step. What s the problem. (Photoshop CC, windows7)

    I'm a Retoucher of photpfile have used the CS2 version for many years, and fuction 'Harvest' is an important and frequent tree tools myself. The result of the broke lines drive me annoying cause my feeling touch Sofete are all blown away. Please help me.

    I think you're talking about using the crop tool? If you're cropping with a size and resolution that involves interpolation of the image, the crop tool will use your preference for the Interpolation of the Image. By default, bicubic is automatic, which can easily result in a sharp file. Change your preference (in general) to bicubic and you shouldn't see any sharpening.

    I hope it works for your situation.

  • Did someone having problems connecting to the functionality of adobe currently shipping?

    Did someone having problems connecting to the functionality of adobe currently shipping?

    Finally got the link: https://cloud.acrobat.com/send

  • I received this warning when I open a specific page on my Web site in Internet Explorer: MuseJSAssert: error calling the function switch: error: a security problem has occurred.

    Hello

    I discovered when I'm in Internet Explorer and go to the page "artists."

    and I click on a name, for example: "Abel team ELA / I ai Gomes

    I get this warning:

    MuseJSAssert: Error calling the function switch: error: a security problem has occurred.

    It is only in IE, not when I use Safari or Chrome

    This is the Web site link

    Any ideas how to solve this problem?

    There is an invalid hyperlink on the Abel Equipe ELA / I've got Gomes page on a piece of text which reads "with"your entry. You must find this text in the Muse, delete the hyperlink and enter a valid.

  • How to reuse the function to be triggered by multiple eventlisteners?

    The first line works and adds the movieclip "MyMC" of the library through links AS.

    I would like to reuse the function so I can replace MyMC MyMC2 MyMC3 etc with

    No idea how this is done?

    layer3Holder.myMc.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC2.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC3.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC4.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    function moveMC(e:MouseEvent) {}

    var newMC:MyMC = new MyMC();

    layer3Holder.addChild (newMC);

    newMC.x = 250;

    newMC.y = 250;

    newMC.addEventListener (MouseEvent.DOUBLE_CLICK, onDoubleClick);

    newMC.addEventListener (MouseEvent.MOUSE_DOWN, dragMC);

    newMC.addEventListener (MouseEvent.MOUSE_UP, dropMC);

    newMC.addEventListener (MouseEvent.MOUSE_OUT, dropMC);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ZOOM, gestureZoomHandler);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ROTATE, gestureRotateHandler);

    newMC.mouseChildren = false;

    newMC.doubleClickEnabled = true;

    }

    function onDoubleClick(e:MouseEvent) {}

    e.currentTarget.parent.removeChild (e.currentTarget);

    }

    function dragMC(e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function dropMC(e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    function gestureZoomHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.scaleX * = e.scaleX;

    e.currentTarget.scaleY * = e.scaleX;

    }

    function gestureRotateHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.rotation += e.rotation;

    }

    assuming that these references of Dispatcher mousedown are also names, you can use:

    layer3Holder.myMc.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC2.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC3.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    layer3Holder.myMC4.addEventListener (MouseEvent.MOUSE_DOWN, moveMC);

    var newMC:MovieClip;

    function moveMC(e:MouseEvent) {}

    do something with of the previous newMC?

    code here.

    {if (e.currentTarget.Name.substr (4).)} (Length>0)}
    var:Class=Class(getDefinitionByName("MyMC"+e.currentTarget.name.substr(4))) C;
    newMC = new C();
    } else {}
    newMC = new MyMC();
    }

    layer3Holder.addChild (newMC);

    newMC.x = 250;

    newMC.y = 250;

    newMC.addEventListener (MouseEvent.DOUBLE_CLICK, onDoubleClick);

    newMC.addEventListener (MouseEvent.MOUSE_DOWN, dragMC);

    newMC.addEventListener (MouseEvent.MOUSE_UP, dropMC);

    newMC.addEventListener (MouseEvent.MOUSE_OUT, dropMC);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ZOOM, gestureZoomHandler);

    newMC.addEventListener (TransformGestureEvent.GESTURE_ROTATE, gestureRotateHandler);

    newMC.mouseChildren = false;

    newMC.doubleClickEnabled = true;

    }

    }

    function onDoubleClick(e:MouseEvent) {}

    e.currentTarget.parent.removeChild (e.currentTarget);

    }

    function dragMC(e:MouseEvent) {}

    e.currentTarget.startDrag ();

    }

    function dropMC(e:MouseEvent) {}

    e.currentTarget.stopDrag ();

    }

    function gestureZoomHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.scaleX * = e.scaleX;

    e.currentTarget.scaleY * = e.scaleX;

    }

    function gestureRotateHandler(e:TransformGestureEvent):void

    {

    e.currentTarget.rotation += e.rotation;

    }

  • Problem to set the function key button

    Hello

    JHs: 11.1.1.3.35
    JDev: 11.1.1.4

    I have a button that I want to assign a function key for. I based the JHs tutorial and added the following lines:

    (1) #ADD_GROUP_ACTION(${JHS.page.group} "RefreshButton" "${JHS.current.item.id}") for model TOOLBAR_BUTTON

    (2) ${JHS.registerFunctionKey("shift F5","Shift+F5","Refresh","RefreshButton",true)} to the REGISTER_FUNCTION_KEYS model

    Now, the new function button appears in the list of the function keys when I press ctrl + K, but by pressing ctrl + k has no effect. I have no idea why it does not work. What should I do to make this work?

    Here are the attribute added to the page:

    < name f: attribute = "RefreshButton.
    value = "ReplyDepartmentQueuePC:ReplyDepartmentQueueRefreshBtn" / >

    and here's the definition of the commandButton:

    < af:commandButton id = "ReplyDepartmentQueueRefreshBtn".
    textAndAccessKey = ' #{nls ['REPLYDEPARTMENTQUEUE_REFRESHBTN']}. "
    Icon="/jheadstart/images/refresh.gif".
    actionListener = "#{bindings." ExecuteQueryReplyDepartmentQueue.execute}.
    shortDesc = "#{nls ['REPLYDEPARTMENTQUEUE_REFRESHBTN_HINT']}."
    iconPosition = 'creeping' > < / af:commandButton >

    See you soon,.
    Will do

    Will do,

    Can enable you logging ADF for package oracle.jheadstart.controller.jsf.bean, which should show instructions for debugging of bean FunctionKeyHandlerImpl Manager.

    Better yet, run your application in mode bug, set a breakpoint in FunctionKeyHandlerImpl.handleKeyCode and press Caps - F5. That should clarify what happens.

    Steven Davelaar,
    Jheadstart team.

  • the function on forms 4.5 problems

    Hi all... can anyone help me to solve my problem... im so depressed with this... :(

    I create a function object to our test server with this script: where sc_hijri_end_date
    is VARCHAR2 (30) in the TEST table.
    --------------------------------
    create or replace
    FUNCTION f_conv (p_hijri_date IN VARCHAR2)
    DATE OF RETURN
    IS
    BEGIN
    RETURN TO_DATE (p_hijri_date, ' dd/mm/yyyy','nls_calendar = "English Hijrah" ');
    END f_conv;
    --------------------------------

    I call this function in a function SET_BLOCK_PROPERTY, where v_where_clause is VARCHAR2 (512).
    --------------------------------
    v_where_clause: = ' f_conv (sc_hijri_end_date) < = "' | to_char(:Control.txt_date) | '''';
    SET_BLOCK_PROPERTY (block_id, DEFAULT_WHERE, v_where_clause);
    GO_BLOCK ('test');
    EXECUTE_QUERY;
    --------------------------------
    NOTE: I have no problem with that... I can retrieve record. But when I try to create a program of units (function) in the form.
    There is no save retrieve. :(

    This is the function I created in form. :
    --------------------------------
    FUNCTION f_con (p_hijri_date IN VARCHAR2) DATE of RETURN IS
    date of T_DATE;
    BEGIN
    BEGIN
    SELECT TO_DATE (p_hijri_date, ' DD/MM/YYYY','nls_calendar = "English Hijrah" ')
    IN T_DATE
    FROM DUAL;
    END;
    MESSAGE (to_char (V_DATE));
    take a break;
    RETURN T_DATE;
    END;
    --------------------------------

    Yet once... by using this function, I call this function in a function SET_BLOCK_PROPERTY, where v_where_clause is VARCHAR2 (512).
    --------------------------------
    v_where_clause: = ' f_con (sc_hijri_end_date) < = "' | to_char(:Control.txt_date) | '''';
    SET_BLOCK_PROPERTY (block_id, DEFAULT_WHERE, v_where_clause);
    GO_BLOCK ('test');
    EXECUTE_QUERY;

    He has not recovered records. :(

    Everything that you put in the where clause of a block is added to the sql issued forms to run the query. The sql code is sent to the database and there, running on the server. So, it's impossible to use a local sql function, as the database doesn't "know" this function.

Maybe you are looking for

  • Enable JAVA plugin on Firefox 25 Linux

    Java is installed and running: java -version Java version "1.7.0_45".Java (TM) SE Runtime Environment (build 1.7.0_45 - b18)Java for 64-bit Server VM (build 24.45 - b08, mixed mode) creates a symbolic link-pwd/ Home/kramer9/images/Firefox/plugins[kra

  • Qosmio F10 - a few disruptions, watch television in the Media Center & Qosmio player

    Hello I have a Qosmio F10.The motherboard died and was replaced by Toshiba with a new saw 915 chips.I was watching TV in media library and Qosmio player with no problems. But recently, I noticed that after playing for awhile, the TV has a few disrupt

  • iTunes Radio Gone?

    I listen iTunes Radio Smooth Jazz and Jazz. ITunes, I started this morning, went on the Radio and my Jazz stations have disappeared and replaced by beats. Where's my radio? I'm on the current level of iTunes 12.3.1.23. Thank you Denny

  • My Officejet 6600 printer does not illuminate.

    My 6600 Officejet was bought on Amazon in December.  It worked perfectly until yesterday. A few days ago, I printed some photos and they are fine. Yesterday I noticed it was off, so I tried to rurn it and it wouldn't. I did all the stuff with the pow

  • Disable the touchpad on HP 6530 b

    Can someone help me to disable my touchpad on a 6530 b?  I use a mouse and the cursor jumps around.  The driver for the touchpad did not exist originally, but I managed to download the Symantic driver, but the 'disable' button is grayed out, and noth