Hello List, Sorry for the previous wacky post. Don't know what happened.
I've discovered an unusual behavior regarding the clipboard and the
replace function.
The following, in a pushButton's action event, gives an incorrect result:
dim c as clipboard
c= new clipboard
if c.textAvailable then
dim s as string
s= c.text
ef1.text= s.replace(".", "") //ef1 --> editField
end
If the clipboard has "123.45", ef1 ends up showing "13.45"
I've found 2 workarounds:
1) Use an out of view auxiliary editField (ef2)
if c.textAvailable then
dim s as string
ef2.text= c.text
s= ef2.text
ef1.text= s.replace(".", "") //ef1 shows "12345"
end
2) Add a temporal empty space to s
if c.textAvailable then
dim s as string
s= " " + c.text
s= s.replace(".", "")
ef1.text= s.left(2) //ef1 shows "12345"
end
This happens in OSX 10.3.9 ppc, RB versions: 5.5.5, 2006r2, 2006r3,
2006r4.
I would appreciate your comments on this one and if a bug report is in
order.
TIA,
>>>®<<
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>