Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6208917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:53:20+00:00 2026-05-24T05:53:20+00:00

Sorry if I’m doing anything really dumb, but could anybody see anything immediately wrong

  • 0

Sorry if I’m doing anything really dumb, but could anybody see anything immediately wrong with the following?

var layout = new XML()

layout=
<layout color="red">
</layout>

function init()
{ 
post(layout.@color);
}

it returns what I assume to be a ram address rather than the value.

In the event that the software in question wants an object of type string, what is the best way to enforce that? I doubt thats the cas, but am willing to try

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:53:23+00:00Added an answer on May 24, 2026 at 5:53 am

    A string cast should work fine, e.g.:

    trace(String(layout.@color));
    

    Note that in your example there’s no need to assign a new XML object to layout, since you overwrite it with the next assignment one line later.

    This article is highly useful if you’re just getting started with E4X.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

sorry for lamer question, but I really could not found subject. I have a
Sorry if it was already asked before, but I really couldn't find a clear
Sorry for dumb question but I can't figure it out (beginner) I have a
Sorry the title is fuzzy, but I really coudln't come up with a fitting
Sorry for my ignorance here, but when I hear the word webserver, I immediately
Sorry if this sounds like a really stupid question, but I need to make
Sorry if this has been discussed before, but could nt find a suitable answer
Sorry for a long question and not a very descriptive title, but my problem
Sorry I'm really bad at regexes, I finally hacked osmething to work in ruby.
Sorry, I'm sure this is simple but I'm tired and can't figure it out.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.