Bernie, I know "TimeCF = @"00:30:25"" works > PRINT fn HIViewSetText( button&( 1 ), @"00:30:25" ) '--> 00:30:25 but in my program Time is a variable. It is the result of a computation Time = hoursStr + ":" + minutesStr + ":" + secondsStr How can I transform a string variable into a CF variable or haw can I put a string variable in this function: fn HIViewSetText( button&( 1 ), string variable ) Eugen On 14.12.2010, at 16:21, Bernie wrote: > > Eugen wrote: > >> I have a little problem when I transform string to CFStringRef : >> '------------------------------ >> DIM AS str255 Time >> DIM AS CFStringRef TimeCF >> >> Time = "00:30:25" 'it's a computation variable >> TimeCF = @Time >> >> PRINT fn HIViewSetText( button&( 1 ), @"00:30:25" ) '--> 00:30:25 >> >> PRINT fn HIViewSetText( button&( 1 ), TimeCF ) >> 'or --> ERROR and "Application quit unexpectedly" >> PRINT fn HIViewSetText( button&( 1 ), @Time ) >> '------------------------------ > > '@' can't be used like that for CFStrings. It must always be > followed by a string literal. This should work: > > TimeCF = @"00:30:25" > > Bernie > > -- > To unsubscribe, send ANY message to: futurebasic-unsubscribe@... >