TAILIEUCHUNG - Mac OS X Programming phần 3

đoạn này liệt kê từng đối số trên một dòng riêng để bạn có thểdễ dàng phù hợp với \ năm đối số ví dụ cho các mô tả tham số năm. Tham số đầu tiên, kAlertStopAlert, chỉ đơn giản là nơi biểu tượng của ứng dụng cảnh báo (một giá trị của kAlertPlainAlert bỏ qua các biểu tượng). | CFSTR Window Couldn t Be Opened CFSTR The program can no longer run. Click the OK button to quit. NULL alert This snippet lists each argument on its own line so that you can easily match the five example arguments to the five parameter descriptions. The first argument kAlertStopAlert simply places the application s icon in the alert a value of kAlertPlainAlert omits the icon . The fourth argument NULL omits the record of additional alert information. The last argument alert tells CreateStandardAlert to create an alert that can be later referenced by using the DialogRef variable alert. Earlier in this chapter you read a description of the WindowRef data type. A DialogRef is essentially the same. A variable of this type is used to reference a window. An alert is considered a dialog but a dialog is nothing more than a type of window. The second and third arguments are worthy of a little more discussion. String Services and CFString Objects Text characters and strings groupings of text characters are important topics in programming. An application might need to display format manipulate or search through text. An application s text might need to be converted to another language. The Carbon API includes a number of routines devoted to string handling. The Carbon API includes a number of routines categorized into what s called the Core Foundation. As the name implies Core Foundation is a set of routines that are useful for core or common programming tasks. In Core Foundation you won t find any functions that work with fancy interface elements or display multimedia effects. Instead you get just the basics. Core Foundation routines exist to make OS independence to an extent to support data and code sharing among libraries and to enable the internationalization of strings. The Core Foundation routines that support string internationalization the easy translation of strings from one language to another exist within the String Services group of routines. String Services is in

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.