Results 1 to 4 of 4

Thread: Method-Invocation requires object to be named?

  1. #1
    Join Date
    Dec 2008
    Location
    Aurora, CO, USA
    Posts
    24

    Default Method-Invocation requires object to be named?

    I was experimenting with method-invocation in Spring ActionScript 0.6.1.

    In particular, I was creating an unnamed object as part of an array, and wanting to call a method in that object. In the below code, it's the category object.

    It failed with a error message "The object name must have text". I could not get it to invoke a method until I added an id to the object tag.

    Is this the correct behavior? I'm never going to directly refer to the category so why do I need to name it to invoke a method on it?

    Code:
    <?xml version="1.0"?>
    <objects
    	xmlns='http://www.pranaframework.org/objects'
    	xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    	xsi:schemaLocation='http://www.pranaframework.org/objects http://www.pranaframework.org/schema/objects/prana-objects-0.7.xsd'
    >
    	<object id='commitListener' class='utils.AlertCommitListener'/>
    	<object id='assessment' class='valueObjects.AssessmentImpl'>
    		<property name='title' value='Assessing a Team'/>
    		<property name='username' value='Demo User'/>
    		<property name='categories'>
    			<array>
    				<object class='valueObjects.CategoryImpl' id='category_3'>
    					<constructor-arg value='Approach to change'/>
    					<method-invocation name='addCommitListener'>
    						<arg>
    							<ref>commitListener</ref>
    						</arg>
    					</method-invocation>
    				</object>
    			</array>
    		</property>
    	</object>
    <objects>

  2. #2
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    160

    Default

    Hi,

    this must be a bug in the XMLObjectFactory. Please file it at the Jira. I will look into it later today.

    http://jira.springframework.org/brow...ACTIONSCRIPTAS

    regards,
    Christophe
    Christophe Herreman
    Spring ActionScript Founder
    http://www.herrodius.com

  3. #3
    Join Date
    Dec 2008
    Location
    Aurora, CO, USA
    Posts
    24

  4. #4
    Join Date
    Oct 2008
    Location
    Belgium
    Posts
    160

    Default

    Hi,

    this issue is fixed and committed in SVN.

    regards,
    Christophe
    Christophe Herreman
    Spring ActionScript Founder
    http://www.herrodius.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •