0

intValueデバッガーでテキスト フィールドのテキストを出力できないのはなぜですか?

Printing description of textField:
<UITextField: 0x8e65550; frame = (87 11; 194 18); text = '2'; autoresize = W+RM+H+BM; tag = 5; layer = <CALayer: 0x8e64040>>
(lldb) po textField.text.intValue
error: property 'text' not found on object of type 'UITextField *'
error: 1 errors parsing expression
(lldb) po textField.text
error: property 'text' not found on object of type 'UITextField *'
error: 1 errors parsing expression
(lldb) po textField
(UITextField *) $15 = 0x08e65550 <UITextField: 0x8e65550; frame = (87 11; 194 18); text = '2'; autoresize = W+RM+H+BM; tag = 5; layer = <CALayer: 0x8e64040>>
4

1 に答える 1

2

デバッガーで使用できる構文は、ソースで使用する構文と常に正確に同じであるとは限りません。LLDB はまだ開発中です。ドット構文の二重使用は、それを混乱させているようです。ブラケット構文を使用してみてください:

(lldb) po [[textField text] intValue]
于 2012-04-01T18:09:23.227 に答える