Apple WebObjects 3.5 Uživatelský manuál Strana 180

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 218
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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);
Zobrazit stránku 179
1 2 ... 175 176 177 178 179 180 181 182 183 184 185 ... 217 218

Komentáře k této Příručce

Žádné komentáře