Hey Micheal

i expect this is caused by the material name clashing with a protected
property on Dictionary - what is the material name string that you are
passing to getMaterial when it errors?



On Tue, Dec 7, 2010 at 6:29 PM, Michael Iv <[email protected]> wrote:

> The proof of the concept here is that if I do this inside Obj :
>
>                                          if(!_materialData){
> _materialData = _materialLibrary.getMaterial(trunk[1]);
>  }
>
> So the default _materialData is not being nullified and the material is
> being applied all right.
>
>
>
> On Tue, Dec 7, 2010 at 8:24 PM, Michael Iv <[email protected]> wrote:
>
>> Yes guys something is wrong with my Flash Builder4 ,checking this issue
>> with Flex Builder 3 and FlashDevelop and there Obj class looks intact . But
>> another problems remains and that is Obj loader doesn't work I tried to
>> track down a possible bug . I can see that the problem comes after the load
>> finish of mtl. Somehow in this block :
>>
>> switch (trunk[0]) {
>> case "newmtl":
>> _materialData = _materialLibrary.getMaterial(trunk[1]);
>>  break;
>> case "map_Kd":
>>
>> _materialData which in the beginning contains data becomes null and all
>> the thing crashes.Now I wanted to check
>> why _materialLibrary.getMaterial(trunk[1]); returns null and found it
>> returns not null but a string instead of MaterialData as it is clearly seen
>> from the function itself:
>>
>>  public function getMaterial(name:String):MaterialData
>>         {
>>          //return if material exists
>>          if (this[name])
>>          return this[name]; ////--->name is a string not a  MaterialData
>>
>>          Debug.warning("Material '" + name + "' does not exist");
>>
>>          return null;
>>         }
>>
>> Can anybody please take a look at this as I am not a big expert on
>> parsers. Thanks a lot.
>>
>> On Tue, Dec 7, 2010 at 6:12 PM, Greg209 <[email protected]>wrote:
>>
>>> Oh and yes, I do get the code completion for load and parse.
>>>
>>> Greg
>>>
>>> On Dec 7, 4:04 pm, Greg209 <[email protected]> wrote:
>>> > I'm going through the google-groups interface so can't do attachments
>>> > but the code is a straight cut-n-paste from the web svn interface
>>> > at ....
>>> >
>>> > http://away3d.googlecode.com/svn/trunk/fp10/Away3D/src/away3d/loaders.
>>> ..
>>> >
>>> > Greg
>>> >
>>> > On Dec 7, 3:52 pm, richardolsson <[email protected]> wrote:
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > That's the UTF-8 BOM. I'm unsure why it shows up in Michaels file
>>> > > though. Actually, looking at your Obj.as file in a hex editor,
>>> > > Michael, it seems like you have the BOM repeated:
>>> >
>>> > > EF BB BF EF BB BF "package"...
>>> >
>>> > > I don't know how this has happened, but that could definitely be why
>>> > > your version of FD fails to parse the file correctly.
>>> >
>>> > > Cheers
>>> > > /R
>>> >
>>> > > On Dec 7, 4:43 pm, Greg209 <[email protected]> wrote:
>>> >
>>> > > > I've just looked at 3.6 and the trunk versions of Obj.as in
>>> > > > FlashDevelop and the outliner shows everything is contained
>>> correctly
>>> > > > in the Obj class e.g. the same as MD2.
>>> >
>>> > > > Even the class you pasted in seems to outline fine and the bracket
>>> > > > match of the class goes all the way to the bottom as expected.
>>> >
>>> > > > The only thing I did notice on the attached version was a spurious
>>> > > > character at the very start of the file, could that be messing
>>> things
>>> > > > up?
>>> >
>>> > > > Greg
>>> >
>>> > > > On Dec 7, 3:05 pm, Michael Iv <[email protected]> wrote:
>>> >
>>> > > > > Fabrice here is the comparison between MD2 loader and Obj
>>> structures. From
>>> > > > > the class outline panel of Flash Builder it is clearly seen that
>>> Obj doesn't
>>> > > > > wrap many of variables and methods
>>> >
>>> > > > > On Tue, Dec 7, 2010 at 4:16 PM, Michael Iv <
>>> [email protected]> wrote:
>>> > > > > > Can you send me your class? Have you tested it to load some
>>> Obj?
>>> >
>>> > > > > > On Tue, Dec 7, 2010 at 4:14 PM, Michael Iv <
>>> [email protected]> wrote:
>>> >
>>> > > > > >> Fabrice ,I copied from the trunk browser into Away google code
>>> the Obj
>>> > > > > >> class into my svn .This looks the same to what I already have.
>>> I really
>>> > > > > >> don't get it because it doesn't look all right as you
>>> say.First If inside
>>> > > > > >> the FlashBuilder I click + to close a block let's say of the
>>> entire class it
>>> > > > > >> doesn't wrap most of the functions including the static .And
>>> that is the
>>> > > > > >> reason why Code hinting drop down list doesn't expose static
>>> load() and
>>> > > > > >> parse() methods.Are you sure we are talking about the same ?
>>> > > > > >> Attached here the class I am talking about.
>>> >
>>> > > > > >> On Tue, Dec 7, 2010 at 3:59 PM, Michael Iv <
>>> [email protected]> wrote:
>>> >
>>> > > > > >>> Now when you say it to me ,I need to check if I haven't any
>>> problem with
>>> > > > > >>> my svn client.
>>> > > > > >>> Thanks Fabrice
>>> >
>>> > > > > >>> On Tue, Dec 7, 2010 at 3:37 PM, Fabrice3D <
>>> [email protected]> wrote:
>>> >
>>> > > > > >>>> Just looked/reloaded...  are you sure there's nothing wrong
>>> with your
>>> > > > > >>>> svn client?
>>> > > > > >>>> the class looks fine to me. All is within class block.
>>> > > > > >>>> and its works too.
>>> >
>>> > > > > >>>> Fabrice
>>> >
>>> > > > > >>>> On Dec 7, 2010, at 1:07 PM, Michael Iv wrote:
>>> >
>>> > > > > >>>> Anybody from the dev team can comment on the state of things
>>> with Obj
>>> > > > > >>>> loader?
>>> >
>>> > > > > >>>> Thanks a lot :)
>>> >
>>> > > > > >>>> On Mon, Dec 6, 2010 at 8:54 AM, Michael Iv <
>>> [email protected]>wrote:
>>> >
>>> > > > > >>>>> Can you guys take a look at Obj loader? It was late at
>>> night when I
>>> > > > > >>>>> started looking through it and was already too tired to
>>> figure out what was
>>> > > > > >>>>> going on there.Now ,there is nothing wrong with my Flash
>>> Builder (concerning
>>> > > > > >>>>> the fact that it doesn't allow a code hint for static
>>> parse() and load()
>>> > > > > >>>>> methods). The class is a total mess. Many of the functions
>>> are outside the
>>> > > > > >>>>> class block .Also there is a block of code which is outside
>>> any function
>>> > > > > >>>>> .And this is it that throws me error on Obj load. I am not
>>> so sure this
>>> > > > > >>>>> state is a default as I compared with other loaders and all
>>> the methods are
>>> > > > > >>>>> contained by the class ,so it is the right way to be by OOP
>>> standards as far
>>> > > > > >>>>> as I know ....
>>> >
>>> > > > > >>>>> Thanks a lot :)
>>> >
>>> > > > > >>>>> On Mon, Dec 6, 2010 at 2:07 AM, Fabrice3D <
>>> [email protected]> wrote:
>>> >
>>> > > > > >>>>>> thats weird, my svn gave on it was up to date, and I'm
>>> sure I've
>>> > > > > >>>>>> commited this one earlyer
>>> > > > > >>>>>> reloaded whole package and indeed it was the old version,
>>> > > > > >>>>>> svn is now updated for these (rotation issue for the Lite
>>> exporter
>>> > > > > >>>>>> also commited)
>>> >
>>> > > > > >>>>>> Fabrice
>>> >
>>> > > > > >>>>>> On Dec 5, 2010, at 10:10 PM, Michael Iv wrote:
>>> >
>>> > > > > >>>>>> AwDataExporter-just used it and the bug is there ...
>>> >
>>> > > > > >>>>>> On Sun, Dec 5, 2010 at 10:59 PM, Fabrice3D <
>>> [email protected]>wrote:
>>> >
>>> > > > > >>>>>>> which class exactly?
>>> > > > > >>>>>>> AwayConnector uses the AwDataExporter, and it has been
>>> updated weeks
>>> > > > > >>>>>>> ago...
>>> >
>>> > > > > >>>>>>> Fabrice
>>> >
>>> > > > > >>>>>>> On Dec 5, 2010, at 9:42 PM, Michael Iv wrote:
>>> >
>>> > > > > >>>>>>> Hi Guys,
>>> > > > > >>>>>>> Working with AwayConnector found bug here :
>>> > > > > >>>>>>> for(j=0;j<3;++j){
>>> >
>>> > > > > >>>>>>>                        tmp.x =  face.vertices["v"+j].x;
>>> > > > > >>>>>>>                         tmp.y =  face.vertices["v"+j].y;
>>> > > > > >>>>>>>                         tmp.z =  face.vertices["v"+j].z;
>>> >
>>> > > > > >>>>>>>                         aRef[j] = checkDoubles( MaV,
>>> > > > > >>>>>>>
>>> (tmp.x.toFixed(4)+"/"+tmp.y.toFixed(4)+"/"+tmp.z.toFixed(4)) );
>>> > > > > >>>>>>>                     }
>>> >
>>> > > > > >>>>>>> Fixed it substituting with:
>>> >
>>> > > > > >>>>>>>                         tmp.x =  face.vertices[j].x;
>>> > > > > >>>>>>>                         tmp.y =  face.vertices[j].y;
>>> > > > > >>>>>>>                         tmp.z =  face.vertices[j].z;
>>> >
>>> > > > > >>>>>>> Please if someone with access to svn can updated it
>>> .Thanks :)
>>> >
>>> > > > > >>>>>>> --
>>> > > > > >>>>>>> Michael Ivanov ,Programmer
>>> > > > > >>>>>>> Neurotech Solutions Ltd.
>>> > > > > >>>>>>> Flex|Air |3D|Unity|
>>> > > > > >>>>>>>www.neurotechresearch.com
>>> > > > > >>>>>>>http://blog.alladvanced.net
>>> > > > > >>>>>>>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >>>>>>> Tel:054-4962254
>>> > > > > >>>>>>> [email protected]
>>> > > > > >>>>>>> [email protected]
>>> >
>>> > > > > >>>>>> --
>>> > > > > >>>>>> Michael Ivanov ,Programmer
>>> > > > > >>>>>> Neurotech Solutions Ltd.
>>> > > > > >>>>>> Flex|Air |3D|Unity|
>>> > > > > >>>>>>www.neurotechresearch.com
>>> > > > > >>>>>>http://blog.alladvanced.net
>>> > > > > >>>>>>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >>>>>> Tel:054-4962254
>>> > > > > >>>>>> [email protected]
>>> > > > > >>>>>> [email protected]
>>> >
>>> > > > > >>>>> --
>>> > > > > >>>>> Michael Ivanov ,Programmer
>>> > > > > >>>>> Neurotech Solutions Ltd.
>>> > > > > >>>>> Flex|Air |3D|Unity|
>>> > > > > >>>>>www.neurotechresearch.com
>>> > > > > >>>>>http://blog.alladvanced.net
>>> > > > > >>>>>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >>>>> Tel:054-4962254
>>> > > > > >>>>> [email protected]
>>> > > > > >>>>> [email protected]
>>> >
>>> > > > > >>>> --
>>> > > > > >>>> Michael Ivanov ,Programmer
>>> > > > > >>>> Neurotech Solutions Ltd.
>>> > > > > >>>> Flex|Air |3D|Unity|
>>> > > > > >>>>www.neurotechresearch.com
>>> > > > > >>>>http://blog.alladvanced.net
>>> > > > > >>>>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >>>> Tel:054-4962254
>>> > > > > >>>> [email protected]
>>> > > > > >>>> [email protected]
>>> >
>>> > > > > >>> --
>>> > > > > >>> Michael Ivanov ,Programmer
>>> > > > > >>> Neurotech Solutions Ltd.
>>> > > > > >>> Flex|Air |3D|Unity|
>>> > > > > >>>www.neurotechresearch.com
>>> > > > > >>>http://blog.alladvanced.net
>>> > > > > >>>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >>> Tel:054-4962254
>>> > > > > >>> [email protected]
>>> > > > > >>> [email protected]
>>> >
>>> > > > > >> --
>>> > > > > >> Michael Ivanov ,Programmer
>>> > > > > >> Neurotech Solutions Ltd.
>>> > > > > >> Flex|Air |3D|Unity|
>>> > > > > >>www.neurotechresearch.com
>>> > > > > >>http://blog.alladvanced.net
>>> > > > > >>http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > >> Tel:054-4962254
>>> > > > > >> [email protected]
>>> > > > > >> [email protected]
>>> >
>>> > > > > > --
>>> > > > > > Michael Ivanov ,Programmer
>>> > > > > > Neurotech Solutions Ltd.
>>> > > > > > Flex|Air |3D|Unity|
>>> > > > > >www.neurotechresearch.com
>>> > > > > >http://blog.alladvanced.net
>>> > > > > >http://www.meetup.com/GO3D-Games-Opensource-3D/
>>> > > > > > Tel:054-4962254
>>> > > > > > [email protected]
>>> > > > > > [email protected]
>>> >
>>> > > > > --
>>> > > > > Michael Ivanov ,Programmer
>>> > > > > Neurotech Solutions Ltd.
>>> > > > > Flex|Air
>>> |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp://www.meetup...
>>> > > > > Tel:054-4962254
>>> > > > > [email protected]
>>> > > > > [email protected]
>>> >
>>> > > > >  Snap_2010.12.07 17.03.02_001.png
>>> > > > > 20KViewDownload
>>> >
>>> > > > >  Snap_2010.12.07 17.03.17_002.png
>>> > > > > 9KViewDownload
>>>
>>
>>
>>
>> --
>> Michael Ivanov ,Programmer
>> Neurotech Solutions Ltd.
>> Flex|Air |3D|Unity|
>> www.neurotechresearch.com
>> http://blog.alladvanced.net
>> http://www.meetup.com/GO3D-Games-Opensource-3D/
>> Tel:054-4962254
>> [email protected]
>> [email protected]
>>
>>
>
>
> --
> Michael Ivanov ,Programmer
> Neurotech Solutions Ltd.
> Flex|Air |3D|Unity|
> www.neurotechresearch.com
> http://blog.alladvanced.net
> http://www.meetup.com/GO3D-Games-Opensource-3D/
> Tel:054-4962254
> [email protected]
> [email protected]
>
>


-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to