Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 78458173E2 for ; Wed, 27 May 2015 16:20:56 +0000 (UTC) Received: (qmail 93749 invoked by uid 500); 27 May 2015 16:20:56 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 93717 invoked by uid 500); 27 May 2015 16:20:56 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 93699 invoked by uid 99); 27 May 2015 16:20:55 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 16:20:55 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4B4A01A3621 for ; Wed, 27 May 2015 16:20:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.179 X-Spam-Level: ** X-Spam-Status: No, score=2.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id kzFSUan-mCGO for ; Wed, 27 May 2015 16:20:54 +0000 (UTC) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 853B922F8A for ; Wed, 27 May 2015 16:20:53 +0000 (UTC) Received: by wicmc15 with SMTP id mc15so98991146wic.1 for ; Wed, 27 May 2015 09:20:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=/4D0by0/xKOthfw9cjC2XU2ADJK3faBHXEOFIxaTI98=; b=TQzK11q2jZQPPWHPdIYpUjs8ohaywKHE55/QUvKzBXFg0cD935oHuw+1gX2mkTEalz yQPeygpIZVVwirvFuRvtYJXv3I1OT4gSFxRrz1zIXQRQ9AkauO+1OlAFmyiFqBah7+7C ee148zGKs1nUXVzVZYQyH+aF+KKWi24+RJRE/b+lQxRbum7wT1kY/MJUkuKFx8AWRHKW VExFaSuoQ2+iToBN7zOtLPrhCF1Mm8KH1UCUPRiASDBUTIw1DzIwkIxbvIxcmut9BG7k 6IBn+2LiepLt5kG1K8Eq9rfKpV8NIAWxWNQWqfowJTgJ2Gj/A0hRV4y+zjnWmHOMlrip HKxA== X-Received: by 10.194.92.38 with SMTP id cj6mr24289185wjb.21.1432743607272; Wed, 27 May 2015 09:20:07 -0700 (PDT) Received: from [192.168.8.101] ([80.246.137.220]) by mx.google.com with ESMTPSA id q4sm27621278wja.24.2015.05.27.09.20.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 27 May 2015 09:20:06 -0700 (PDT) From: Harbs Content-Type: multipart/alternative; boundary="Apple-Mail=_D218CC3B-CFDE-45F1-81AB-36C53FAFE4FC" Message-Id: <0E0AD554-D682-40ED-AC1D-316337EA9ED5@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Squiggly Oddness Date: Wed, 27 May 2015 19:20:02 +0300 References: <66D26846-0B2F-45A0-A41F-3498C2E6CDB8@gmail.com> To: dev@flex.apache.org In-Reply-To: X-Mailer: Apple Mail (2.1878.6) --Apple-Mail=_D218CC3B-CFDE-45F1-81AB-36C53FAFE4FC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 FWIW, I solved my specific issue by using an index instead of a = reference to the controller, and I always resolve the controller using = flowComposer.getControllerAt(_flowIndex); As for the why: Squiggly replaces the standard ContainerController with a = SquigglyCustomContainerController (which extends ContainerController) = with a signature like this: public function = SquigglyCustomContainerController(container:Sprite,textHighlighter:IHighli= ghter, wordProcessor:IWordProcessor, engine:SpellingService, = func:Function, = compositionWidth:Number=3D100,compositionHeight:Number=3D100) I believe the primary reason is to support the context menu. I was thinking about this some more, and I=92m thinking that there = should be an ISpellingController and Squiggly should only replace the = controller if the existing controller is not a ISpellingController. That = would allow clients to add their own ISpellingControllers which would = not be replaced. If there=92s some way to inject the context menu and take care of the = other four components (IHighlighter, IWordProcessor, SpellingService and = the ignoreWordFunctionProcessor), that might be best. On May 27, 2015, at 5:54 PM, Alex Harui wrote: > I haven=92t looked at the code at all, but maybe it would be worth = trying to > figure out =93why=94 Squiggly replaces the controller. I would = imagine it is > to get certain events so it knows when to run its spell checker and/or > injecting the squiggly decoration. Having the controller dispatch the > right events and providing a hook to inject decorations might be a = better > approach so Squiggly doesn=92t have to be so invasive. >=20 > -Alex >=20 > On 5/27/15, 3:23 AM, "Harbs" wrote: >=20 >> One idea which could solve problem #1 would be to add a method >> IFlowComposer.replaceController() which would dispatch an event with = the >> old controller and the new one. >>=20 >> But, this doe not solve problem #2. There must be some way of solving >> this using composition=85 >>=20 >> On May 27, 2015, at 1:18 PM, Harbs wrote: >>=20 >>> When loading Squiggly, it modifies the controllers in the = FlowComposer >>> and swaps out the existing controllers with >>> SquigglyCustomContainerControllers. >>>=20 >>> This is problematic: >>> 1) There=92s no way to track ContainerControllers while using = Squiggly. >>> Any tracked ContainerControllers become unused. (I currently have = this >>> problem. I have some code which tracks threading across containers.) >>> 2) If someone subclasses ContainerController for some reason, their >>> code blows up. >>>=20 >>> Any suggestions on how to solve this problem? >>>=20 >>> Harbs >>=20 >=20 --Apple-Mail=_D218CC3B-CFDE-45F1-81AB-36C53FAFE4FC--