From: David Botton <david@botton.com>
Subject: Re: The Gnoga project goals - Ada Advocay for Businesses
Date: Sat, 15 Nov 2014 21:42:24 -0800 (PST)
Date: 2014-11-15T21:42:24-08:00 [thread overview]
Message-ID: <eca0dd3d-ec26-4e6c-848e-8ba950f78b4e@googlegroups.com> (raw)
In-Reply-To: <b7531437-ee1d-4144-8dad-5935bbe99103@googlegroups.com>
Here is a simple and interesting example of how Gnoga is different than say writing web pages with say Ajax in AWS alone without Gnoga.
Gnoga is "live" not passive and stateless.
This is a task type that could be used any place in your code at all. Using Ada tasks, this will strobe the color of any HTML element on a page:
task type Color_Me_Task (O : Gnoga.Gui.Element.Pointer_To_Element_Class) is
entry start;
entry stop;
end Color_Me_Task;
-- Strobe color Element O
task body Color_Me_Task is
type Colors is (red, green, blue, orange, black);
Current_Color : Colors := Colors'First;
begin
accept start;
loop
begin
if O.Valid then
O.Color (Current_Color'Img);
if Current_Color = Colors'Last then
Current_Color := Colors'First;
else
Current_Color := Colors'Succ (Current_Color);
end if;
end if;
end;
select
accept stop;
exit;
or
delay 0.1;
end select;
end loop;
end Color_Me_Task;
prev parent reply other threads:[~2014-11-16 5:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 14:46 The Gnoga project goals - Ada Advocay for Businesses David Botton
2014-11-13 1:49 ` Hubert
2014-11-13 2:12 ` David Botton
2014-11-13 10:51 ` Gour
2014-11-13 14:43 ` David Botton
2014-11-16 5:28 ` David Botton
2014-11-16 8:30 ` Gour
2014-11-13 18:35 ` johannes falcone
2014-11-13 20:27 ` David Botton
2014-11-16 5:06 ` johannes falcone
2014-11-16 5:23 ` David Botton
2014-11-16 5:42 ` David Botton [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox