Skip to search.
ydn-flash · Yahoo! Flash Developer Group

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Flash AS3 classes " fix " for Yahoo Search   Message List  
Reply Message #37 of 2433 |
When I create a new project in AS3 and link up the Yahoo classes I get these 4 error messages and 2 warnings

ERRORS

1170: Function does not return a value.    [YahooSearchResultEvent.as]

Solution

public function getResult(index:Number):YahooSearchResult
        {
            //trace('getResult invoked');
            try
            {
                if(isNaN(index) == true || index >= this.totalResultsReturned)
                {
                    trace('invalid result index: ' + index + "\n totalResultsReturned: " + this.totalResultsReturned)
                    return null;
                }               
            }
            catch(error:Error)
            {
                trace('error: ' + error.message)
            }
           
            return this.$results[index];
        }

--------------------------------------------------------------------------------------------------------------



1119: Access of possibly undefined property Empty through a reference
      with static type Class.    [YahooSearch.as]

Solution

99  if(zip != null)

--------------------------------------------------------------------------------------------------------------

1119: Access of possibly undefined property AUDIO_SEARCH through a
           reference with static type Class.       [YahooSearchResultEvent.as]   

Solution

Add this property to the YahooApi Class

public static var AUDIO_SEARCH:String = 'audio';

--------------------------------------------------------------------------------------------------------------

1067: Implicit coercion of a value of type Number to an unrelated type
          String.    [YahooAPI.as]

Solution

52 return YahooAPI.search(needle, YahooAPI.LOCAL_SEARCH, new NameValuePair('zip', String(zip)));

--------------------------------------------------------------------------------------------------------------

WARNINGS

1008: variable 'ns' has no type declaration.    YahooSearchResultEvent.as  

Solution

28  var ns:Namespace = new Namespace(this.searchNamespace);


--------------------------------------------------------------------------------------------------------------

1008: variable 'i' has no type declaration.    YahooSearchResultEvent.as  

Solution

29  for(var i:String in this.$xml.ns::Result)



hope this helps

cheers :)
firdosh




Fri Nov 3, 2006 4:48 am

firdosht
Offline Offline
Send Email Send Email

Message #37 of 2433 |
Expand Messages Author Sort by Date

When I create a new project in AS3 and link up the Yahoo classes I get these 4 error messages and 2 warnings ERRORS 1170: Function does not return a value....
firdosht Offline Send Email Nov 3, 2006
4:53 am

Hey, thanks for noticing this :-) I've actually addressed all of the issues and released an updated codebase (with a cool visual example) on my blog at: ...
Caleb
calebhaye Offline Send Email
Nov 3, 2006
10:49 pm

cool np :) were just minor things.....all in all really good api. . I wish there were more flash libs getting converted to AS3 and Flex2. I am actually working...
Firdosh Tangri
firdosht Offline Send Email
Nov 4, 2006
2:10 am

Cool man, thanks for the nice words :-) I'd love to see that app you're working on whenever you're ready to share it... Best, Caleb...
Caleb
calebhaye Offline Send Email
Nov 4, 2006
4:44 am

I just started working on it today. Its basically using the flex framework to create a cooler way to use the yahoo search api where you can organize the search...
Firdosh Tangri
firdosht Offline Send Email
Nov 4, 2006
6:26 am

Hey , so I have been messing around with the yahoo search api. I created a protype interface where the user can create groups / facets of previous searches by...
Firdosh Tangri
firdosht Offline Send Email
Nov 4, 2006
10:36 pm

sorry forgot the link I`ll put up the source code once I clean it up a lil bit http://seas.mgmt.purdue.edu/~firdosh/YahooAPI/bin/CustomItemRendererExample.html...
Firdosh Tangri
firdosht Offline Send Email
Nov 4, 2006
10:48 pm

Firdosh, you're the man, thanks :-) I have been meaning to make a YahooImageSearchResult class (and a YahooNewsSearch ...etc), but i dont have the time... so...
Caleb
calebhaye Offline Send Email
Nov 5, 2006
7:16 pm

Hey Caleb :) , I just realized a few things about the API . In the YahooImageSearchResult class there is a small namespace bug. Since the Thumbnail is a...
Firdosh Tangri
firdosht Offline Send Email
Nov 6, 2006
1:47 am

Firdosh, Again, excellent work. I wish i had the time to give this API the attention it deserves. I agree that we should define search interfaces and...
Caleb
calebhaye Offline Send Email
Nov 6, 2006
3:36 am

Firdosh, 3 things: 1 - I actually wrote a code generator that takes a REST result and creates all of the domain objects required to support that class, in both...
Caleb
calebhaye Offline Send Email
Nov 6, 2006
4:09 am

Thank Caleb , cool let me know once the repository is set. I tried checking out flapjax but it keeps giving me SVN repository error I guess I`ll try again...
Firdosh Tangri
firdosht Offline Send Email
Nov 6, 2006
3:53 am

SVN error? Hmm ... Beau, i thought you might want to know about this :-) I can't predict the market, but if things stay the way they are .. .you should have...
Caleb
calebhaye Offline Send Email
Nov 6, 2006
4:21 am

1. Thats pretty cool, is it online somewhere ?? 2. Yea thats pretty much what I was thinking too :) 3. I agree that a complete API is daunting for beginners...
Firdosh Tangri
firdosht Offline Send Email
Nov 6, 2006
5:02 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help