Re: [Gnoga-list] update images ?

2015-07-04 Thread Rabbi David Botton
You have to use an html trick. When specificity the image name each time
add ?SomeValue. You can use a time stamp to make easy. The server will
discard the ? and the rest of the URL but the browser will force a reload
since it assume the image is dynamic now based in the query sent with image
name.

David Botton
On Sat, Jul 4, 2015 at 6:16 PM Björn Lundin  wrote:

> On 2015-07-04 19:34, Björn Lundin wrote:
> > Hi!
> >
> > I have a gnoga app that contains 2 images.
> > They display nicely with
> >
> > View.Image_Holder.Create (View);
> > View.Matched_Image.Create(View.Image_Holder,
> >   "https://path/matched.png";);
> > View.Lapsed_Image.Create(View.Image_Holder,
> >   "https://path/settled_vs_lapsed.png";);
> >
> > where
> >
> > Image_Holder  : Gnoga.Gui.Element.Common.DIV_Type;
> > Lapsed_Image  : Gnoga.Gui.Element.Common.IMG_Type;
> > Matched_Image : Gnoga.Gui.Element.Common.IMG_Type;
> >
> > However, the server holding the images are
> > creating new images every 10 minutes in a cron job.
> > The images are diagrams, created with gnuplot,
> > and published via https
> >
> > So, how can I make gnoga reload the images ?
> >
> >
> >
>
>
> View.Matched_Image.Remove;
> View.Matched_Image.Create(View.Image_Holder,
>   "https://path/matched.png";);
>
> View.Lapsed_Image.Remove ;View.Lapsed_Image.Create(View.Image_Holder,
>   "https://path/settled_vs_lapsed.png";);
>
>
> gives a
>
> 2015-07-05 00:07:44.357 GNOGA.GUI.BASE.OBJECT_ALREADY_CREATED
> 2015-07-05 00:07:44.383 Message : gnoga-gui-base.adb:316
>
> marking the img as dynamic still produces the above exception
>
> --
> --
> Björn
>
>
> --
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] updating html-tables without flickering ?

2015-07-04 Thread Rabbi David Botton
Double buffer. Create a second table that is hidden. Fill it in. Hide first
and show second. Can either delete the old one or recycle it.

David Botton
On Sat, Jul 4, 2015 at 12:20 PM Björn Lundin  wrote:

> Hi!
> I got a page that is driven by a task that
> updates 3 tables.
>
> The tables are first set to "" with
>
>View.Daily_Table.Inner_HTML ("");
>
>
> then a header row is created
>   View.Daily_Table.Add_Caption("Last week's result @ " &
> Calendar2.Clock.To_String(Milliseconds => False));
>   View.Daily_Table.Border;
>
>   declare
> Row  : Table_Row_Access := new Table_Row_Type;
> Col1 : Table_Heading_Access := new Table_Heading_Type;
> Col2 : Table_Heading_Access := new Table_Heading_Type;
> Col3 : Table_Heading_Access := new Table_Heading_Type;
>   begin
> Row.Dynamic;
> Col1.Dynamic;
> Col2.Dynamic;
> Col3.Dynamic;
> Row.Create (View.Daily_Table);
> Col1.Create (Row.all, "Betname");
> Col2.Create (Row.all, "Sum(Profit)");
> Col3.Create (Row.all, "Date");
>   end;
>
> and then the rows are added
>
>   Select_Daily_Profit.Open_Cursor;
>   loop
> Select_Daily_Profit.Fetch(Eos);
> exit when Eos;
> Select_Daily_Profit.Get("BETNAME", Betname);
> Select_Daily_Profit.Get("SUMPROFIT", Sumprofit);
> Select_Daily_Profit.Get_Date("DATE", Date);
> declare
>Row  : Table_Row_Access := new Table_Row_Type;
>Col1 : Table_Column_Access := new Table_Column_Type;
>Col2 : Table_Column_Access := new Table_Column_Type;
>Col3 : Table_Column_Access := new Table_Column_Type;
> begin
>Cnt := Cnt +1;
>Row.Dynamic;
>Col1.Dynamic;
>Col2.Dynamic;
>Col3.Dynamic;
>Row.Create (View.Daily_Table);
>if Cnt mod 2 = Integer_4(0) then
>  Row.Background_Color("skyblue");
>end if;
>Col1.Create (Row.all, Utils.Trim(Betname));
>Col2.Create (Row.all, Utils.F8_Image(Sumprofit));
>if Sumprofit < 0.0 then
>  Col2.Background_Color("red");
>else
>  Col2.Background_Color("palegreen");
>end if;
>Col3.Create (Row.all, Date.String_Date_ISO);
>Col2.Text_Alignment(Gnoga.Gui.Element.Right);
> end;
>   end loop;
>   Select_Daily_Profit.Close_Cursor;
>
>
> This pattern is repeated for 3 tables with different data.
> Now - it works.
> But you see the tables disappear and the reappear, somewhat slowly.
> And it's a bit annoying, since it is a monitoring screen.
>
> I'd like the update to be without flickering. Is there a better way of
> updating tables?
>
> --
> Björn
>
>
> --
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> ___
> Gnoga-list mailing list
> Gnoga-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


Re: [Gnoga-list] update images ?

2015-07-04 Thread Björn Lundin
On 2015-07-04 19:34, Björn Lundin wrote:
> Hi!
> 
> I have a gnoga app that contains 2 images.
> They display nicely with
> 
> View.Image_Holder.Create (View);
> View.Matched_Image.Create(View.Image_Holder,
>   "https://path/matched.png";);
> View.Lapsed_Image.Create(View.Image_Holder,
>   "https://path/settled_vs_lapsed.png";);
> 
> where
> 
> Image_Holder  : Gnoga.Gui.Element.Common.DIV_Type;
> Lapsed_Image  : Gnoga.Gui.Element.Common.IMG_Type;
> Matched_Image : Gnoga.Gui.Element.Common.IMG_Type;
> 
> However, the server holding the images are
> creating new images every 10 minutes in a cron job.
> The images are diagrams, created with gnuplot,
> and published via https
> 
> So, how can I make gnoga reload the images ?
> 
> 
> 


View.Matched_Image.Remove;
View.Matched_Image.Create(View.Image_Holder,
  "https://path/matched.png";);

View.Lapsed_Image.Remove ;View.Lapsed_Image.Create(View.Image_Holder,
  "https://path/settled_vs_lapsed.png";);


gives a

2015-07-05 00:07:44.357 GNOGA.GUI.BASE.OBJECT_ALREADY_CREATED
2015-07-05 00:07:44.383 Message : gnoga-gui-base.adb:316

marking the img as dynamic still produces the above exception

-- 
--
Björn

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] update images ?

2015-07-04 Thread Björn Lundin
Hi!

I have a gnoga app that contains 2 images.
They display nicely with

View.Image_Holder.Create (View);
View.Matched_Image.Create(View.Image_Holder,
  "https://path/matched.png";);
View.Lapsed_Image.Create(View.Image_Holder,
  "https://path/settled_vs_lapsed.png";);

where

Image_Holder  : Gnoga.Gui.Element.Common.DIV_Type;
Lapsed_Image  : Gnoga.Gui.Element.Common.IMG_Type;
Matched_Image : Gnoga.Gui.Element.Common.IMG_Type;

However, the server holding the images are
creating new images every 10 minutes in a cron job.
The images are diagrams, created with gnuplot,
and published via https

So, how can I make gnoga reload the images ?



-- 
--
Björn

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list


[Gnoga-list] updating html-tables without flickering ?

2015-07-04 Thread Björn Lundin
Hi!
I got a page that is driven by a task that
updates 3 tables.

The tables are first set to "" with

   View.Daily_Table.Inner_HTML ("");


then a header row is created
  View.Daily_Table.Add_Caption("Last week's result @ " &
Calendar2.Clock.To_String(Milliseconds => False));
  View.Daily_Table.Border;

  declare
Row  : Table_Row_Access := new Table_Row_Type;
Col1 : Table_Heading_Access := new Table_Heading_Type;
Col2 : Table_Heading_Access := new Table_Heading_Type;
Col3 : Table_Heading_Access := new Table_Heading_Type;
  begin
Row.Dynamic;
Col1.Dynamic;
Col2.Dynamic;
Col3.Dynamic;
Row.Create (View.Daily_Table);
Col1.Create (Row.all, "Betname");
Col2.Create (Row.all, "Sum(Profit)");
Col3.Create (Row.all, "Date");
  end;

and then the rows are added

  Select_Daily_Profit.Open_Cursor;
  loop
Select_Daily_Profit.Fetch(Eos);
exit when Eos;
Select_Daily_Profit.Get("BETNAME", Betname);
Select_Daily_Profit.Get("SUMPROFIT", Sumprofit);
Select_Daily_Profit.Get_Date("DATE", Date);
declare
   Row  : Table_Row_Access := new Table_Row_Type;
   Col1 : Table_Column_Access := new Table_Column_Type;
   Col2 : Table_Column_Access := new Table_Column_Type;
   Col3 : Table_Column_Access := new Table_Column_Type;
begin
   Cnt := Cnt +1;
   Row.Dynamic;
   Col1.Dynamic;
   Col2.Dynamic;
   Col3.Dynamic;
   Row.Create (View.Daily_Table);
   if Cnt mod 2 = Integer_4(0) then
 Row.Background_Color("skyblue");
   end if;
   Col1.Create (Row.all, Utils.Trim(Betname));
   Col2.Create (Row.all, Utils.F8_Image(Sumprofit));
   if Sumprofit < 0.0 then
 Col2.Background_Color("red");
   else
 Col2.Background_Color("palegreen");
   end if;
   Col3.Create (Row.all, Date.String_Date_ISO);
   Col2.Text_Alignment(Gnoga.Gui.Element.Right);
end;
  end loop;
  Select_Daily_Profit.Close_Cursor;


This pattern is repeated for 3 tables with different data.
Now - it works.
But you see the tables disappear and the reappear, somewhat slowly.
And it's a bit annoying, since it is a monitoring screen.

I'd like the update to be without flickering. Is there a better way of
updating tables?

--
Björn

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list