Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE17317C07 for ; Mon, 27 Apr 2015 17:37:17 +0000 (UTC) Received: (qmail 18500 invoked by uid 500); 27 Apr 2015 17:37:14 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 18470 invoked by uid 500); 27 Apr 2015 17:37:14 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 18457 invoked by uid 99); 27 Apr 2015 17:37:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 17:37:14 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.191.145.13 which is an MX secondary for users@flex.apache.org) Received: from [54.191.145.13] (HELO mx1-us-west.apache.org) (54.191.145.13) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Apr 2015 17:37:07 +0000 Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 5F1402735F for ; Mon, 27 Apr 2015 17:36:47 +0000 (UTC) Received: by wgin8 with SMTP id n8so123961892wgi.0 for ; Mon, 27 Apr 2015 10:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kBRVNfN9rDc0LID5ty1mQH2uamWlHT7tFw8wVBlPweA=; b=qgsCBljKKwh4THDMwZXQfnKWK+ipvBLdsOEaAQW3wkxwkLUNLFdVvZld/UDEZR0pKu 3zRkrbn+qx1FzmOWHxW/U0/rL9viJ/6sv/Qe/FmrezQEcNnL/zczESqOEu7IRhcakx9A tRNE8Xx+ivSDgnBpc0eVb33PpL/hZ1TaFQvaM4/hP8M/9Jn6YdgjL4Xly/OSbfDN9z2g vNcRQms412iZSCKsS705eOsQKYBwLSaaCUf1NIKHY3AdCDUYI8WaQLEAueLUR7tSA+CV mr+IdlorTn8RYPkZ8pIncOsjRyCwGxz8et5/jZ80E5ytD4K/7Hfvmo9D5m76wl1bEJjP Iimg== MIME-Version: 1.0 X-Received: by 10.194.133.102 with SMTP id pb6mr24092298wjb.97.1430156206146; Mon, 27 Apr 2015 10:36:46 -0700 (PDT) Received: by 10.28.135.78 with HTTP; Mon, 27 Apr 2015 10:36:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 27 Apr 2015 12:36:46 -0500 Message-ID: Subject: Re: Data type changes at compile time??? From: mark goldin To: users Content-Type: multipart/alternative; boundary=089e012292eea4081b0514b830b4 X-Virus-Checked: Checked by ClamAV on apache.org --089e012292eea4081b0514b830b4 Content-Type: text/plain; charset=UTF-8 Ah, I see. That explains, thanks. On Mon, Apr 27, 2015 at 12:29 PM, OmPrakash Muppirala wrote: > Data type technically does not change because all instances are of type > Object by default. If the class definition is available and the server > side object has class metadata included, it will be automatically cast to > the correct type by the Flash player. > On Apr 27, 2015 10:18 AM, "mark goldin" wrote: > > > But why data type changes before second statement gets hit? > > > > On Mon, Apr 27, 2015 at 12:15 PM, OmPrakash Muppirala < > > bigosmallm@gmail.com> > > wrote: > > > > > In the second case, the definition of the class someVO will be included > > in > > > the compiled swf, because it appears in the code. > > > > > > In the first case, the compiler has no knowledge that someVO would be > > > used. > > > > > > Just declaring a dummy object of type someVO at the top of the class > > would > > > ensure that the compiler includes that class definition in the swf. > > > > > > Thanks, > > > Om > > > On Apr 27, 2015 9:55 AM, "mark goldin" wrote: > > > > > > > I have the following code: > > > > public function result(data:Object):void > > > > { > > > > // Check data.result > > > > trace(data.result[0]); I see data type Object > > > > // but if I add this code: > > > > trace(data.result[0] as someVO); then at the first trace I see > > data > > > > type as of someVO > > > > } > > > > > > > > How can run time know that I am about to cast data? > > > > > > > > Thanks > > > > > > > > > > --089e012292eea4081b0514b830b4--