[Property(name="_siteID", type="String")] // What Is THIS?

Whoops, forgot to take that out.  I came across the "metadata" section in the
documentation, and thought that might be my problem - that I needed to tell the
compiler about my new property.  I tried the above and it didn't make any
difference, and then I moved on to try something else...

Thanks for the response!  It works now

Rick
-----Original Message-----
From: Michael Schmalle [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 16, 2006 6:07 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Newbie again: Trouble implementing custom class
(Flex2b)


Man, time to eat...

SHOULD BE

package com.jbe.picfindr
{

import mx.rpc.http.HTTPService;

    public class pfHTTPService extends HTTPService {

        public function pfHTTPService(rootURL:String = null)
        {
            super(rootURL);
            public var _siteID:String = "";
            public function get siteID()
            {
                  return _siteID;
              }
              public function set siteID(value:uint)
              {
                    _siteID = value;
              }
        }

    }

}



On 3/16/06, Michael Schmalle <[EMAIL PROTECTED]> wrote:
Well,

for starters;

com.jbe.picfindr

should be

projectroot/com/jbe/picfinder/pfHTTPService.as

Try that, you need the dots to be actuall directory structure.

Are you dead ending the :

HTTPService(rootURL:String = null)

signature?

If not, your super needs to look like

super(rootURL:String = null);

Peace, Mike



On 3/16/06, revanisle <[EMAIL PROTECTED]> wrote:
Hi all,
  Thanks for all the replies to my previous posts.  You guys are
really helping me learn this stuff.  Hopefully by the time Flex2 ships
I'll be able to start to give back too...

OK.  I'm trying to actually start using my own packages and classes.
I've created a new class that extends HTTPService and simply adds one
new property:

package com.jbe.picfindr
{

import mx.rpc.http.HTTPService;

    [Property(name="_siteID", type="String")]
    public class pfHTTPService extends HTTPService {

        public function pfHTTPService()
        {
            super();
            public var _siteID:String = "";
            public function get siteID()
            {
                  return _siteID;
              }
              public function set siteID(value:uint)
              {
                    _siteID = value;
              }
        }

    }

}

This file is called pfHTTPService.as and it lives in a folder called
com.jbe.picfindr, which shows up as a package in Flex code hints.
When I go to create a new instance in an actionscript block (which
includes the line "import com.jbe.picfindr.pfHTTPService;", I get "not
a compile time constant" and "trying to access possibly undefined
method" errors.  I instatiate it like this:

var service:pfHTTPService = new pfHTTPService();

Any thoughts?

Thanks in advance!

Rick






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS Web site design development  Computer software development 
Software design and development
Macromedia flex  Software development best practice


--------------------------------------------------------------------------------
YAHOO! GROUPS LINKS

 Visit your group "flexcoders" on the web.

 To unsubscribe from this group, send an email to:
  [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


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





-- 
What goes up, does come down.



-- 
What goes up, does come down.

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS Web site design development  Computer software development 
Software design and development
Macromedia flex  Software development best practice


--------------------------------------------------------------------------------
YAHOO! GROUPS LINKS

 Visit your group "flexcoders" on the web.

 To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

 Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


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






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to