Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11094

Re: please help understanding syntax

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail
From Steven Simpson <ss@domain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: please help understanding syntax
Date Sat, 07 Jan 2012 22:55:55 +0000
Organization Aioe.org NNTP Server
Lines 36
Message-ID <s4vmt8-k5m.ln1@news.simpsonst.f2s.com> (permalink)
References <7e21b19b-356f-4a0b-ae08-687fc79e1afa@dp8g2000vbb.googlegroups.com>
NNTP-Posting-Host z5mVTYUYMEmb3DSn9kC+DQ.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
X-Notice Filtered by postfilter v. 0.8.2
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11094

Show key headers only | View raw


On 07/01/12 21:15, John Goche wrote:
> public void checkAccount(final Account account)
> {
>      Auth.background()
>      {
>          @Override
>          public void run()
>          {
>              Auth.checkAccount(account, this, new CustomCallback()
>              {
>                  @Override
>                  public void handle(int resultCode)
>                  {
>         // ...
>                  }
>              });
>          }
>      });
> }
>
> Can someone please explain the syntax Auth.background() { ... } .

It's a syntax error, surely?  Try sticking it in a syntax-aware editor 
with a 'class X { }' around it.  When I add the closing brace in emacs, 
I'm told "Mismatched parentheses".

Perhaps it's supposed to be 'new Auth.background()', though that's an 
unconventional name for a class.

Perhaps it's supposed to be 'new Auth.background(new Runnable() { ...'.

...

-- 
ss at comp dot lancs dot ac dot uk

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

please help understanding syntax John Goche <johngoche99@googlemail.com> - 2012-01-07 13:15 -0800
  Re: please help understanding syntax Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2012-01-07 13:58 -0800
  Re: please help understanding syntax Roedy Green <see_website@mindprod.com.invalid> - 2012-01-07 14:28 -0800
  Re: please help understanding syntax Steven Simpson <ss@domain.invalid> - 2012-01-07 22:55 +0000
    Re: please help understanding syntax Lew <noone@lewscanon.com> - 2012-01-07 20:58 -0800
    Re: please help understanding syntax Steven Simpson <ss@domain.invalid> - 2012-01-08 08:25 +0000
    Re: please help understanding syntax Roedy Green <see_website@mindprod.com.invalid> - 2012-01-16 02:05 -0800

csiph-web