How to define current flow element and more
Hi all. I've just started with text layout and I have a lot of questions, will be thankfull if smbdy can help me.
1. How can I get the flow element according to mouse position over it, for exmple highlight the paragraph element on mouse over.
2. How to implement drag&drop behavior to text flow elements, for example for images.
3. How can I get the element in which the blinky "add text here icon" is located?
Thanks.
1. How can I get the flow element according to mouse position over it, for exmple highlight the paragraph element on mouse over.
Probably the most efficient way is to listen for the updateComplete from the TextFlow, and when it comes walk the flowComposer's TextFlowLines for each paragraph to get the paragraph bounds. Once you have a list of bounds, doing the roll over on mouse move should be very quick.
2. How to implement drag&drop behavior to text flow elements, for example for images.
Good question. The container that holds the text will be getting events for mouse down, mouse move, etc. and handles them by passing them along to the interactionManager (class name SelectionManager). The interactionManager handles them by making a text selection. If you want to handle the mouseUp by inserting the image at the selection, that should be pretty simple. There's a method for that in IEditManager (the interactionManager is also an IEditManager), so you can just call interactionManager.insertInlineGraphic.
3. How can I get the element in which the blinky "add text here icon" is located?
Easiest way is to call
ElementRange.createElementRange(textFlow, textFlow.interactionManager.absoluteStart, textFlow.interactionManager.absoluteEnd);
That creates an element range which will have the leaf and paragraph elements in the selection.
Hope this helps,
- robin
Similar Messages
-
I have an issue installing photoshop CC trial, I currently have elements and wanted to see the differences before buying, when installing through the creative cloud app I get the error message Exit Code: 7 Please see specific errors below for troubleshooting. For example, ERROR: DW041 ... -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 1 error(s)
ERROR: DW041: INSTALLDIR Volume D:\ doesn't exist. ------------------------------------------------------------------------------------- System Requirements and it will not install, It says cant find the path D: im not sure why because as far as I can see its set to install on drive C: which is where I want it!Exit Code: 6, Exit Code: 7 Installation Errors - http://helpx.adobe.com/creative-suite/kb/errors-exit-code-6-exit.html
Troubleshoot with install logs | CS5, CS5.5, CS6 - http://helpx.adobe.com/creative-suite/kb/troubleshoot-install-logs-cs5-cs5.html for information on how to review your installation logs -
How to move some xml element and its content to a new frame
Hi All,
How to move some xml element and its content to a new frame.Hi Chinnadk,
Sorry my code its comment some lines. Now only I check the forum thread, you just try one more time.
#target InDesign;
#include "/Program Files (x86)/Adobe/Adobe InDesign CS5.5/Scripts/XML Rules/glue code.jsx"
var myDoc = app.activeDocument;
//____________________ XML RULE SET
var myRuleSet = new Array (new margintag);
with(myDoc){
var elements = xmlElements;
__processRuleSet(elements.item(0), myRuleSet);
function margintag(){
this.name = "margintag";
//this.xpath = "//margintag[@type='mn2']";
this.xpath = "//margintag";
this.apply = function(myElement, myRuleProcessor){
with(myElement){
app.select(myElement);
try{
var myPrePara = app.selection[0].paragraphs[-1].parentTextFrames[0].paragraphs.previousItem(app.selection[0].paragraphs[-1]);
if(myPrePara.characters[-1].contents=="\r"){
myPrePara.characters[-1].remove();
var myTextframe = myElement.placeIntoInlineFrame(["7p9","6p"]);
myTextframe.appliedObjectStyle= myDoc.objectStyles.item("MN1");
myTextframe.fit(FitOptions.FRAME_TO_CONTENT);
myTextframe.parentStory.paragraphs.everyItem().appliedParagraphStyle = app.activeDocument.paragraphStyles.itemByName("MN1");
}catch(e){}
app.selection = null;
return true;
thx,
csm_phil -
How can i download photoshop elements and premiere elements 10 using the serial number not the cd?
I tried downloading the trial elements 11 and entering the serial number but it wouldn't work, i cannot find a trial for elements 10.
Thankshttp://prodesigntools.com/photoshop-elements-10-direct-download-links-pse-premiere-pre.htm l
Follow the instructions on that page carefully before you click the download link. -
How to batch download the elements and flow logic of screen
hi,all
i am doing programs transfer without using transport request.
it is easy to download simple reports,includeing code, text etc.but how can i deal with reports with customed screen.
for example, i have to download the elements and flow logic of screen 100 in a report. also, i need to upload in another server.
i need you help!
thanks
Regards
LTHi,
There are lots of utilities to do this. just search forum and you will be able to find the one.
Regards,
Atish -
How to define Length of char. and KF
During infoobject creation, how to define the length of char. and KF, is it related to master data text length ? Should we take other things into account? When we see one field in table, the length of the field was defined with 2, but its master data text length was more than 2, what's the reason for this things?
Edited by: hi ni on Apr 18, 2008 12:12 PMhi,
how to define the length of char. and KF, is it related to master data text length ?
ther business will have defined length and type for any characteristics. ex - Materail number may have lenth of max 15 and is Char type.
but for text max size is by default 40 chars.
Should we take other things into account?
get spec from client, that could be better and also consider the field used to map ur char/KF from source system.
Ramesh -
How to get selection screen elements and its table reference of a report ?
halo experts
How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
For eg if my selection screen 1000 is
parameters: p_carrid type spfli-carrid,
select-options :s-_connid type sflight-connid.
is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time. The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table. Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
REPORT ZTEST_PROG.
TABLES sflight.
DATA:
screen_tab TYPE STANDARD TABLE OF screen,
wa_screen TYPE screen,
scrn_nm TYPE string,
scrn_leftover TYPE string,
l_type TYPE REF TO cl_abap_typedescr,
typ_nm TYPE string,
typ_pre TYPE string.
FIELD-SYMBOLS <fs_data> TYPE ANY.
PARAMETERS p_carrid TYPE spfli-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group3 = 'PAR'
OR screen-group3 = 'LOW'.
APPEND screen TO screen_tab.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
LOOP AT screen_tab INTO wa_screen.
ASSIGN (wa_screen-name) TO <fs_data>.
l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
IF wa_screen-group3 = 'LOW'.
SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
TRANSLATE scrn_nm TO UPPER CASE.
ELSE.
scrn_nm = wa_screen-name.
ENDIF.
SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
WRITE:
/ 'Screen Name: ', scrn_nm,
/ 'DDIC Type: ', typ_nm.
ENDLOOP.
When you get into defining internal tables you can determine those at run time with cl_abap_structdescr. The following is an example of how you might do that. You can loop through the "components_table" and evaluate each field of the structure in this way.
DATA: structure_reference TYPE REF TO cl_abap_structdescr,
components_table TYPE abap_compdescr_tab,
components_structure LIKE LINE OF components_table.
structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
components_table = structure_reference->components.
I don't know if this answers any of your questions but I hope that some of it is useful. -
How to determine current period start and end dates
Hi All,
If given previous period start date and end date, how to determine current period start date and end date?
Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
Can you please suggest an FM to determine the current period dates?
Thanks & Regards
Gowthami>
gowthami karunya wrote:
> If given previous period start date and end date, how to determine current period start date and end date?
> Suppose if given previous period start and end dates are 12/28/08 - 01/30/09, then current period start date and end date will be 01/30/09 - 02/27/09. (where 12 is the previous period, 28 is the day, 08 is the year......)
Hello,
I am assuming you have the Company Code with you & proposing this solution.
TABLES: bkpf.
PARAMETERS:
p_bukrs TYPE bukrs.
SELECT-OPTIONS:
s_date FOR bkpf-budat.
DATA :
l_perio LIKE bkpf-monat,
l_poper TYPE poper,
l_year LIKE bkpf-gjahr,
l_spmon TYPE spmon,
l_periv TYPE periv,
l_date1 TYPE datum,
l_date2 TYPE datum.
CALL FUNCTION 'BAPI_COMPANYCODE_GET_PERIOD'
EXPORTING
companycodeid = p_bukrs
posting_date = s_date-high
IMPORTING
fiscal_year = l_year
fiscal_period = l_perio.
CONCATENATE l_year l_perio INTO l_spmon.
* Get the next period
IF l_perio < 12.
l_perio = l_perio + 1.
ELSE.
l_perio = '01'.
l_year = l_year + 1.
ENDIF.
MOVE l_perio TO l_poper.
SELECT SINGLE periv INTO l_periv
FROM t001
WHERE bukrs = p_bukrs.
IF sy-subrc = 0.
CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = l_year
i_periv = l_periv
i_poper = l_poper
IMPORTING
e_date = l_date1
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = l_year
i_periv = l_periv
i_poper = l_poper
IMPORTING
e_date = l_date2
EXCEPTIONS
input_false = 1
t009_notfound = 2
t009b_notfound = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
WRITE: / l_date1, l_date2.
ENDIF. -
How to get current node element for recursive node.
Hello Xperts,
I have a requirement where I need to find the current node element of the recursive node.
I was trying following code for the same
Data:
selected_elem type ref to if_wd_context_element.
selected_elem = WDEVENT->GET_CONTEXT_ELEMENT( NAME = 'CONTEXT_ELEMENT' ).
selected_elem ->get_static_attributes(
IMPORTING
static_attributes = sel_attri ).
But it does not work for me and I always get 1st node value.
Please help me in this issue.
-AshutoshHello ,
If you implementing a simple tree ( not table tree ) and you want the selected element for
OnLoadChildren event .
Then create an importing parameter CONTEXT_ELEMENT of type IF_WD_CONTEXT_ELEMENT
in the event handler of onLoadChildren .
Webdynpro framework automatically filled up the context element with the current node in the tree .
I tried it , It really worked for me .
If you have a table tree then you need to create an importing parameter PATH of type String in tha event handler .
Webdynpro frame automatically fills the PATH .
the use can use the following method to get the element from the PATH .
wd_context->path_get_element( path ).
I tried it , It also worked for me .
Regards
Vivek
PS : please provide the points if answer is helpful . -
How to Define Additional Incompatiblity Groups and Buckets
How do I define additional incompatiblity groups and buckets? I added them to the Advanced Pricing Lookups screen, but what is the next step?
The problem is that my new Incompatibility Level (4) is not working the same way as Levels 1-3. Anything I put in Level 4, acts like Level 1.
I did notice that the Lookup code I used is in a slightly different format as the seeded codes. Could this be the problem? The seeded codes are LVL 1, LVL 2, LVL 3. My new code is LVL4 (no space). -
How to change value of element and update XML file
Hi
I have an xml file called test.xml like below
<?xml version="1.0" encoding="UTF-8"?>
<printing>
<userName/>
<viewName/>
</printing>I want to change value of user name and view name and update test.xml file in my folder
Anyone has sample code to do so
AshishThanx
i was able to do so, but what i want now is to remove element
for example
i have following xml
<?xml version="1.0" encoding="UTF-8"?>
<printing>
<firstLineTexts>
<firstLineText />
<firstLineText>|line11</firstLineText>
<firstLineText>|line12</firstLineText>
</firstLineTexts>
</printing>how do i remove all elements fireLineText
my final output should be
<?xml version="1.0" encoding="UTF-8"?>
<printing>
<firstLineTexts>
</firstLineTexts>
</printing>How do i do it using DOM,
I can create instance of DOM and write it using TransformerFactory
Ashish -
How do I install Photoshop Elements and Premier Elements on a new hard drive?
My hard drive had to be replaced and Photoshop Elements and Premier Elements were not de-activated and unistalled before the hard drive was replaced. I have my original downloaded install programs and serial numbers. Thank You.
Simply install the programs. Contact support if you need to reset activation count. No magic involved beyond that.
Mylenium -
[JS-CS4] - How to read the XML Element and its Attributes
Dear All,
I have the doubt regarding: reading the xmlElement and its attributes.
Here I droping the xml script
//============= Start ======================//
var myDoc = app.activeDocument;
var Fpath = File("../Projects/Entity_map.xml");
if (Fpath.exists)
Fpath.open("r");
var Cont= Fpath.read();
var roots = new XML(Cont);
var myEveryName = new Array();
var myEveryContent = new Array();
var myEveryAttributes = new Array();
traverse(roots);
//$.writeln(myEveryName);
//$.writeln(myEveryContent);
$.writeln(myEveryAttributes.length);
for(var i=0; i<myEveryAttributes.length; i++)
$.writeln(myEveryAttributes[i]);
function traverse(tree) {
myEveryName.push(tree.name());
myEveryContent.push(tree.text());
myEveryAttributes.push(tree.getAttribute);
// you get the contents by using .text() insted of .name()
if(tree.elements().length() > 0) {
for(var i=0; i<tree.elements().length(); i++) {
traverse(tree.elements()[i]);
//============== End =====================//
and the XML Structure is
//===============XML =====================//
<?xml version="1.0" encoding="UTF-8"?>< Entity_Convertion>
< Entitys char="Ç" GID="173"/></
Entity_Convertion>
//===============End ====================//
Here I'm getting the XML Elements and its contents, but not xmlAttributes.
Please any one can help me, then I will appreciate...
Thanks & Regards
T.R.Harihara SudhaNDear All,
I have the doubt regarding: reading the xmlElement and its attributes.
Here I droping the xml script
//============= Start ======================//
var myDoc = app.activeDocument;
var Fpath = File("../Projects/Entity_map.xml");
if (Fpath.exists)
Fpath.open("r");
var Cont= Fpath.read();
var roots = new XML(Cont);
var myEveryName = new Array();
var myEveryContent = new Array();
var myEveryAttributes = new Array();
traverse(roots);
//$.writeln(myEveryName);
//$.writeln(myEveryContent);
$.writeln(myEveryAttributes.length);
for(var i=0; i<myEveryAttributes.length; i++)
$.writeln(myEveryAttributes[i]);
function traverse(tree) {
myEveryName.push(tree.name());
myEveryContent.push(tree.text());
myEveryAttributes.push(tree.getAttribute);
// you get the contents by using .text() insted of .name()
if(tree.elements().length() > 0) {
for(var i=0; i<tree.elements().length(); i++) {
traverse(tree.elements()[i]);
//============== End =====================//
and the XML Structure is
//===============XML =====================//
<?xml version="1.0" encoding="UTF-8"?>< Entity_Convertion>
< Entitys char="Ç" GID="173"/></
Entity_Convertion>
//===============End ====================//
Here I'm getting the XML Elements and its contents, but not xmlAttributes.
Please any one can help me, then I will appreciate...
Thanks & Regards
T.R.Harihara SudhaN -
How to get the xml element and comment name in a page?
I need to list all element and comment name in a page
Hi,
do
//K2Vector<XMLReference> allXMLRefs;
std::vector<XMLReference> allXMLRefs;
IActiveContext* context = GetExecutionContextSession()->GetActiveContext();
UIDRef documentUIDRef = ::GetUIDRef(context->GetContextDocument());
XMLReference rootXMLRef = GetRootXMLReference(documentUIDRef);
GetFlattenedElementList(documentUIDRef,allXMLRefs);
std::ostringstream os;
for(std::vector<XMLReference>::iterator it = allXMLRefs.begin(); it != allXMLRefs.end(); ++it)
XMLReference nextref = *it;
PMString tag_name;
os.str("");
os << AsString(nextref,tag_name).GetPlatformString().c_str();
CAlert::WarningAlert(os.str().c_str());
}while(kFalse);
I use above code to get tag name.
Any one help me to get the comment tag in XML -
How do I move Photoshop Elements and PS Premier bundle to new computer
I bought a new computer and would like to move Photoshop Elements and PS Premier bundle to the new computer. What is the procedure?
Thanks,
JimmySorry Claudio, I was in the wrong forum. Thanks for bringing it to my attention.
Jimmy
Maybe you are looking for
-
Help!!! My ipod nano (3rd gen) won't sync!!
I am very confused and need someone's expert help with my Nano. I began downloading music like crazy. All was working well, suddenly one day, my ipod will no longer work on my computer; not recognized. I try everything I can think of, finally reso
-
I have an old ipod touch, and have just purchased a new 4th Gen one. How do I get my Apps from the old one to the new one. I've had to wipe the hard drive on my Pc so they aren't in my I tunes.
-
Errors executing bulk query when updating a Sharepoint Linked List from Access
Hi all, I have a Sharepoint list that is a Linked List with MS Access. It has just under 5,000 items (4,864), thus meaning it avoids the reduction in functionality lists of greater than 5,000 items have. Among the list are five calculated columns. Th
-
Why are my filled-out Form Fields partially printing?
Using Acrobat Pro 9, I converted a MS Word medical questionaire into a fillable form. I've tested and printed it on Windows and Mac without any issues in the past. However, recently there's been an issue where Adobe Reader allows all of the fields to
-
Is there any thing worng in my catch statements .because when i do debug the curser not catching the catch statements TRY. CALL METHOD z_co_ifoasy_01_sa_gl=>execute_asynchronous EXPORTING output = gv_zsafe_mt_acc_gl_posti