Instansiate components according to the string value
Hi guys,.I'm looking forward to find a solution that would allow me to summon and to create components on the stage based on the value of a string withouth having to finish for example switch like this first one.
I am aware of the use of the design patterns such as factory and model method patterns may be one approach, however I do not know how to implement it in a way. Something that might resemble this code is the one I enclose below (Simple factory).
Has anyone used one of these methods of design patterns to accomplish such a thing? Could someone can give me guidance how to proceed on Flex?
Thank you very much.
Jose
How bout: private var factory: Object = {myCanvas: new ClassFactory (myCanvas),} then var component: UIComponent = new plants [compType]; You can also watch getDefinitionByName.
News:g7v7g8$rq7$1@forums. Macromedia.com...
> Hi guys,.
> I am looking forward to find a solution that would let me call and create
> components on the stage based on the value of a string withouth having to the end
> to top
> the switch example as:
>
> import com.myCanvas;
> var compType:String = "myCanvas";
> switch (compType) {}
> case "myCanvas":
> var myC: myCanvas = new myCanvas();
> break;
> }
>
> I'm aware of the use of design patterns such as model and factory
> Method models can be an approach, but I do not know how to implement
> It
> in such a manner.
>
> Has anyone used one of these methods of design patterns to accomplish such
> thing? Could someone can give me guidance how to proceed on Flex?
myFoo:newClassFactory(myFoo)};
Tags: Flex
Similar Questions
-
Replace the string value of table
with cte as)
Select val '123', 'abwec' double val1
Union of all the
Select "456" val, "mowerw" double val1
Union of all the
Select val '709', 'wkwere' double val1
Union of all the
Select val '078', 'awerwewerwreq' double val1
)
Select * from cte;
-incoming string
"asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..."
need to replace like 'abwec' 123 and 456 as "mowerw" and 709 as wkwere and 078 as 'awerwewerwreq '.
How to replace the string value of the string
I'm going to the table which will have mapping information I need to see the incoming string and replace the appropriate value of the val to val1
something like
Of
"asdasd123456werwer@asdwer709@ewrwerewrwqqwezxder078ewrwer@87w8eopiu @..."
TO
"asdasdabwecewrwer@87w8eopiumowerwwerwer@asdwerwkwere@ewrwerewrwqqwezxderawerwewerwreq@..."
By using the TYPE clause.
with cte as
(
Select val '123', 'abwec' double val1
Union of all the
Select "456" val, "mowerw" double val1
Union of all the
Select val '709', 'wkwere' double val1
Union of all the
Select val '078', 'awerwewerwreq' double val1
),
input_tbl
as
(
Select "asdasd123ewrwer@87w8eopiu456werwer@asdwer709@ewrwerewrwqqwezxder078 @..." input_str
of the double
)
Select max (input_str) Dungeon (first order by desc NWR dense_rank) input_str
de)
Select rno, input_str
de)
Select rownum NWR
val
val1
input_str
count (*) over() cnt
from cte
Cross
Join input_tbl
)
model
dimension (NWR)
measures (val, val1, cnt, CAST (input_str AS VARCHAR2 (4000)) input_str)
(
input_str [any] = replace (nvl (input_str [cv () - 1], input_str [cv ()]), val [cv ()], val1 [cv ()])
)
)
-
Put the string value in a table
Hello
Probably an easy question, but I am reading data of a RFID reader that returns a string value of 12 bytes. Whenever a RFID reads, I want the tag to be inserted in a string table on the front panel. So, basically, a newspaper of the each tag [read-> Insert row 0] then [read-> Insert level 1] and so on. I work RFID reader, I don't know how to put the string in the table.
I'm not sure of the steps necessary to achieve control of the table (or if the table control is the right thing to use).
Any help would be greatly appreciated. Thank you.
-
Check the string value when using xdoxslt
Hello
I'm new to the BEEP and will have questions in writing this simple code for a model RTF. In plain language, that's what I want to do:
If (instr(FirstName,'concern',0) > 0 and instr(LastName,'concern',0) > 0 and instr(MiddleName,'concern',0) > 0) then the VNAME variable value "
on the other
If (instr(LastName,'1-',0) > 0), then set VNAME variable FirstName
on the other
the value of VNAME variable FirstName + "" + name
Finally... show the VNAME variable
===========
I wrote it, but it doesn't work:
declared variable... Initialize it to x.
<? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'x')? >
String value of control-> - error.
<? If: (xdoxslt:Instr (lower(coFirstName|| coMiddleName || coLastName), "abuses", 0) > 0)? >
<? xdoxslt:set_variable($_XDOCTX,_'v_RTPMName',_'')? >
<? end if? >
write the variable
<? xdoxslt:get_variable($_XDOCTX,_'v_RTPMName')? >
Thanks for the help!
For a quick overview,.
InStr is belong to the xdofx family, must be used in this way instead of xdoxslt:Instr()
For example: If condition 1 0 otherwise true back
0 then 1 or 0 end if? >
-
How to reorder the columns in the chart according to the heighs values
Hello
I have an apex graphic screen 3D columns, I want to arrange the column according to the tops of values, so if I 7,3,4,9. Then I would have my willing columns 9.7, 4, 3 from right to left.
I hope I made my point clear.
Thank you in advance,
Published by: Najla on February 20, 2013 06:33You can adjust the order of your query for this clause...
select x,y,z order by z where z is the column with the numeric value displayed in your chart
Thank you
Tony Miller
Ruckersville, WILL -
How to limit the string value?
How to limit a string must be a value of a group of parts. For example, a string must be one of the following values: abc defg h, ijklm
Is there any method of the JAVA API on how to limit a string value?No - you will need to add the necessary code to the method "set" and make the instance of private variable so that the "setter" is used.
-
According to the selection value hide/show page list item
Hi all
I have a list of selection P_X (with Char, varchar2, number values).
When I select the tank it must display P_Max (text box), if I select the number he must display two textboxes (P_Text1, P_text2).
By default it should not display any page except P_X element.
How can I achieve this by creating dynamic actions.
I tried a dynamic textbox P_max display action when I click the Char value in the select list (P_X)
After presenting the process:
Start
: p_x: = "Char";
end;
Condition:
Value of exp1 = exp2
Exp1:P_X
EXP2:char
dynamic action:
event: change
Select the type: article
product (s): p_x
condition: equals
value: Char
Real action: see question: p_max
But it is not workking correctly.Hi Karthikeyan,
Sorry for the late reply, stuck with another work.
Now you check in your example I changed it accordingly. According to me, he answered your question, check in.
Kind regards
MiniBrand responses appropriately.
-
D2KWUTIL Read_Registry - only reads the string values? How to read the binary?
Hello, everyone!
I use forms and reports 6
D2KWUTIL,
WIN_API_ENVIRONMENT. Read_registry
to read the Windows registry values.
The service works very well with string values (that is, type REG_SZ registry).
but fails with NO_DATA_FOUND binary values, such as type REG_DWORD.
D2KWUTIL is really unable to work with other types of chains?
If so, what can be used instead?
Appreciate all the guidance,
Roman
Published by: user9232995 on November 18, 2010 23:19
Published by: user9232995 on November 18, 2010 23:20It's d2kwut60.dll.
-
switch the case: should use the string value?
in the example below, I have two points to a switch box. The first works and is not the second. In the second I tried to use a variable to concatinate the string for the case. For some reason whenever I do, it is not locate the second case. It seems like it should work...
for (c = 1; c < = numItems; c ++) {}
model var = app.project.items [c];
var scale = 100;
If (comp instanceof CompItem) {}
for (i = 1; i < = comp.numLayers; i ++) {}
{Switch (COMP. Layer (i). Name)}
case 'textLines_NFLAM': we're working //This
targetWidth = 1400;
COMP. Layer (i).scale.setValue [(scale, scale);]
setTextLayer_caseSensitive (comp.layer (i), lineValue);
If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}
modifiedLayers.push (comp.layer (i));
}
break;
showName var = 'TA ';
case 'textLines_' + showName: / / it does not work unless I change to: case "textLines_TA":
targetWidth = 1430;
COMP. Layer (i).scale.setValue [(scale, scale);]
setTextLayer_caseSensitive (comp.layer (i), lineValue);
If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}
modifiedLayers.push (comp.layer (i));
}
break;
}
}
}
}
It works for me (at least it works):
myname = "textLines_TA"; var
showName var = 'TA ';
{Switch (myname)}
case 'textLines_' + showName:
Alert ("caught");
break;
by default:
Alert ("no to not catch");
break;
}
I suspect, there is something else.
Dan
-
How can I get the string value displayed on a digital control defined for the relative time.
I have a digital potentiometer to display relative time in increments of 30 minutes.
I want to record the value displayed on the control string. Unfortunately, when I use the "convert to decimal string.vi" number, the resulting string is just the value in seconds.
How can I get the value as a string? (for example 01:30 for an hour and thirty minutes)
Thank you
Sean
Hi Sean.C!
M_Peeker's suggestion is a good thing. A stage that could clarify things is that you must set the % t <%H:%M> format string entry.
< br / > Kristen:.
-
I would like to know if there is a way to make a single control (either a ring or other) where a string that is displayed to the user has a string in its output value.
For example, I have a power laser with a serial port and the command to turn on the laser diodes is LASER1;
I want to display the 'LIGHTS ON' string to the user, but that control to provide 'LASER1' value when selected.
It's easy to do with two controls, for example, can I have an enumeration with the display of the user strings and an enum with the chains of command of the laser, but then I have to make sure any changes affect the two controls.
If it's a single control, it is less likely to be a mistake when a change is made.
Any help is greatly appreciated.
I'm using LabView 2009
Never heard of the drop-down list box? Could be a winner, just uncheck values Match points.
-
by programming the string value upper limit of table 3.1 teststand
I'm relatively new to using Testand... so I would be grateful for all the help:
I created an array of strings using an ActiveX/COM action: PropertyObject.NewSubProperty (lookupString, valueType, EnTableau, typeName, options)
It creates an empty array of strings [0.empty]. How to programmatically set the upper bound of the array (for example the table of strings [0.8])
Due to my requirements of the application, I have to use Teststand 3.1
Thank you in advance,
Ellas1
Hello
I think TS 3.1, you should always use the TS API PropertyObject.SetDimensions (later of TS that has been replaced by an array property), or you can use SetNumElements if it is a 1 d array. Of course, you can order these operate using TestStand.
-
in the cell indicator digital table according to the color value
Is it possible to change the color of text in individual cells of a digital display indicator depends on the value of the digital displayed in this cell.
You can use the ListBox instead of indicators in table. You can change the ownership of each cell individually.
-
How to extract the string values
Hello
Database: 11.2.0.3.0
I have a JSON string like below. I want to extract only the propetyvalues. Can you help me with the query:
{
'documents':]
{
'document':]
{
'propertyname': 'Id',
'propertyvalue': "{1C236CB2-AB97-4982-8117-DE0BE6D7DB46}".
}
]
},
{
'document':]
{
'propertyname': 'Id',
'propertyvalue': "{1318AC90-C321-4D3D-9558-6547EFE49A7E}".
}
]
}
]
}
Hello
Too bad, that you do not have version 12. Then, you can use the function JSON_VALUE mentioned previously.
Here's something you can do in your version:
SELECT LEVEL AS n
, REGEXP_SUBSTR (: str)
, ' "propertyvalue": "([^"]*) "
1
LEVEL
NULL
1
) AS propertyvalue
OF the double
CONNECT BY LEVEL<= regexp_count="" (:str,="">=>
;
If you want to know that adapts to your specific problem, post CREATE TABLE and INSERT statements for some sample data and the exact results you want from these sample data.
-
set the height of the rows in the table according to the integer value
Hello.
jdev version - 11.1.2.3
My requiremnt is that I have an integer input value, when I provide a value for it assumes that 10, then only 10 lines should be visible on the rest of the table should come when scroll us. Basically, I want to adjust the height of the lines on the change in value of my entry value providied.
Thank youIf the counter returns a number, you can convert entire
public void button(ActionEvent actionEvent) { Number n = spinbox.getvalue(); table.setFetchSize(n.intValue()); }
Timo
Maybe you are looking for
-
How will I know if the battery is completely charged when my laptop is turned off?
-
Can not find the driver for W8 or does not
Hi can'f find driver for sopproces (PCI\VEN_10DE & DEV_0543 & SUBSYS_30CF103C & REV_A2), what I found does not install on W8. Pls help! Laptop (HP Pavilion dv9730us)
-
Can we invoke an approval queue Service with call SOAP on first Cisco service catalog?
I have an external portal send requests to the first Service catalog Cisco via SOAP calls. In a particular service, I need to include a task approval or rejection. Generally, we add the task in terms of service to a queue in such a situation. This ta
-
How to change the simple graphic media to dual display
I want to watch a PLAY DVD BY MY PORTABLE MY ON BIG CE SCREEN WHICH SHOULD I DO?
-
I have a new Sony Vaio Pro and have experienced outages of system 3 times. All the accidents that happened after I've restored from hibernation and were related to the bug check DRIVER_POWER_STATE_FAILURE. After the first two accidents, I ran Sony