Problem with the type of event
Hi Eone,
I have this class that extends Textfield:
the classic {} package
import flash.events.Event. *;
import flash.net.URLLoader;
import flash.net.URLRequest;
SerializableAttribute public class HTMLText extends TextField {}
public var urlR: URLRequest = new URLRequest();
public var xmlLoader: URLLoader = new URLLoader();
public var xmlData: XML = new XML();
function LoadXML(e:Event):void {}
xmlData = new XML (e.target.data);
}
public void HTMLText(urlRPath:String) {}
xmlLoader.addEventListener (Event.COMPLETE, LoadXML);
xmlLoader.load (new URLRequest ("http://www.kirupa.com/net/files/sampleXML.xml"));
this.htmlText = xmlData;
}
}
}
It is a very simple class, he has to create an instance of TF with a text obtained by .txt. but when I try, it tells me Error 1120, access to the property not defined (EVENT). But when I use this code outside the class, it works very well.
Why?
use:
import flash.events.Event;
import flash.text.TextField;
Tags: Adobe Animate
Similar Questions
-
problem with the type of local and global
Hi the gems...
I have a plsql package. In the package, I defined a proc that takes two input parameters of type simple number and a parameter of a type of output collection.
create or replace package pack_1 as body
procedure proc_1 (p_number1 in number, p_number2 number, p_tt_table to tt_table) as
v_tt_table tt_table:=tt_table();
type c_ref_cursor is ref_cursor;
v_c_ref_cursor c_ref_cursor;
v_sql varchar2 (20000): = < a large sql using bind variables p_number1 and p_number2 >
Start
Open the v_c_ref_cursor for v_sql using p_number1, p_number2;
loop
extract the v_c_ref_cursor in v_tt_table;
When the output v_tt_table.count = 0;
for idx in 1.v_tt_table.count
loop
< business logic >
end of loop
end loop;
close v_c_ref_cursor;
< excpetion_block >;
end;
< several codes for the rest of the package >
When I execute the proc_1 then he throws me error of data type incosistent while to fetch the v_c_ref_cursor of cursor in the v_tt_table variable.
ORA-00932: inconsistent data types: expected - was -.
But I have checked that the output of the query is similar with the type of variable.
Now, a few facts: the tt_table of the user-defined table type is made from ot_table (create or replace tt_table to ot_table Board).
The parent type i.e. ot_table has the same columns of this query in v_sql my proc.
The ot_table and the tt_table are global types.
But when I did these two types as local types, then the proc works very well. But I need them as global types only according to the condition in java.
Please help me. The database is 11 GR 2.
Thanks in advance.user12780416 wrote:
I'm trying to keep it in the simplest form... Please take a look...
Ah... Easy to solve.
The projection of SQL must be an object of type ot_test_type for extraction in bulk work.
Your projection of SQL look like this:
cursor c1 is select object_name from user_objects;object_name is a string - it is not of type ot_test_type.
You must change the projection to return ot_test_type. This is done by using the default constructor for that type of object.
For example
cursor c1 is ot_test_type (object_name) select as the user_objects OBJECT;He may now be in bulk recovered in tt_test_type.
-
problem with the type of date dd/mm/yyyy
Hi all!
I want to do something simple.
to get a type of dd/mm/yyyy string and convert it ti date jj/mm/aaaa type.
I wrote simple code
String pattern = "dd/MM/yyyy";
SimpleDateFormat format = new SimpleDateFormat (pattern);
try {}
Date = format.parse("12/03/2006");
System.out.println (date);
} catch (ParseException exception) e {}
e.printStackTrace ();
}
but the problem that I get Sun Mar 12 00:00:00 GMT + 02:00 2006
and I want to get this format dd/mm/yyyy.
because I need to insert it in my db. Thank you allFirst thing: almost always if a SQL statement uses variable data, use a PreparedStatement. With the help of a simple statement can, at first, most obvious glance, but it will cause endless problems.
The constant strings in SQL are "single quotes" i.e. apostrophes. They must at least cannot escape string constants. One of the reasons for always using class PreparedStatement is that you concatenate in a string value may contain an apostrophe. In this case it will be, at best, give your SQL syntax error. Worse it can make your system vulnerable to hackers.
Use code publishing code tags. Put the word 'code' braces before and after. This makes your code readable.
The field attribute by DEFAULT when you create a table must be a real date, not a model. I have never know this is useful for a date, except if it set to pick up the current date.
-
Hello! I use CS4 on Mac. It worked fine for months. All of a sudden today... I cannot change the type. When I click on the guy, he doesn't show as selected. Yet, she will move on. When I highlight text to edit it... He does not show it as some and it won't be changed. I tried to restart the program, and then the computer. Did not help. Trashing preferences would help? If so, how do I? Thank you.
Julie
You may turn on/off hide edges (Cmd - H)?
-
Problem with the type of data in a view
Hi all
I have modified a view. For this reason my view passed to varchar2 column data type number automatically. But it should be only a number.
Updated the view that changes the data type of column varchar2
VIEW to CREATE or REPLACE v1
AS
SELECT Decode (Sign (mta.base_transaction_value), 0, Decode (Sign (mta.transaction_value), Decode (Sign (mta.primary_quantity),-1, NULL, 0))
MTA.base_transaction_value),
-1, NULL,
Decode (Sign (mta.primary_quantity),-1, NULL, NULL
MTA.base_transaction_value),
(0)
1, MTA.base_transaction_value,
Col1 is NULL)
Mtl_transaction_accounts MTA
Old view that keeps this column under the number:
VIEW to CREATE or REPLACE v1
AS
SELECT Decode (Decode (Sign (mta.base_transaction_value), 0, Decode (Sign (mta.transaction_value), 0, Decode (Sign (mta.primary_quantity), 1,0,))))
0,0,
(NULL),
1.0,
(NULL),
1, MTA.base_transaction_value,
Col1 NULL))
Mtl_transaction_accounts MTA
-> Create a note that the type of data of base_transaction_value, transaction_value, primary_quantity columns is number
No help for making the data type of column 'col1' number using my first query?
Thank you
SriniThe data type of an expression of DECODE() is determined by that of his first return value. Oracle has decided that a NULL value is a VARCHAR2 data type (because there must be something ).
The changes to your code are extremely intertwined and twisted out and frankly too hard to work through. However, I think at some point the changes that you have implemented it had that effect.
SQL> create or replace view v1 2 as 3 select decode(to_number(to_char(sysdate, 'dd')), 1, 0, 99) as col1 4 from dual 5 / View created. SQL> desc v1 Name Null? Type ----------------------------------------------------- -------- ---------------- COL1 NUMBER SQL> create or replace view v1 2 as 3 select decode(to_number(to_char(sysdate, 'dd')), 1, null, 99) as col1 4 from dual 5 / View created. SQL> desc v1 Name Null? Type ----------------------------------------------------- -------- ---------------- COL1 VARCHAR2(2) SQL>
Cheers, APC
blog: http://radiofreetooting.blogspot.com
-
Hello
I have a problem. I've created a type
and also the body.create or replace type type1 as object ( field1 number, field2 number, constructor function type1 return self as result );
Now I have another type
In a function package, I have somewherecreate or replace type type2 as table of type1
If I run "describe type2" I see Field1 and Field2.... tmp type2; ... tmp=new type2(); tmp.extend --works tmp(tmp.last).field1 := ...<something>; --does not work, i got: Reference to an unitialized variable..., so that field1 is unrecognized
What I am doing wrong?
Thank you
Edited by: Roger22 the 12.07.2010 14:26Roger22 wrote:
But I need tmp (tmp.last) * .field1: = r.field1Ok then
tmp(tmp.last) := type1(r.field1, null);
-
Problems with the script to output event
In fact I don't know if I have a problem with the Exit event or if there is something wrong with my script syntax... The output of a field event, I check if the field is empty or not and check a flag I put in place.
The first if statement works - if I get back a value in the field, everything goes as planned. If I delete the value of the field, nothing happens.
//if field has a value hide subSection04 if (!(this.rawValue == null || this.rawValue.length == 0)) { subSections.subSection04.presence = "hidden"; } //if field is empty and flag equals true show subSection04 else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == true)) { subSections.subSection04.presence = "visible"; } //if field is empty and flag equals false hide subSection04 else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == false)) { subSections.subSection04.presence = "hidden"; }
There are a few groups radio button that also control this behavior, they are all inter relate. So I tried also triggers the Click event of a radiobutton Group (which resembles the value in this field) out of this area, but that doesn't seem to work.Hi Jono,
Your expression subFlags.Commercial.rawValue is true compares a String data type with a Boolean data type.
Edit the expression as subFlags.Commercial.rawValue is 'true'
I hope that this should work for you.
Your code should look like
//if field has a value hide subSection04 if (!(this.rawValue == null || this.rawValue.length == 0)) { subSections.subSection04.presence = "hidden"; } //if field is empty and flag equals true show subSection04 else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "true")) { subSections.subSection04.presence = "visible"; } //if field is empty and flag equals false hide subSection04 else if ((this.rawValue == null || this.rawValue.length == 0) && (subFlags.Commercial.rawValue == "false")) { subSections.subSection04.presence = "hidden"; }
Nith
-
Problem with the onChange event
Hello
I am currently facing a problem with the onChange event when you use a datefield entry type.
for example
< cfinput type = "datefield" name = "date_txt" width = "175" mask = onFocus = "date_txt.disabledDays" dd/mm/yyyy"= [0.6]; "tabindex ="1"style =" "text-align: left" onChange = "checkDate (); ">
And then, when I alert the selected date in checkDate function, I still get the old figure.
for example
public function checkDate (): Void {}
Alert ("Date:" + date_txt.text);
}
For example if the date displayed is 05/05/2008 and I select another day (05/02/2008), then when the alert box appears, it still shows 2008-05-05.
Any idea on how to solve this problem?
Is this a bug with Flash Forms?
Thank you and best regards,
Yogesh MahadnacI suppose that the function onchange occurs before the value of text is actually defined.
Use the correct value
Alert ("Date:" + date_txt.selectedDate);Ken
-
Since 10.11 I have not been able to download via the usb port of my Davis Vantage weather station. No solution of tech Davis on the issue even with the new recorder of events in the resort. Is there a problem with the usb?
What Mac? (details)
-
Problem with the change in value of listbox event
Hello
I have a problem with the help of Listbox value change event. The code that I have attached is a simplified version of the largest program, but the problem is the same. One of the loops of Nonna is responsible for handlig occurring events ant the other is responsible for the execution of the program. In the project of oryginal I use a listbox control to determine which plots graphic display of a waveform is visible (first position of the listbox-> only plot first visible etc.). In the attached vi, I just show the current value of the listbox control. The problem is the event runs only once and then the program crashes. I want to be able to change the value of the listbox work both at idle and in State of a program, but when I put the structure of the event in both States, he does not. I'd be very grateful if someone smarter than me could tell me where I made my mistake. I want my program to be able to manage the keys and listbox events in States (slow down and knit) program.
You have two structures of event in two cases different from the structure of the case, and both are tuned to listbox events has changed. Because only once can be triggered at any time, the VI crashes (lock events the front panel (default) until the event can complement).
You must use a unique event structure managing all events.
The overall program architecture looks like inside-out for me.
For the buttosn, you must use action lock (switch not release!) and use the value changed events.
-
Hello
I am facing a problem with the events. Please Ref. Event.zip the attachment.AEv.vi is a LV2G used for the reading/Generate/Init/destroy the event. Test2.VI is a main vi (we must run this vi)
The AEv.vi Init action must be done in the other vi (other than the Test2.vi:- but for the objective test I've initialized in Test2.vi only).
Test2.VI is used for genetate event.
I could have called statically AEv.vi inside the Test2.vi to generate an event... but the path that comes is decided when running... (I have many live similar to AEv.vi...) .. who decided at run time...)
The problem:
When I run Test2.vi, it gives me the error code 1 (try running test2.VI... it gives the dialogue on the occurrence of the error)...
Can someone fix this?
Thank you!
I modified your screws to do what I think you want. The way you did the user events will not work. I added a line to send orders to Ev.vi
-
problem with the definition of a boolean as output parameter type
Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false
Hi, I have a problem with the definition of type boolean as output parameter and it must return true if the query procedure retrieves one line else it shouuld return false
And what are the issues? Its simple.
SQL> create or replace procedure is_emp_exist 2 ( 3 p_empno in emp.empno%type 4 , p_result out boolean 5 ) 6 as 7 l_empno emp.empno%type; 8 begin 9 select empno into l_empno 10 from emp 11 where empno = p_empno; 12 13 p_result := true; 14 exception 15 when no_data_found then 16 p_result := false; 17 end; 18 / Procedure created. SQL> declare 2 l_result boolean; 3 begin 4 is_emp_exist (7788, l_result); 5 6 if l_result then 7 dbms_output.put_line('Employee Exist'); 8 else 9 dbms_output.put_line('Employee does not Exist'); 10 end if; 11 end; 12 / Employee Exist PL/SQL procedure successfully completed. SQL> declare 2 l_result boolean; 3 begin 4 is_emp_exist (1000, l_result); 5 6 if l_result then 7 dbms_output.put_line('Employee Exist'); 8 else 9 dbms_output.put_line('Employee does not Exist'); 10 end if; 11 end; 12 / Employee does not Exist PL/SQL procedure successfully completed. SQL>
-
Hello, I am a beginner, I have a problem with the CLOB type, please help me
I want to write the input file is filename and string base64, then output decoded base64 content in dicrectory location (for example C:\),my code was executed but if entry with base64 long string, it displays error)
And this is my codeORA-29285: file write error ORA-06512: at "SYS.UTL_FILE", line 136 ORA-06512: at "SYS.UTL_FILE", line 813 ORA-06512: at "SYSTEM.WRITED", line 9 ORA-06512: at line 1 29285. 00000 - "file write error" *Cause: Failed to write to, flush, or close a file. *Action: Verify that the file exists, that it is accessible, and that it is open in write or append mode.
Thank youcreate or replace directory dir_temp as 'C:\'; / create or replace procedure writed(filename varchar2,code clob) as f utl_file.file_type; v_lob BLOB; begin v_lob := UTL_ENCODE.BASE64_DECODE( UTL_RAW.CAST_TO_RAW(to_char(code)) ); f := utl_file.fopen('DIR_TEMP', filename, 'w'); utl_file.put_line(f,to_clob(utl_raw.cast_to_varchar2(v_lob))); utl_file.fclose(f); end;
DBMS_XSLPROCESSOR.clob2file( cl => l_clob , flocation => 'XML_LOG' , fname => myfile_name );
for example
SQL> ed Wrote file afiedt.buf 1 declare 2 type t_emps is table of emp%ROWTYPE; 3 v_emps t_emps; 4 -- 5 v_clob clob; 6 v_newline varchar2(2) := chr(13)||chr(10); 7 begin 8 -- get the rows into a PL/SQL collection of records 9 select * 10 bulk collect into v_emps 11 from emp; 12 -- build up the CLOB 13 v_clob := 'EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO'; 14 for i in 1..v_emps.count 15 loop 16 v_clob := v_clob||v_newline|| 17 to_char(v_emps(i).empno,'fm9999')||','|| 18 v_emps(i).ename||','|| 19 v_emps(i).job||','|| 20 to_char(v_emps(i).mgr,'fm9999')||','|| 21 to_char(v_emps(i).hiredate,'YYYYMMDD')||','|| 22 to_char(v_emps(i).sal,'fm99999')||','|| 23 to_char(v_emps(i).comm,'fm99999')||','|| 24 to_char(v_emps(i).deptno,'fm99'); 25 end loop; 26 -- write the CLOB to a file 27 DBMS_XSLPROCESSOR.clob2file(cl => v_clob, flocation => 'TEST_DIR', fname => 'myfile.csv'); 28* end; SQL> / PL/SQL procedure successfully completed.
-
Strange problem with the keyboard event listener
I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;
protected function onComplete(event:FlexEvent):void
{this.setFocus ();
this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);}
private void trapKeys(e:KeyboardEvent):void {}
If (e.keyCode == 96) {}
This.Close ();
}
Else if (e.keyCode == 48) {}
This.Close ();
}
}When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?
Thanks in advance.
Hi, Ahmed.
I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?
Please consider:
on full add keyboard listener
protected function applicationCompleteHandler(event:FlexEvent):void
{
this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);
};
//
protected function applicationActivateHandler(event:AIREvent):void
{
If (this.stage)
{
switch the State to display full-screen when activated
If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)
{
this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
};
};
};
//
private var exitHandled:Boolean = false;
on NUMBER_0 | NUMPAD_0 exit-close
protected function trapKeys(event:KeyboardEvent):void
{
If ((event.keyCode is Keyboard.NUMBER_0
|| event.keyCode is Keyboard.NUMPAD_0)
(& this.exitHandled == false)
{
exitHandled = true;
this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);
This.Close ();
};
}
(Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)
Kind regards
Peter
-
Problem with the DATA types, in a UNION
Hello
I m trying to disply a custom message when no data found using the structure below. Unfortunately I ve you have a problem with the data types I im trying to union
I tried different types of data in the 2nd SELECTION tool but the rest of the problem. Help, please.
SELECT HOSP_NAME 'HOSPITAL' DOC_SUR 'NAME', 'NAME' DOC_NAME, d.DOC_ID ID, diagnosis
H., DOCTOR d, (SELECT d.DOC_ID, COUNT (d.DIAGN_ID) diagnosis
OF PATIENT_DIAGNOSIS d
GROUP BY d.DOC_ID)
WHERE diagnosis > 1
UNION ALL
SELECT TO_CHAR ('test'), TO_CHAR ('test'), TO_CHAR ('test'), TO_CHAR ('test'), 0
OF THE DOUBLE
If NOT EXISTS (HOSP_NAME 'HOSPITAL' 'NAME' 'NAME' DOC_NAME DOC_SUR, d.DOC_ID ID, diagnosis
OF ΝΟΣΟΚΟΜΕΙΟ h, ΙΑΤΡΟΣ d, (SELECT d.DOC_ID, COUNT (d.DIAGN_ID) diagnosis
OF PATIENT_DIAGNOSIS d
GROUP BY d.DOC_ID)
WHERE diagnosis > 1);
ORA-01790: expression must have same type of data, matching expression
01790 00000 - "expression must have the same type of data, matching expression.DOC_SUR 'NAME' DOC_NAME 'NAME', ID d.DOC_ID, HOSP_NAME "HOSPITAL", diagnosis
What is the data type for these columns
To_char('test'), to_char ('test'), to_char ('test'), to_char ('test'), 0
What you're doing here 'test' is already a character. Why do you use TO_CHAR?
Maybe you are looking for
-
I now have iOS 9.3.1 on iPad 2. Should I moderniser.2,.3,.4?
-
Windows Vista Express Upgrade in Slovakia?
Hi, a few days back (3 January 2007), I bought Toshiba Satellite A100-912. Between documents grouped in this laptop there is a flyer who briefed me on the Web site for this opportunity to upgrade (http://www.toshiba-europe.com/vista%2Dupgrade/). Now,
-
Reclassification of Mavericks in El Capitan
Hello Other cloning my Mac HD (Mavericks) before continuing, there are other specific action, I must take before installing the upgrade on El Capitan? Thank you Gary
-
Hi all stupid question: where can I download OS Yosemite? Looking for a link on the Web page of mac failed.
-
X 1 carbon 20BS do not recognize the Mini Display Port
Hello - I have recently acquired a Thinkpad X 1 carbon 20BS with a new installation of window 10. While I am able to connect to external monitors via HDMI, I was unable to do that via the Mini Display Port. Connection of a monitor to the Mini Display