Selection.setFocus(null)
I have a movie clip that holds a text field that can be
changed either by typing in to it or clicking buttons (also
contained in the movieclip). Once the text field has focus there
seems to be no way of getting rid of it other than clicking in
another field. I have tried using Selection.setFocus(null) and this
appears to kill the focus but it is returned straight away and
while the field has focus the button input fails.
I am stuck, any thought welcome
Cheers all
there must be some event that triggers your textfield to
loose focus. that can be any user action or a timer or anything
else that occurs within your swf or anywhere that your swf can
access. at that point your code should work.
Similar Messages
-
Hi,
I have the problem with the new managed ODP.Net driver.
If I fetch data from a select which has column with a fixed value "NULL" the driver decides after a certain amount of data that the value is not null any more. Which causes a lot of problems especially if you try to hide not needed blob data.
The Problem somehow depends on the FetchSize of the command. It seems like the error occurs if more than one db round trip to fetch the result is necessary.
System: Windows 7 64 Bit
Platform: .net 4.0 x86
database: 11g Release 11.2.0.3.0 - 64bit Production
Oracle.ManagedDataAccess Version: 4.112.350
I created a small example to reproduce the problem.
Thanks for your help
Dominik
Stored Proc:
create or replace PROCEDURE TestNullField
v_IntPara IN NUMBER DEFAULT NULL ,
v_StrPara IN VARCHAR2 DEFAULT NULL,
cv_1 OUT SYS_REFCURSOR
AS
BEGIN
OPEN cv_1 FOR
select rownum, v_StrPara, NULL from dual connect by level <= v_IntPara;
--select IDX, NULL, DESCRIPTION FROM TEST_BLOBTABLE;
END;C# Code:
using System;
using System.Text;
using Oracle.ManagedDataAccess.Client;
using System.Data;
namespace OracleBlobTest
class Program
private static string _connectionString = @"User ID=YourUser;Password=YourPwd;Data Source=YourServer:YourPort/YourSchema;";
private static string _spName = @"TestNullField";
private static string _strPara = @" Long test string";
private static int _intPara = 200;
static void Main(string[] args)
using (OracleConnection connection = new OracleConnection(_connectionString))
using (OracleCommand cmd = connection.CreateCommand())
cmd.CommandText = _spName;
cmd.CommandType = CommandType.StoredProcedure;
connection.Open();
string alongString = _strPara;
while (alongString.Length < 2000)
alongString += alongString;
alongString = alongString.Substring(0, 2000);
OracleCommandBuilder.DeriveParameters(cmd);
if (cmd.Parameters.Count > 0 && (cmd.Parameters[0]).Direction != ParameterDirection.ReturnValue)
cmd.Parameters[0].Value = _intPara;
cmd.Parameters[1].Value = alongString;
// change this to change the moment when it starts to go wrong
///cmd.FetchSize = 5000;
using (OracleDataReader reader = cmd.ExecuteReader())
int count = 0;
while (reader.Read())
count++;
for (int idx = 0; idx < reader.FieldCount; idx++)
if (reader.GetName(idx) == "NULL")
if (!reader.IsDBNull(idx))
//something is very wrong here - why is not not null any more???
Console.WriteLine("Fix NULL Field[{0}] {1} is not null >{2}< in row {3} ", idx, reader.GetName(idx), reader[idx], count);
Console.WriteLine("Rows found: " + count);
connection.Close();
Console.WriteLine("done press enter");
Console.ReadLine();
}Edited by: user540519 on 10.12.2012 15:11
Edited by: user540519 on 19.12.2012 13:50Hello
I ran the testcase here and reproduced the issue on 32 bit unmanaged beta v4.0.30319
note: same testcase works with Oracle.DataAccess (but not with managed).
This appears to match unpublished defect Bug 14666093 and is meant to be fixed in a later beta release.
Some things I noticed when testing
with the default fetchsize the breaking point is 67 iterations.
e.g.
private static int _intPara = 66; // Works
private static int _intPara = 67; // Fails
If I increase the fetchsize then it breaks at different values as you noticed..
Hope this helps.
Kind Regards
John -
Selection of Null Value in Transformation file
Hi Guru's,
I've been trying to select NULL values of a field in transformation file but unfortunately system always gets both null and filled values of the field ALTHOUGH i had maintained the Selection Option.
Data management package is: Load Transaction Data from BW InfoProvider UI
The technical name of field: 0FLAG
I've tried each possibilities as in below
SELECTION: 0FLAG, *STR()
SELECTION: 0FLAG, *STR();
SELECTION: 0FLAG, ""
SELECTION: 0FLAG, " "
SELECTION: 0FLAG, NULL
SELECTION: 0FLAG, *STR(#)
SELECTION: 0FLAG, #
SELECTION: 0FLAG, "#"
Doesn't work.
thanks in adv. for your precious supportsHi Sadi,
I understand your question that, you want to load tr. data from infocube and you have a trouble with one field which name is "0flag" in this cube, right? If your case is above, you need conversion file for flag, and convert like that # = "DUMMY" or sth.
Or, you can solve in BW with transformation file routine.
I hope, it will help you.
Thanks. -
Select list null value issue - for filtering the tabular form report
hello,
I have a tabular form created on emp table and in the table their are entries for the employees who don't have a location, like it is null for some of the employees.
Now I have created a select list item - for filtering the results based on location.
my select query for select list item is
select distinct location_name d,location_id r from emp order by 1
-- so my select list contains all the distinct location_name including the null on my tabular form.
so based on the selelcted value(in the select list), I am able to filter the results in my tabular form.
but the thing is that when i try to select an null value from my select list - i am not able to filter my report - like its displaying all the records, its not filtering.
can anyone help me out with this.
thanks.Hi
Try below select for LOV
select distinct nvl(location_name,'No Location') d,nvl(location_name,'No Location') r from emp order by 1 And then change tabular from select where clause also use nvl(location_name,'No Location') like
SELECT *
FROM emp
WHERE nvl(location_name,'No Location') = :Px_YOUR_ITEMBr, Jari -
Selection.setFocus();
Why is this one so hard. There are a couple dozen posts out
there but nothing I have tried works. So here it is.
An input textbox onScreen with an instance name of: myText -
that's it. // no text in the box.
Running the following script in the action layer in frame one
I have:
Selection.setFocus("myText");
Selection.setSelection(0,0);
This needs to run on Flash Player 6 so I am shying away from
getCaretIndex(); and a few other scripts I have seen.
I'll keep digging around, but by the looks of ALL the
questions and postings - this problem has been around for awhile.
Does ANYONE have an actual working input textbox
(test/sample) I can look at? (I am using FlashPro8)orion.doty,
it's just the line Selection.setFocus("textfieldname") and
the fact that Flash has focus that make the cursor blink. I tried
with publish settings for player 6 & 8, both AS 1 and AS 2,
they all work fine in player 8 on Windows. I don't know if maybe
the Mac player behaves different... In Win it doesn't matter if
it's the plugin or the standalone player.
Try a little testmovie: in frame 1, place a stop() and a
button that has nextFrame() onRelease. In frame 2, place the
textfield, and add Selection.setFocus("textfieldname") to the
frame's actions. If you test the movie, the cursor should blink
when you pressed the button and the movie enters frame 2. It won't
work if you leave out frame 1 with the button, so I guess Flash has
to receive the focus through a click inside it to highlight the
focused selection.
hth,
blemmo -
Selection.setFocus() weirdness
Hi All,
I am getting a bug in Flash player and also in the Flash Test
Movie publish involving the Selection.setFocus() method (authored
using Flash 8).
I have 3 movie clips that require focus toggled between them
via keyboard directional arrow input. Those clips are:
- musicVolume_mc
- effectsVolume_mc
- speechVolume_mc
I initially set the focus to the first movieClip:
Code:
Selection.setFocus("musicVolume_mc");
and then each movieClip uses the following code example
placed on the clip itself to target the next clip;
Code:
on(keyPress "<Up>"){
Selection.setFocus("_parent.speechVolume_mc");
on(keyPress "<Down>"){
Selection.setFocus("_parent.effectsVolume_mc");
Trouble is, the focus doesn't get passed as you would expect
between each of the 3 clips, it gets stuck and jumps to the wrong
clip....it's quite strange and frustrating. Has anyone had this
issue?
What do other people use to set Focus between movieClips
reliably..?
thanks
mitchellthanks for your reply,
I managed to solve the problem by disabling the tabEnabled
setting with is by default set to "true" and clashes with keyboard
arrow input..
Code:
instanceName.tabEnabled=false;
Also, if anyone else has this issue in future, relative paths
inside the setFocus parameter didn't work for me....so use absolute
ones instead, as in the following example.
Code:
Selection.setFocus("_root.audioOptions.effectsVolume_mc");
cheers -
Receiver JDBC adapter to SELECT is null records?
Hi,
I have an interface with an Oracle database and I need to read only the records that have a null value in a field.
I have created the mappings and all work fine except the selection for this records, in other words I need simulate in the where clausule an 'is null'.
Select field1 field2 from table tab1 where field1 = 'A' and field2 = 'B' and boldfield3 is nullbold
I have try with attributes isNULL and hasQuot but doesn't works
Could somebody help me?Try this...
Select field1,field2 from tab1 where field1='A' and field2='B' and field3 IS NULL; -
Do we have a function in oracle to select not null columns at the begining
Hi,
I have 8 columns. Some of them might be null.
I want to display all 8 columns in my result. Not null columns will be first and null at the end.
Here is a sample data :
Employee table :
Employee_id Emp_fname emp_lname emp_mname dept salary emp_height emp_weight
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223The expected result is :
result1 result2 result3 result4 result5 result6 result7 result8
1 aaa ddd d1 100 6 180
2 bbb ccc 120 169
3 dfe d2 5.9 223Thanks.
Edited by: BluShadow on 12-Jul-2012 16:12
added {noformat}{noformat} tags for readability. Please read {message:id=9360002} and do this yourself in future.The requirement doesn't make a lot of sense and tends to imply that you have an incorrect data model. If that's the case, you'd be much better off fixing the data model than in trying to write this sort of query (particularly since a poor data model is going to force you to write a bunch of creative SQL).
If you define a type and a function
CREATE TYPE num_tbl AS TABLE OF NUMBER;
create or replace function count_null( l_nums in num_tbl )
return number
is
l_cnt integer := 0;
begin
for i in 1..l_nums.count
loop
if( l_nums(i) is null )
then
l_cnt := l_cnt + 1;
end if;
end loop;
return l_cnt;
end;Then you can do something like this
SQL> ed
Wrote file afiedt.buf
1 select product,
2 coalesce( q1, q2, q3, q4 ) col1,
3 (case when count_null( num_tbl( q1 ) ) = 0
4 then coalesce( q2, q3, q4 )
5 when count_null( num_tbl( q1, q2 ) ) = 1
6 then coalesce( q3, q4 )
7 when count_null( num_tbl( q1, q2, q3 ) ) = 1
8 then q4
9 else null
10 end) col2,
11 (case when count_null( num_tbl( q1, q2 ) ) = 0
12 then coalesce( q3, q4 )
13 when count_null( num_tbl(q1, q2, q3) ) = 1
14 then q4
15 else null
16 end) col3,
17 (case when count_null( num_tbl( q1, q2, q3 ) ) = 0
18 then q4
19 else null
20 end) col4
21* from saleshist
SQL> /
PRODUCT COL1 COL2 COL3 COL4
Oracle EE 100 123 128
Partitioning 100 130 128Justin -
Help with select on null values
drop table t1;
create table t1 ( c1 number,c2 varchar2(2) );
insert into t1 values(1,'A');
insert into t1 values(2,'B');
insert into t1 values(3,'');
insert into t1 values(4,'D');
drop table t2;
create table t2 ( c1 number,c2 varchar2(2) );
insert into t2 values(1,'A');
insert into t2 values(2,'B');
insert into t2 values(3,'');
insert into t2 values(4,'C');
select a.c1 from t1 a ,t2 b
where a.c2 = b.c2;
and result should be
1
2
3does not make any difference
drop table t1;
create table t1 ( c1 number,c2 varchar2(2) );
insert into t1 values(1,'A');
insert into t1 values(2,'B');
insert into t1 values(3,null);
insert into t1 values(4,'D');
drop table t2;
create table t2 ( c1 number,c2 varchar2(2) );
insert into t2 values(1,'A');
insert into t2 values(2,'B');
insert into t2 values(3,null);
insert into t2 values(4,'C');
select a.c1 from t1 a ,t2 b
where a.c2 = b.c2;
and result should be
1
2
3 -
Hi to all , if anybody knows how to tackle with the following situation, please reply urgently. Thanx in advance.
Suppose I have a table EMPLOYEE , with EMPLOYEE_ID as primary key , as:
E_ID EMPLOYEE_NAME
1 abc
3 pqr
6 xyz
I want to fire a query as
" select E_ID from EMPLOYEE where E_ID IN ( 1, 8 , 6) "
The result is as
1
6
But I want a result as null ( or any other indication) for the record which is null , i.e I want a result as
1
null
6
I have tried nvl, but dont get result as per my excepttation. Any clue , how to do this ? How should I write my query so that I will have the desired result. In desired result instead of null , any value or indication is acceptable.Here's how i understand your problem. You have a table with n records. You run a query with an IN argument list. Rows that match the argument list should be returned by the query as they are, but for arguments that have no corresponding row in the table a row should be returned indicating the status. I have come up with a solution, though a bit complicated one. To test it first run following script and then execute the query at the end.
CREATE TABLE employee
(E_ID number,
EMPLOYEE_NAME varchar2(30))
INSERT INTO employee
values(1,'A')
INSERT INTO employee
values(2,'B')
INSERT INTO employee
values(3,'C')
CREATE OR REPLACE TYPE emp_type AS OBJECT
(E_ID number,
EMPLOYEE_NAME varchar2(30));
CREATE OR REPLACE TYPE emp_tab_typ AS TABLE OF emp_type;
CREATE OR REPLACE TYPE arg_list_typ AS VARRAY(20)
OF NUMBER;
CREATE OR REPLACE FUNCTION emp_fun(p_arg arg_list_typ) RETURN emp_tab_typ
IS
v_emp_tab emp_tab_typ:=new emp_tab_typ();
v_cnt number:=0;
BEGIN
FOR r IN 1..p_arg.count LOOP
v_cnt:=0;
FOR x IN (SELECT E_ID,EMPLOYEE_NAME
FROM employee
WHERE E_ID=p_arg(r)) LOOP
v_emp_tab.extend;
v_emp_tab(v_emp_tab.count):=emp_type(x.E_ID,x.EMPLOYEE_NAME);
v_cnt:=1;
END LOOP;
IF v_cnt=0 THEN
v_emp_tab.extend;
v_emp_tab(v_emp_tab.count):=emp_type(null,null);
END IF;
END LOOP;
RETURN v_emp_tab;
END;
SQL> SELECT E_ID,nvl(EMPLOYEE_NAME,'Not Found')
2 FROM TABLE(CAST(emp_fun(arg_list_typ(1,3,4)) AS emp_tab_typ))
3 /
E_ID NVL(EMPLOYEE_NAME,'NOTFOUND')
1 A
3 C
Not Found
3 rows selected.--------------
Anwar -
Select list -null value?
When you create a select list on a column, and run the page for the first time, the drop down doesn't show any value. I realized that once you click on the drop down to see what the values are, at the bottom of the list there is a blank value. But you can only see this the first time you load the page. Once you click on any other value, that blank value is gone. How does this work? How can I select the blank value even after you had selected other values previously?
Thanks,Modify the Item Definition's List of Values options (Edit Page Item->LOV)
Display Null: Yes
Null Display Value: -
Selection.setFocus listener
Hi there!
How do I write a listener which can trigger the opening of a
MovieClip ( myMc.gotoAndStop(2) ) when Tab Selection occurs on a
given TextField ?
Many thanks in advance for your help!
Regards,
GerryHi kglad !
I did it this way (see attached code).
But got no result...
More : it makes my page (frame) unresponsive. -
how can i disable the arrow keys in combobox component. i use as2.
thnksFor the ones interested in the solution:
I solved it using Selection.setFocus(null) in my keyListener
which handles the arrow button functionality. (So put
setFocus(null) in your onKeyDown event).
Rick. -
Hi,
I tried a lot of things, but I can't disable the arrow keys
for the combobox and radiobutton components. I hoped someone could
tell me how to disable the listener for those components, but have
had no response.
Maybe someone can tell me how to lose the focus on those
components. I have one radiobutton group and two comboxes on stage.
Your help is greatly appreciated. Thanks!
Best regards,
Rick.For the ones interested in the solution:
I solved it using Selection.setFocus(null) in my keyListener
which handles the arrow button functionality. (So put
setFocus(null) in your onKeyDown event).
Rick. -
Hi,
I have the following problem:
On my stage sits a MC: personTab.nameBase. Inside the
nameBase clip there are 10 input fields named input## (numbered
from 0 - 9).
When I click one of these fields the cursor starts blinking
in the field which is clicked. This is OK, but the problem is that
the field doesn't loose focus unless a component is clicked
(radiobutton, combobox etc.).
I put in a listener to trace what happens:
In the onSetFocus event I get the target of the clicked field
and when I click the mouse somewhere on stage (where no component
is placed I get null as a target, but when I release the
mousebutton, the last selected field receives focus again and the
target of the field is returned again (instead of null). The
onKillFocus event doesn't return a thing. I already tried handling
the focus in the onSetFocus event in the following manner:
var clip:Array = newFocus._name.split(".");
if (substring(newFocus._name, 1, 5) == "input") {
var clipID:String = substring(newFocus._name, 6,
newFocus._name.length);
_global.activeField = clipID;
} else {
if(!newFocus._name){
//remove focus from textFields
Selection.setFocus(null);
delete _global.activeField;
But there is no response to Selecion.setFocus(null), the last
selected input field keeps getting focus after the mouse is clicked
on somewhere else on stage (but not on a component, or other text
field).
I hope someone can help me out. Thanks in advance.
Best regards,
Rick.onRollOver (your button) you store the begin and end index of
the Selection (in the textfield), onRelease(of your button) you set
your red textFormat on the previously stored indices, then you set
Selection.setSelection back to what it was...
Maybe you are looking for
-
My MacBook keeps freezing and crashing during startup and use, what's wrong?
My MacBook functioned perfectly for YEARS, and suddenly it started freezing during startup. One of four things happens: it starts up no problem, it freezes at the apple logo with the load wheel spinning, it freezes at a 'no' symbol (a circle with a l
-
My iphone 4 just turns off and on, my iphone 4 just turns off and on
my iphone 4 just turns off and on, my iphone 4 just turns off and on
-
Airplay desktop mirroring stutter
I am having an issue with airplay mirroring from my macmini to my Apple TV 2G. It works quite well in every scenario, except streaming internet video, explicitly when attempting to mirror live sportscasts from mac to Apple TV. The live sports from si
-
Hello out there, I need to merge a large amount of metadata and need to make sure I do it the right way. I'm not sure wheter this feature actually exist in Aperture at the moment, so I want to check if there's a clever and foolproof workaround? I've
-
I've been using Arch with a super minimal install with XBMC for about a year now but have finally bought myself an AppleTV2 to run my XBMC on. With the hardware now free I finally setup the XBMC box as a desktop to use instead of my dieing laptop. I