Getter Setter strange problem in interface

hi folks I have a strange compiler error
package  {
  public interface IGet{
  function get someInt():int;
package  {
  public interface ISet {
  function set someInt(value:int):void;
package  {
  public interface ISomeInt extends IGet, ISet{
package {
  public class SomeInt implements ISomeInt {
  public function SomeInt () {
  public function set someInt (value:int):void {
  public function get someInt ():int {
  return 157;
package  {
  import flash.display.MovieClip;
  public class InitSomeInt extends MovieClip{
  public function InitSomeInt() {
  var so:ISomeInt = new SomeInt;
  so.someInt = 15;
compiler says: 1059: Property is read-only.
any solutions?
ction set someInt

Just to chime in...I'm not sure how familiar vakhtangi is with AS and don't want him to get discouraged by wrong information by someone with a lot of reputation points. Typing it to the interface is the correct thing to do and changing to the implementation type won't help (and of course also won't accomplish the purpose of using Interfaces in the first place).
I think what actually happens is that the IGet and ISet are defined separately, then combined in ISomeInt. When trying to set the value, the compiler sees them as separate and is picking up the IGet first (that's the order you specified in ISomeInt), which does specify someInt as a read-only property. This is strange behavior, but not illogical. It's probably an edge case that never occurred to Macromedia/Adobe.

Similar Messages

  • Layout Set Strange Problem

    HI all
    I have created new Layout Set - advanced copy of ConsumerExplorer-  with some changes. This layout set is assigned to <b>KM  Navigation iView</b> and as a <b>Search Results Layout Set</b>.
    In this layout set in <b>KM_ConsumerCollectionRenderer</b>, in <b>Displayed Properties</b> we have put some custom properties. Some of the properties are of type <b>String</b> and other are of type <b>Date.</b>
    When we see the docs in KM Navigation iView only properties having String type are getting displayed. Properties of type<b> Date</b> are displayed as blank.
    But when we search for the same document its all properties are displayed including of type Date.
    I am wondering, I have used same Layout Set for KM Navigation and Search iviews, but KM Navigation has some problems.
    Please reply immediately.

    Hi,
           Can you check by going to "presentation" in folder>details>settings>select profile> choose other layout. Under the "properties to show" tab you can click on the "add" button and choose the properties. Check the preview. By this we can check if there is any problem specific to the layout set you are using before.
    Ramesh Kotagiri

  • Strange Problem - All of my preloaded .swf files play at once

    Hey guys,
      I've been getting a strange problem that I haven't been able to debug.  I recently developed an interactive audio and video treatment program that users click through in which a master swf file (DTM-Start.swf) uses ActionScript upon first being loaded to load the rest of the program in the background.  Here's how the code looks: 
    import flash.display.MovieClip;
    import flash.display.Loader;
    import flash.net.URLRequest;
    import flash.events.Event;
    // create movieclip objects to hold the loaded movies
    var intr1:MovieClip;
    var maladaptIntr1:MovieClip;
    var maladaptIntr1Loader:Loader = new Loader();
    var maladaptIntr1Request:URLRequest = new URLRequest("DTM-Maladapt1.swf");
    maladaptIntr1Loader.load(maladaptIntr1Request);
    maladaptIntr1Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, maladaptIntr1Loaded);
    var intr1Loader:Loader = new Loader(); 
    var intr1Request:URLRequest = new URLRequest("DTM-Intr1.swf");
    intr1Loader.load(intr1Request);
    intr1Loader.contentLoaderInfo.addEventListener(Event.COMPLETE, intr1Loaded);
    function maladaptIntr1Loaded(event:Event):void
        maladaptIntr1 = event.currentTarget.content as MovieClip;
        maladaptIntr1.stop();
        addChild(maladaptIntr1);
        maladaptIntr1.y = -1000
        trace("maladaptIntr1");
    function intr1Loaded(event:Event):void
        intr1 = event.currentTarget.content as MovieClip;
        intr1.stop();
        addChild(intr1);
        intr1.y = -1000
        trace("intr1");
    function playIntr1() {
       intr1.y = 0;
       intr1.play();
    function playMaladapt1() {
        maladaptIntr1.y = 0;
        maladaptIntr1.play();
    So that's the idea.  What's strange is that when I load a .swf file compiled with AIR 2.6 (because the user interacts with the movie and a text file is output) it's fine too, but as soon as I add any actionscript, even if it's just a stop() command, to a .swf file compiled with AIR, the DTM-Start.swf loads and then plays all of the movies simultaneously so they're all going off at once.  Essentially, flash seems to be ignoring the maladaptIntr.stop() command in the Loaded function, for instance.  I just don't understand why adding any Actionscript whatsoever to a .swf compiled with AIR would make my DTM-Start do this.  I am very confident this is the issue too, because loading .swf files compiled with the FlashPlayer with action script are fine...AIR .swf files without Actionscript are fine too, it's only AIR .swf files with ANY actionscript that cause this problem....
    Any ideas?
    Much appreciated!
    Thanks,
    Ricky

    One solution is simply to have a stop() in the constructor of the document Class of each swf you're loading. Another solution is something like:
    package {
         class MainDocument extends MovieClip {
         protected var swfs:Array = ['DTM-Maladapt1.swf', 'DTM-Intr1.swf'];
         protected var positions:Array = [{x:0, y:0}, {x:0, y:0}];
         protected var movies:Array /*of  MovieClips*/ = [];
         protected var loadIndex:int;
         protected var playIndex:int;
         protected var curremtMovie:MovieClip;
              public function MainDocument() {
                   super();
                   loadMovie(loadIndex);
              protected function loadMovie(loadIndex:int):void {
                   var loader:Loader = new Loader;
                   loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                   loader.load(new URLRequest(swfs[loadIndex]));
              protected function onLoadComplete(e:Event):void {
                   var mc:MovieClip = LoaderInfo(e.currentTarget).content as MovieClip;
                   mc.stop();
                   var position:Object = positions[loadIndex];
                   mc.x = positions.x;
                   mc.y = positions.y;
                   addChild(mc);
                   movies[movies.length] = mc;
                   loadIndex++;
                   if (loadIndex<swfs.length) {
                        loadMovie(loadInxed);
                   } else {
                        playMovie(playIndex);
              protected function playMovie(playIndex):void{
                   if (currentMovie) {
                        currentMovie.stop();
                   currentMovie = movies[playIndex];
                   currentMovie.play();
    Note that with this approach you don't need to create a whole new set of logic each time you want to add a new swf to load.

  • VB-Java bridge strange  problem

    Hi,
    We are using JCom for our application. Our server is a weblogic 6.1 app server
    hosting EJB's and our client is a Visual Basic(VB) trying to access these EJB's.
    I am using "zero client installation" programming model.
    I am getting a strange problem. When I run my jcom bridge from the startup classes
    of Weblogic(using Runtime.exec()) the bridge is not accepting requests from VB.
    But if I run the same bridge from a command line DOS prompt, the bridge accepts
    the request from VB. I have ensured that in both cases the classpath/path variables
    are properly set.
    WOULD REALLY APPRECIATE, if someone can give inputs on this strange issue.(I am
    running my VB client on Win 2k platform and also my weblogic server runs on the
    same m/c).
    reg
    nilesh

    Hi,
    Am also facing java.lang.OutOfMemoryError: Java heap space. My JSF page retrieves more than 5000 records, the list is iterated and existed the controller(or action) , but throws this exception while displaying the JSF page. I have tried to increase the ram size, but no solution... Can any bosy please help me on this, would really appreciate.
    Thanks,
    Shan

  • Strange Problem with P67A-GD65

    Hi just got this board along with a 2500k and 8gb corsair xms3. Im getting a strange problem with the board as it when its supposed to be rebooting it just shuts down.
    Ive flashed it to the latest 1.6 bios before anything just to be safe which went ok, it boots and i select boot from dvd, i get to the part where windows 7 install wants to reboots and it just shuts down, then when i power up it starts win7 install and says there was an error and i must restart installation
    Any ideas?
    Ive tried clearing the cmos, removed power leads and cmos battery for a good while, even reflashed the bios to no avail so far

    Quote
    By the way, 1.7 bios is not available for download on european site, only us.
      I just saw it at the Global MSI site.

  • Strange problem in AJAX

    Hi,
    This is first time I am using AJAX and I am getting a strange problem.
    I have one text field and one select list.
    when a enter a value in text field I want to populate select list using on demand application process.
    Here is the code I put in java script for the page.
    <script language="JavaScript" type="text/javascript">
    function getChainList (custText, chainSelect){
    var chainSelectObj = document.getElementById(chainSelect);
    //alert(chainSelectObj.name);
    var ajaxRequest = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getChain',0);
    //alert(custText.value);
    ajaxRequest.add('P4_customer_num',custText.value);
    ajaxResult = ajaxRequest.get();
    //alert(ajaxResult);
    if(ajaxResult)
    chainSelectObj.options.length = 0;
              var chainArray = ajaxResult.split("chainsep");
    //alert(chainArray);
              for(var i=0; i < chainArray.length; i++)
                   {var colArray = chainArray[i].split("colsep");
    //alert(colArray);
              chainSelectObj.options[i] = new Option(colArray[1],colArray[0]);
    else {
    chainSelectObj.options.length = 0;
    //alert ( "it is not going in loop");
    ajaxRequest = null;
    </script>
    For the text field I put the following in HTML form element attributes:
    onBlur="javascript:{getChainList(this,'P4_CHAIN_GROUP');}"
    here is code for Pl/SQL on demand application process getChain
    Declare
    lv_Chain_List varchar2(32000) := '';
    cursor C1 is select chain_group,chain_group_name from chain_info where chain_number =
    ( select chain_number from customer_info where customer_number = :P4_CUSTMER_NUM);
    begin
    begin
    for i in C1
    loop
    lv_Chain_List := lv_Chain_List || 'chnsep' || i.chain_group || 'colsep' ||i.Chain_group_name;
    end loop;
    lv_Chain_List := substr(lv_Chain_list, 7,length(lv_Chain_List));
    exception when no_data_found then null;
    end;
    htp.prn(lv_Chain_List);
    -- dbms_output.put_line(lv_Chain_List);
    End;
    when i execute this PL/SQL code at SQL> prompt I am getting the result( after changing actual value with :P4_customer_num)
    When I am running application with alerts in java script the alrts are providing correct select object id and text field values. However I am getting a huge HTML page as result from the request instead of what I am directly getting from SQL ( chain name)
    I do not understand the problem
    Any help please?
    Thanks in advance,
    Badari.

    Hello,
    In the HTML page source you get there should be an error message, just take a look at the source.
    And I bet it says something like
    No Page or Application Item 'P4_customer_num'
    try
    ajaxRequest.add('P4_CUSTOMER_NUM',custText.value);
    where the item name is in all uppercase.
    Also you might want to take a look at this
    http://apex.oracle.com/pls/otn/f?p=11933:37
    It's already doing what you seem to want to do.
    Carl

  • A problem with binding a visual control to a class property defined with a getter&setter pair

    hi,
    I am having the following problem (simplified here for
    clarity):
    I am using a class for data model with a property named
    x (using a getter & setter) as follows:
    quote:
    [Bindable]
    public class MyData
    private var _x :String;
    public function MyData()
    _x = "default value";
    public function set x(value:String):void {
    trace("setting x with: '" + value + "'");
    _x = String(value);
    public function get x():String {
    trace("getting x: '"+_x+"'");
    return _x;
    I then linked (binded) the
    x property to a TextInput, as follows:
    quote:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    [Bindable]
    private var _data:MyData = new MyData();
    ]]>
    </mx:Script>
    <mx:TextInput id="inputX"
    text="{_data.x}" />
    </mx:Application>
    When loaded,
    inputX is set with the "default value". However, when
    changing the value of
    inputX the value of
    _data.x remains unchanged (in this sample - there are no
    trace messages from the setter).
    I have tried numerous variations using <mx:Bindind
    ...>, mx.bindinding.utils.BindingUtils, changing order of setter
    and getter, and more.
    The only solution i could find for now is to add a change
    event handler to the
    inputX control as follows:
    quote:
    <mx:TextInput id="inputX" text="{_data.x}"
    change="_data.x=inputX.text"/>
    Is there something i did wrong? or is it ... simply ... a bug
    thanx,

    hi,
    thanx for your quick reply.
    The actual problem was the that _data.x initialization should
    not be done in the MyData constructor, but after the object is
    fully created, as follows:
    [Bindable]
    private var _data:MyData = new MyData();
    // called in the application's initialize event
    public function init():void {
    _data.x = "default value";
    After this, adding the <mx:Binding> does the trick for
    the inputX.text --> _data.x binding, and there's no need to add
    "this". I simply have assumed (being a novice flex developer) that
    using <mx:TextInput id="inputX" text="{_data.x}" /> binds for
    both directions inputX.text <--> _data.x.
    thanx again,
    yaron

  • So out of nowhere my computer gets all these strange problems... Headache

    Recently, after having my computer problem-free for quite some time now since the day I bought it, I'm starting to have problems with my Mac. Out of nowhere really, I'm getting several seemingly random problems I'll just go ahead and list:
    - iTunes won't open.. says "an unknown error occurred (13014)"
    - The Spotlight search function in the top-right corner is gone
    - Can't change my desktop background
    - Can't drag & drop icons on desktop or toolbar
    Among other problems...
    Even more, when I entered my OS X Installation disc it wouldn't allow me to reinstall it. Then when I go to eject the CD, it won't allow it to come out. Very strange indeed... Like I said before, my Mac was problem-free until now. I had none of these strange problems until just the other day.
    Any help would be greatly appreciated. Thanks guys.

    If you are under warranty, make a Genius Bar appointment and take it in.
    You should also try running Repair Permissions from Applications/ Utilities/ Disk Utility.
    If you really cannot get your install disc to load, try starting in single-user mode and running the fsck command:
    http://support.apple.com/kb/TS1417
    Good luck!

  • Have downloaded 5s iPhone. Instructions for activating iCloud gives wrong email address to verify account. How can I get around this problem and get my phone set up with iCloud

    Have downloaded 5s iPhone. Instructions for activating iCloud gives wrong email address to verify account. How can I get around this problem and get my phone set up with iCloud

    elhoseny wrote:
    ... Instructions for activating iCloud gives wrong email address to verify account..
    The Apple ID and Password that was Originally used to Activate the iDevice is required
    If you do not have that information you will not be able to use the Device.
    Activation Lock in iOS 7  >  http://support.apple.com/kb/HT5818

  • Strange problem. I have upgraded to OSX 10.9.1 but cant get wifi to work so forced to be hard wired. Any inputs appreciated.

    Hi All,
    Strange problem. I have upgraded to OSX 10.9.1 but cant get wifi to work so forced to be hard wired. Any inputs appreciated. Problem is I cant even reinstall it as I saw on a thread reason, it needs wifi to begin.

    It only needs an internet connection - wired or wireless.
    Fixing a Mavericks Installation Problem
    How to manage a failed OS X Mavericks installation | MacFixIt - CNET Reviews.
    Try these in order:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the computer and
         after the chime press and hold down the OPTION key until the boot manager screen appears.
         Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
    4. Reinstall Lion/Mountain Lion, Mavericks: Reboot from the Recovery HD. Select Reinstall Lion/Mountain Lion, Mavericks from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Hi,using the COM interface how do you get/set

    Hi, using the COM Interface how do you get/set the Keep iTunes Music Folder Organised options, I cant seem to find it in the help. Secondly if I have the location of a file and the Track DatabaseId, is there any way to get get the IITrack object that relates to the location. As far as I can see the Search method only allows searching on artist/abum,title,composer , and GetITObjectByID() reuires both the track database id and the track in playlist id ,and I only have the first.
    Thanks for any help Paul

    Yes, I brute force my way through it. I analyzed the file before and after a preference change to find the data changed. FYI, the "data" portion of the iTunesPrefs.xml file appears to be Base64-encoded. Strings are UTF8.
    If you want more support from apple, you would probably need to buy an higher-level ADC account.
    You can also try submitting an enhancement request through http://bugreport.apple.com (requires at least a free ADC Online account)

  • I have very strange problem with Iphone 3gs. Whenever it gets little hot or exposed to 30 degree temperature it losses signals (No service). Whenever it is cooled down the service is back. Please help!

    I have very strange problem with iphone 3gs. Whenever it gets little hot or exposed to 30 degree or above temperature it losses signals (No service). Whenever it is cooled down the service is back. Whenever I am using Skype or playing game for a while it losses carrier signals and wifi. When it is cooled down afer shutting down the carrier signals and wifi are back. It is for sure problem is with heating, but 30 degree tempeature in Oman is normal and some time it goes upto 50 degrees. I have noticed this has started after I started using substandard charger as I lost my original charger of the phone. Please help!! Thanx.

    The specifications define an operating range up to 35 degrees.

  • I put the wrong birthdate in when I originally set up my icloud account. How can I get past this problem?

    I Originally put in a wrong number in my birthdate when creating my new account. How can I get past this problem to fix this?

    Go to My Apple ID to manage your iCloud ID, sign in and select the Passwords and Security section, answer the two security questions to the right, then enter the correct birthdate on the bottom right.

  • Computer slower and a few other strange problems since upgrading to SL

    Hi all,
    About a month ago, I upgraded my mid-2009 MBP to SL. I'm now on 10.6.1. Ever since the upgrade, my computer's been somewhat slower than it was when I ran Leopard (although many people I know say their machines are faster). I did restart several times at one point, and that seemed to speed it up, although it still experiences delays I didn't have before. I've also had a bunch of strange issues:
    1) Safari is most noticeably slow, especially when using something like Top Sites on Safari 4. I alleviated this problem somewhat by setting new tabs to open a blank window rather than Top Sites, but even so, Safari is generally slower, gives me 'pinwheels' often, and also is less stable.
    2) The other day, I restarted to find that all fonts except system fonts had been mysteriously deactivated. As a designer, I rely heavily on my many fonts, which I manage using Linotype FontExplorer.
    3) Today, I opened my computer up after having it sleeping in a backpack, and it had turned off. It was not out of battery; it had just turned off for no apparent reason.
    4) Judging by Activity Monitor, RAM is being used somewhat more heavily by the system, contrary to the advertisements of a 'lighter' footprint for SL as compared to Leopard. However, according to Activity Monitor (which I check frequently), the processor does not appear to be getting taxed any more heavily than under Leopard, which makes the sluggishness more inexplicable.
    5) Yesterday, I could not get my computer to recognize my Time Machine backup disc. After restarting, it worked, but this is a pain.
    I appreciate any advice I can get. Does anyone else have similar problems or solutions? Or is the general consensus that these are SL bugs that Apple will work out by about 10.6.4 or so?
    Thanks,
    Nathan
    Message was edited by: nateeanes

    I began this thread awhile ago, but the essence of it is that I had a number of strange problems, although mostly my computer was just slower, when upgrading from Leo to SL.
    I've now wiped my HD and re-installed SL. It seems faster, although there are still a few issues:
    1) iWork (Pages, Numbers) has very weird coloring. All the text looks light blue and/or cyan, and I can't fix it.
    2) Although initially Safari worked great, lately it's been going back to its habits of being slow and showing strange things like chopping up the 'Top Sites' view, i.e. rendering it in an off way.
    3) Adobe CS3 will not install properly. I get them loaded up, but when I try to launch a program, I get an error that says "licensing for this product has stopped working". I cannot get to the 'activate' page, even though I uninstalled and deactivated CS3.
    In the interest of full disclosure, I did restore my home account after clean installing SL-- maybe I should have brought the files over folder by folder rather than bringing back my whole home folder with its settings? I wonder if I accidentally brought over Adobe's FLEXnet folder too.
    Also, does anyone know if Adobe CS3 can cause these problems with Safari and other programs? It just seems that the whole machine was slower after installing CS3, even though I wasn't running the programs.
    Any help is appreciated.
    Nate

  • Very Very Strange Problem

    I'm pretty good at action script, but this one is killing me,
    it's a stupid problem to have.
    I'm just gonna paste all my code, hope that's okay..
    Sometimes the variable "CurrentImages" gets set using this
    "CurrentImage = CurrentImage-(-1);" other times it gets set using
    this "CurrentImage = CurrentImage-1;" And very few times, it gets
    set using this "CurrentImage = this._name.toString().substring(4);"
    When the last method is used to set the CurrentImage
    variable, something strange happens to the if statement
    "if (CurrentImage<Data.n) {" it says it's false for
    numbers 5 to 9, and true of any other number that are less than
    Data.n.
    At this time, Data.n is 46, and 7 should be less than 46, it
    should be true, but it gives false... and I don't know why.
    If anyone could help me solve this, I will be very grateful

    In your last method of calculating CurrentImage, CurrentImage
    becomes a String and not a number. And so, it does the comparison
    in an alphabetic manner, ie see which first digit is less, if same,
    next digit, etc. So, "46" would be less than "7" because 4<7. To
    remedy, use the Number conversion function:
    CurrentImage = Number(this._name.toString().substring(4));
    It gives the numerical value of the given expression.

Maybe you are looking for