Actually Tim, that approach did make a difference in my main.mxml

so this works:

import com.someframework.ITestClass;
import com.myproject.someframework.TestClass;

var test:ITestClass = new TestClass();


whereas this doesn't:

var test:com.someframework.ITestClass = new
com.myproject.someframework.TestClass();


Is that really expected behaviour? I've always believed the above two
implementations to be pretty much the same as far as the compiler was
concerned??

Anyway I'm happy to have it figured out so thanks for responding.

Dan



2009/4/18 DannyT <danmo...@googlemail.com>

> Thanks tim but unfortunately that doesnt help in this instance
>
> 2009/4/18 Tim Hoff <timh...@aol.com>
>
>
>>
>> Hi,
>>
>> Usually you would import the class:
>> *
>>
>> import
>> * com.someframework.ITestClass;
>>
>> and then implement like:
>> *
>>
>> public
>> * *class* TestClass *implements* ITestClass
>>
>> HTH
>> -TH
>>
>>
>> --- In flexcoders@yahoogroups.com, DannyT <danmo...@...> wrote:
>> >
>> > I'm trying to create a cairngorm version of my application, as such I've
>> > used the namespace:
>> >
>> > com.myproject.cairngorm.*
>> >
>> > However as far as I can tell it seems using the name 'cairngorm' in my
>> > project namespace is causing problems with the actual cairngorm swc.
>> I've
>> > tried the below test and found it isn't a cairngorm specific issue...
>> >
>> > In a library project I have an interface (or what is IModelLocator in
>> > cairngorm package):
>> >
>> > package com.someframework
>> > {
>> > public interface ITestClass { }
>> > }
>> >
>> > in my actual flex project I have a class that implements this interface
>> (or
>> > my modellocator in my real project):
>> >
>> > package com.myproject.someframework
>> > {
>> > public class TestClass implements com.someframework.ITestClass
>> > {
>> > public function TestClass() {}
>> > }
>> > }
>> >
>> > now in my main.mxml file i try:
>> >
>> > var test:com.someframework.ITestClass = new
>> > com.myproject.someframework.TestClass();
>> >
>> > which gives me the following errors:
>> >
>> > 1046: Type was not found or was not a compile-time constant: ITestClass.
>> > Main.mxml NamespaceBugTest/src line 6 Flex Problem
>> > 1120: Access of undefined property com. Main.mxml
>> > NamespaceBugTest/src line 6 Flex Problem
>> >
>> > Is this expected behaviour and I'm missing something obvious or a flex
>> > problem?
>> >
>>  
>>
>
>
>
> --
> http://danny-t.co.uk
>



-- 
http://danny-t.co.uk

Reply via email to