Apple WebObjects 3.5 Instrukcja Użytkownika Strona 180

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 218
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 179
Chapter 10 The WebScript Language
180
Modern:
function submit() {
// <body>
}
Method Definition With Arguments
Classic:
- takeValuesFromRequest:(WORequest *)request
inContext:(WOContext *)context {
// <body>
}
Modern:
//Note: no static typing allowed.
function takeValues(fromRequest:= request inContext:= context){
// <body>
}
Method Invocation — No Argument
Classic:
[self doIt];
Modern:
self.doIt();
Method Invocation — One Argument
Classic:
[guests addObject:newGuest];
Modern:
guests.addObject(newGuest);
Method Invocation — Two or More Arguments
Classic:
[guests insertObject:newGuest atIndex:anIndex];
Modern:
guests.insert(object := newGuest, atIndex := anIndex);
Przeglądanie stron 179
1 2 ... 175 176 177 178 179 180 181 182 183 184 185 ... 217 218

Komentarze do niniejszej Instrukcji

Brak uwag