Articles Tagged 'inheritance'

Objective-C: subclassing and Categories

In Objective-C you can extend a class given in two ways: by running a classic subclassing (see also Inheritance) or using the so-called Categories .

Note: there is also a third way in Objective-C indicated by the name of Posing we might call a mix of subclass (because it defines a new name) and categories (for a given moment all classes of one type behave like new) .

More ...

Write good OO code in Adobe Flash

Here are some tips on how to write good code Object Oriented (OO) in Adobe Flash, especially for those still using version MX waiting to move to CS3.

Organize classes folders

First of all, the organization of the classes makes the job of code maintenance extremely simple. You can also create a real library you can reuse in other projects. Flash uses a nomenclature related to the filesystem, then organize them into folders will also be reflected on the import of classes. For example, if we create the sequence of folders "mylibrary / graphics / plot" and insert our own ActionScript class "PlotClass.as" when we are going to import the class we should use:

1
grafica . plot . PlotClass ; import mylibrary. graphics. plot. PlotClass;

If the library (folder) "mylibrary" is not in your movie folder or project, use the Flash publish settings to select the path:

Setting percoroso libraries

More ...


Stop SOPA