cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to know if my cursor is in generated text.

Highlighted
Newbie

Problem to know if my cursor is in generated text.

Hi adepters,


I try to verify if my cursor is ingenerated text or not. I
triedwith the command line and with
ACL.


I use Epic 4.3 under windows XP.


I use the function oid_is_gentext(oid_caret())and it
always return 0 whereas my cursor is in generated text. I have
check before that the oid is valid with the function
oid_valid(oid_caret()) and it always return 1 (The oid is
valid).



Issomebody already met the problem ?


Thanks for advance.


Cyril

Tags (2)
4 REPLIES 4
Highlighted

Re: Problem to know if my cursor is in generated text.


Cyril,



I am not sure why the command string
is not working. I tried it with 5.1F and it does work (as I recall
it doing with 4.3). You might want to try this with the cursor inside
the generated text




eval oid_name(oid_caret()).



This should produce the value "_subchars"
which is the wrapper for generated text.




If that does not work, then I am totally
at a loss.



Lynn
Highlighted

Re: Problem to know if my cursor is in generated text.

Lynn,


Thanks for your help but the command eval
oid_name(oid_caret()) only return the name of the element identified by
oid_caret().


I tried with Epic 5.1F and it works : the function
"oid_is_gentext" works and "eval oid_name(oid_caret())"face="Times New Roman" size=3>produce the value
"_subchars".


But my customer use Epic 4.3. So, I must find
another solution.


Cyril



Highlighted

RE: Problem to know if my cursor is in generated text.

Cyril,

I just tested both oid_is_gentext(oid_caret()) and
oid_name(oid_caret()) in Epic 4.3.1F and they returned 1 and "_subchars",
respectively, as I expect they would when inside gentext. The only thing I
can think of, other than that the 4.3 version you have is slightly different
than the one I have and therefore behaves differently (which doesn't seem too
likely, but you never know), is that cursor position can affect this because of
the discrepancies between cursor location and the "node structure" of the
document that oids are tied to.

Is your gentext more than one character? If so,
make sure you're in the middle somewhere, rather than at the very beginning or
end. We did quite a bit of playing with this some time back and found very
odd results based on exactly where the cursor was located and sometimes even how
the cursor got there, sometimes getting different results depending on whether
we clicked with the mouse to position the cursor, moved the cursor from the left
with arrow keys or from the right with arrow keys.

Beyond all that it would be hard to diagnose this without
more details and I'm not quite sure what details to ask for short of a sample
document along with DTD, screen FOSI and any other
customizations.

Brandon Ibach

Lockheed Martin Space
Systems

Cocoa Beach,
FL

321-784-7432





face=Tahoma size=2
Highlighted

RE: Problem to know if my cursor is in generated text.


Brandon,



Thanks for the test.



Cyril,



Just to make sure things are working,
I'd set the gentexttagdisplay option to full of a bit, make sure you see
all the generated text values (i.e. _subchars or _tiv). These are
processing instructions, so you should be able to use the find_pi. If
you can see and find the gentext with the PI, there has to be something
else not working.



Lynn
Announcements