Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-28-2004, 05:18 AM   #1
raduCocieru
Severe critictics
 
raduCocieru's Avatar
 
Join Date: Oct 2002
Location: Romania
Posts: 85
Send a message via Yahoo to raduCocieru
Default How do I Extend the DataProvider class ?(extends doesn't work)

Hi !
I am trying to extend the DataProvider class so it could work like a Tree but keep the data in an Array.

I've tried to use this:
mx.controls.listclasses.DataProvider

Code:
class myDataProvider extends DataProvider{

	function myDataProvider(){
	}	
        
        function fold(id:Number){}

}
I will also override a few baseclass methodes, but for now the above code gives me this:
Quote:
**Error** E:\xxx\xxxx\myDataProvider.as: Line 3: ActionScript 2.0 class scripts may only define class or interface constructs.


Any suggestions ?
Thanks.
raduCocieru is offline   Reply With Quote
Old 05-28-2004, 06:55 AM   #2
maglez
Registered User
 
Join Date: Jan 2004
Location: A Spanish in London
Posts: 195
Default

try importing the DataProvider class...


import mx.controls.listclasses.DataProvider

class myDataProvider extends DataProvider{
function myDataProvider(){
}

function fold(id:Number){}
}

OR

class myDataProvider extends mx.controls.listclasses.DataProvider{
function myDataProvider(){
}

function fold(id:Number){}
}

I don't know if this solve your problem.
maglez is offline   Reply With Quote
Old 05-28-2004, 07:11 AM   #3
raduCocieru
Severe critictics
 
raduCocieru's Avatar
 
Join Date: Oct 2002
Location: Romania
Posts: 85
Send a message via Yahoo to raduCocieru
Default

this:
Code:
import mx.controls.listclasses.DataProvider

class myDataProvider extends DataProvider{
function myDataProvider(){
}

function fold(id:Number){}
}
doesn't work i've tried it just omited to put all the lines on the post.

the second one with the extends mx.controls.listclasses.DataProvider works fine
that's really odd ?:

It just didn't cross my mind

Thanks !
raduCocieru is offline   Reply With Quote
Old 05-28-2004, 07:25 AM   #4
maglez
Registered User
 
Join Date: Jan 2004
Location: A Spanish in London
Posts: 195
Default

The import command should works as well.

Check that the value...

$(LocalData)/Classes

...is in the classpath in the ActionScript Settings on Edit>Preference under the tag ActionScript.
maglez is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:05 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.