Callback function not getting called

时间:2015-05-12 22:38:33

标签: javascript angularjs

Here is the code:

library ieee;
-- use ieee.std_logic_arith.all;
use std.textio.all;
use ieee.std_logic_1164.all;

entity filex is 
    port ( 
        clk: in std_logic
    );
end entity filex;

architecture test of filex is 
    signal d1,d2,d3: integer;
begin
    process (clk)
        variable  outline:      line; 
        variable  inline:       line;
        variable  a:            integer;
        -- file input_file: text open read_mode is "c:\users\k56c\desktop\test.txt";
        file infile: text open read_mode is "test.txt";
        file outfile: text is out "outputlink";
    begin
        if not endfile (infile) then
            readline(infile, inline);
            read(inline , a );
            a := a + 10;
            write(outline, a);
            writeline(outfile, outline);
        end if;
    end process;
end architecture test;

If I insert the definition of $scope.adjustSidebar in as $watch's second argument, the code works fine. As soon as I try to extract it like this, the code breaks (i.e. $scope.adjustSidebar does not get executed on event fire). Why is this? What is the difference if I store the function in a variable and use the variable as the argument or use the actual definition as the argument? T

Thanks in advance.

1 个答案:

答案 0 :(得分:2)

Moved the callback to after the function call.

:ATTACK
SET NUM=%RANDOM:~-2%
IF %NUM% GTR %STR% GOTO ATTACK
IF %NUM% LSS 0 GOTO ATTACK
CLS
ECHO YOU TAKE %NUM% HEALTH FROM 
ECHO THE ENEMY
PAUSE>NUL
REM the problem is these line of code Its probably is the last line but I'm
REM thinking that V this single line is fine but you can never be too sure
SET /a ENHEALTH=%ENHEALTH% - %NUM%
SET /a EXP= %EXP% + %NUM% * 2
GOTO ENATTACK