[...] namespaces in Flash & Flex. To learn more about namespaces awesomeness, John Lindquist has an excellent video post that covers the concepts really well and goes into some advanced [...]
What about defining variables in the namespace file? For example, in flash authoring there is the compiler option:
CONFIG::FLASH_AUTHORING
'CONFIG' is the namepace and 'FLASH_AUTHORING' is a variable. Which seems to be a boolean. cause I can turn it on and off with:
-define=CONFIG:: FLASH_AUTHORING,false
Do you mind saying what that class looks like? is it:
package { public namespace CONFIG; public var FLASH_AUTHORING:Boolean; }
I am trying to turn off and on classes. When I do this
package { CONFIG::FLASH_AUTHORING public class Main extends Sprite {
} }
The class can be skipped with that compiler option. I would like to create my own namespace files with similar functionality, but my own naming conventions.
Great post. I love the idea of assisting developers so they only seeing the methods via intellisense (of Flex Builder) for methods they need to see. I created a new demo to show that off. http://www.blog.rivello.org/?p=422
[...] mit ihnen befasst habe. Heute habe ich zum Glück ein sehr ausführliches und grundlegendes Videotutorial über Namespaces gefunden, das viele Fragen geklärt und mir Möglichkeiten und Einsatzgebiete aufgezeigt [...]
Thanks for the tutorial. I was able to implement namespaces to create access restricted methods successfully except in one instance. Can methods declared with a custom namespace be overwritten? I have been unsuccessful in doing so. Here is a short sample:
// secret.as package { public namespace secret = "http://www.example.com/secret"; }
// Base.as package { import secret; public class Base { public function Base() { }
secret function test():void { trace("Base test"); } } }
// Extended.as package { import secret; public class Extended extends Base { public function Extended() { }
override secret function test():void { trace("Extended test2"); } } }
If I mark test() with override I get "1004: Namespace was not found or is not a compile-time constant." If I remove override I get "VerifyError: Error #1053: Illegal override of test in Extended." Is this not possible? Is there a workaround? Thanks.
Hello. I saw your last video about public, private, internal and protected and real like it, it's the best example about programm basic that i ever see. And that video is deleted or moved to another place??? I wish to see them to. Thanks you.
Great tutorial!
ReplyDelete[...] namespaces in Flash & Flex. To learn more about namespaces awesomeness, John Lindquist has an excellent video post that covers the concepts really well and goes into some advanced [...]
ReplyDeletevery helpful, thanks for your uFlash presentation too!
ReplyDeleteWhat about defining variables in the namespace file? For example, in flash authoring there is the compiler option:
ReplyDeleteCONFIG::FLASH_AUTHORING
'CONFIG' is the namepace and 'FLASH_AUTHORING' is a variable. Which seems to be a boolean. cause I can turn it on and off with:
-define=CONFIG:: FLASH_AUTHORING,false
Do you mind saying what that class looks like? is it:
package
{
public namespace CONFIG;
public var FLASH_AUTHORING:Boolean;
}
I am trying to turn off and on classes. When I do this
package
{
CONFIG::FLASH_AUTHORING
public class Main extends Sprite
{
}
}
The class can be skipped with that compiler option. I would like to create my own namespace files with similar functionality, but my own naming conventions.
Great post. I love the idea of assisting developers so they only seeing the methods via intellisense (of Flex Builder) for methods they need to see. I created a new demo to show that off. http://www.blog.rivello.org/?p=422
ReplyDeleteCool. Thanks for making this! Was wondering how that use namespace worked. I have seen it used in some mvc frameworks.
ReplyDelete[...] видео-туториал четко и понятно объясняющее как и для чего можно [...]
ReplyDelete[...] mit ihnen befasst habe. Heute habe ich zum Glück ein sehr ausführliches und grundlegendes Videotutorial über Namespaces gefunden, das viele Fragen geklärt und mir Möglichkeiten und Einsatzgebiete aufgezeigt [...]
ReplyDeleteThanks for the tutorial. I was able to implement namespaces to create access restricted methods successfully except in one instance. Can methods declared with a custom namespace be overwritten? I have been unsuccessful in doing so. Here is a short sample:
ReplyDelete// secret.as
package {
public namespace secret = "http://www.example.com/secret";
}
// Base.as
package {
import secret;
public class Base {
public function Base() {
}
secret function test():void {
trace("Base test");
}
}
}
// Extended.as
package {
import secret;
public class Extended extends Base {
public function Extended() {
}
override secret function test():void {
trace("Extended test2");
}
}
}
If I mark test() with override I get "1004: Namespace was not found or is not a compile-time constant."
If I remove override I get "VerifyError: Error #1053: Illegal override of test in Extended."
Is this not possible? Is there a workaround? Thanks.
Thanks John. This is really useful for me. Can u provide a downloadable url address for us of this video? Thanks!
ReplyDeleteHello. I saw your last video about public, private, internal and protected and real like it, it's the best example about programm basic that i ever see.
ReplyDeleteAnd that video is deleted or moved to another place??? I wish to see them to.
Thanks you.
Ups two time posted, Sorry. Delete this please
ReplyDeleteI updated the post with a download link for the video.
ReplyDelete