MACROMEDIA DIRECTOR MX 2004-GETTING STARTED WITH DIRECTOR Uživatelský manuál Strana 57

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 63
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 56
end
When you pass a large string variable as the argument to a handler, Lingo has to
make a copy of the string variable which can really slow things down. If it is a very
large string and you don't have enough memory to make the copy, Director might
even crash. In such a case it is faster to store the large string in a global and let the
handler operate directly on the global. If you are familiar with behaviors, you can
accomplish the same thing by storing the string once as a property variable that you
reference from the behavior's handlers.
on oneMethod findString,hugeSearchString
if FindFirst(hugeSearchString,findString) > 0 then
return TRUE
else
return FALSE
end if
end
on fasterSaferMethod findString
global hugeSearchString
if FindFirst(hugeSearchString,findString) > 0 then
return TRUE
else
return FALSE
end if
end
Online Help
57
Zobrazit stránku 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 63

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

Žádné komentáře