Jump to content

Photo

forecast module - bad dates


  • Please log in to reply
52 replies to this topic

#21 rosgood

rosgood

    Member

  • Members
  • 2 posts

Posted 27 April 2016 - 11:48 AM

Yes, appreciate the hard work. A working weather module is a great result





A big thank you to everyone who contributes to Bodhi Linux


#22 aka jazz

aka jazz

    Member

  • Banned
  • 611 posts

Posted 28 April 2016 - 05:00 AM

I share Randy's sentiments, and something to show our appreciation


Screenshots of e17 at the Gallerie des shedied and here for just one only. Incidentally,why don't you try our friendly IRC channel for some help? (link up top) or watch an e-ducational clip that's 2 and a half minutes long

#23 jakfish

jakfish

    Member

  • Members
  • 51 posts

Posted 28 April 2016 - 12:38 PM

Yes, please let me join in with the thank-yous. I kept thinking it was something wrong on my side and then I found this wondrous thread.

 

I'm running Jeff's custom 2.4 (e17) on an Acer C720 and 2.4 (e17) on an EEE 900.  With Midori, when I go to www.bodhilinux.com/a/weather-forecasts/ , I get "could not find package 'forecasts-moksha'"

 

sudo apt-get install forecasts says I already have newest version

sudo apt-get install forecasts-moksha says no package to be found.

 

I downloaded the zip, cd-ed to the forecasts directory, but my ./autogen.sh gives "./autogen.sh: 8 ./autogen: autopoint : not found"

 

Any handle to jiggle?

 

And many thanks again for fixing this,

Jake



#24 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 28 April 2016 - 12:55 PM

Yesterday I created both deb packages for Moksha called forecasts-moksha and amd64 deb package called just forecasts for Bodhi Linux 2.4. I need to create i386 version for 2.4 yet (maybe today). So, in the near future they will appear on both repositories after some testing with Ylee...

 

Aka Jazz: a beer would go down the treat. What a pity it is all Ylee's :)



#25 ylee

ylee

    King of the Software Page

  • Moderators
  • 1491 posts
  • LocationSouth Carolina, USA

Posted 28 April 2016 - 02:42 PM

...
 
I downloaded the zip, cd-ed to the forecasts directory, but my ./autogen.sh gives "./autogen.sh: 8 ./autogen: autopoint : not found"
 
Any handle to jiggle?
 
And many thanks again for fixing this,
Jake

 
 
I don't recommend compiling the software yourself unless you are used to doing things like  that and know how to deal with it. But for any that want to and users of other distros who have no other choice you need to install the dependencies first. For ubuntu distros you can consult see jeffs Bodhibuild scripts, particularly installdeps.sh.   For non ubuntu based distros you need to install or compile whatever your distros calls those packages. For simply this module all that may be unnecessary but install all that and you will be able to compile most if not all enlightenment software.

 

But anyway my advice is to wait on the debs to be added to the repos ;)


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#26 jakfish

jakfish

    Member

  • Members
  • 51 posts

Posted 28 April 2016 - 03:33 PM

Thank you for such a quick response. I'll take your advice and simply monitor this thread for the deb arrivals.

 

Best,

Jake



#27 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 28 April 2016 - 07:16 PM

OK

All polishing and packaging work done. Looks good here. Waiting for Ylee's testing...

Stefan

#28 aka jazz

aka jazz

    Member

  • Banned
  • 611 posts

Posted 28 April 2016 - 11:24 PM

@Stefan

 

If you look at the "gif" or "jpg" of appreciation more closely, the separate can was going to be shipped to you, but it's in 2d only :)

Now anybody and everybody can make use of the "new and improved" weather module*, but I should remind everyone that it is used to observe (or forecast) the weather, not control it-- that was not the module's goal, by the way

 

- - - - - - - - - - - -

* thanks to you


Screenshots of e17 at the Gallerie des shedied and here for just one only. Incidentally,why don't you try our friendly IRC channel for some help? (link up top) or watch an e-ducational clip that's 2 and a half minutes long

#29 birdmun

birdmun

    Member

  • Members
  • 254 posts
  • LocationWabash, IN

Posted 30 April 2016 - 01:06 AM

Since the module is installed on this system and it is running the newest version, I am still trying to figure out how to get it to display data. I have gone to the zourbuth site, entered my zip, received a woeid, entered it and still am getting no data even after refreshing moksha, and finally logging out. Help?



#30 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 30 April 2016 - 05:26 AM

Unload module. Maybe removing all ./e/e/config/bodhi/*forecast* files could be a good idea. Then load module and add gadget on the desktop. Restart Moksha for sure.

 

Let me know if this method works for you...



#31 birdmun

birdmun

    Member

  • Members
  • 254 posts
  • LocationWabash, IN

Posted 30 April 2016 - 08:01 AM

Thanks. I removed the gadget, unloaded, removed the files, and then replaced the gadget/module and it worked.

 

 Odd point. wabash, indiana and 46992 give me two different woeids. I wonder how larger cities(those with multiple zipcodes) fare with that.

 

For reference, my config was .e/e/config/Laptop/ Is that a hold over from 3.1 which was the original install?



#32 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 30 April 2016 - 08:43 PM

As I had some time today, I added a new simple feature to the forecast module. Now you have two possibilities how to select your area. Default is by code, and secondly by city name. I consider it handy as you don't need to look up the WOEID code.

 

http://i.imgur.com/mCbzAvc.png



#33 birdmun

birdmun

    Member

  • Members
  • 254 posts
  • LocationWabash, IN

Posted 30 April 2016 - 09:06 PM

Thanks for all the work you do.



#34 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 08 May 2016 - 12:39 PM

OK, my last commit to forecast module. 

Not a big deal, just a cosmetic change and one perhaps handy feature:

 

- Checkbox component changed to radio buttons for better logic (no need to explain what is set if ...). You can select WOEID code or if you like a city name.

- URL to obtain WOEID code could be not easy to remember, so I decided to put it into entry component. Now you can easily copy it to the clipboard and then to any browser.

 

My big thanx goes to Ylee with help to entry read-only issue. (Unfortunately E is very badly documented)

 

Enjoy :)

 

PS: All packages in BL 3.x and 2.4 repos are ready for upgrade.

 

http://i.imgur.com/5WSQqta.png 



#35 ylee

ylee

    King of the Software Page

  • Moderators
  • 1491 posts
  • LocationSouth Carolina, USA

Posted 08 May 2016 - 04:56 PM

Looking good Stefan :D 

 

Just a quick update I have been looking at the two remaining issues with the forecast module:

 

  • The gadget leaves images on the screen when unloaded and
  • Unloading the module sometimes restarts Moksha/enlightenment

I made some progress towards understanding these issues and have shared my results with The Waiter (Stefan). Hopefully between the two of us we will get these issues fixed sometime in the next few weeks or even days. Unfortunately I have some Real World stuff to deal with so aside from the debugging and info I have forwarded to Stefan the rest of the work I am leaving to him. If he runs into difficulty  with this then I will continue when I have available time. 


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#36 The waiter

The waiter

    Module Master

  • Developer
  • 1461 posts
  • LocationBanska Bystrica, Slovakia

Posted 08 May 2016 - 08:29 PM

Hmm, some progress here.

 

Gadget leaving images has nothing to do with edc file. But your catch in git.enlightenment.org was good. This block of code solves artefacts issue completely:

_forecasts_free(Forecasts *w)
{
   char name[60];
   int i;
 
   for (i = 0; i < 2; i++)
     {
        Evas_Object *swallow;
 
        snprintf(name, sizeof(name), "e.swallow.day%d.icon", i);
        swallow = edje_object_part_swallow_get(w->forecasts_obj, name);
        if (swallow)
          evas_object_del(swallow);
     }
   evas_object_del(w->forecasts_obj);
   evas_object_del(w->icon_obj);
   free(w);
   w = NULL;
}

 

I tried playing with for cycle and value 2 is OK because there are just 2 images of today and tomorow o the screen. 

But problem with restart Moksha persists. Need more time for deep analyzing.



#37 ylee

ylee

    King of the Software Page

  • Moderators
  • 1491 posts
  • LocationSouth Carolina, USA

Posted 19 May 2016 - 10:25 AM

...

 

I tried playing with for cycle and value 2 is OK because there are just 2 images of today and tomorow o the screen. 

But problem with restart Moksha persists. Need more time for deep analyzing.

 

Just a note that the problem of Moksha restarting when the module is unloaded in certain situations is rather difficult for us to debug. It has also lead to find a few more forecast issues :( I am working on it but I don't have the time I need to focus on it. So progress is slow. We do know the statement in the code that causes the segfault so that is some progress. Behavior is a bit different in e17 vs e19 vs e20. Regardless the module is buggy in all. That is all for now.


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#38 Kev

Kev

    An Aged Technophile

  • Members
  • 323 posts
  • LocationMichigan USA

Posted 19 May 2016 - 10:49 AM

Hmm, some progress here.

 

Gadget leaving images has nothing to do with edc file. But your catch in git.enlightenment.org was good. This block of code solves artefacts issue completely:

_forecasts_free(Forecasts *w)
{
   char name[60];
   int i;
 
   for (i = 0; i < 2; i++)
     {
        Evas_Object *swallow;
 
        snprintf(name, sizeof(name), "e.swallow.day%d.icon", i);
        swallow = edje_object_part_swallow_get(w->forecasts_obj, name);
        if (swallow)
          evas_object_del(swallow);
     }
   evas_object_del(w->forecasts_obj);
   evas_object_del(w->icon_obj);
   free(w);
   w = NULL;
}

 

I tried playing with for cycle and value 2 is OK because there are just 2 images of today and tomorow o the screen. 

But problem with restart Moksha persists. Need more time for deep analyzing.

 

I am curious about the evas_object *swallow.... you have a line of code that attempts to get swallow and then later you do a Boolean test to see if swallow is valid?  If swallow is null wouldn't that throw an error exception?  Granted I don't really know what Evas_Object really returns but if you cant get a valid return this could also cause a seg fault I think.... please feel free to correct me if I am wrong...

 

Also is there a way to test if w->forecasts_obj contains the name before getting to that part of the code?


- Kevin

#39 ylee

ylee

    King of the Software Page

  • Moderators
  • 1491 posts
  • LocationSouth Carolina, USA

Posted 19 May 2016 - 09:20 PM

I am curious about the evas_object *swallow.... you have a line of code that attempts to get swallow and then later you do a Boolean test to see if swallow is valid?  If swallow is null wouldn't that throw an error exception?  Granted I don't really know what Evas_Object really returns but if you cant get a valid return this could also cause a seg fault I think.... please feel free to correct me if I am wrong...
 
Also is there a way to test if w->forecasts_obj contains the name before getting to that part of the code?

 
The block of code posted by The waiter fixes an issue it is not an issue.

 

I pointed that out to him and it fixes a memory leak already fixed in enlightenments git by discomfitor  in 2014. If swallow is null the modules associated edc file has not defined the attribute and besides it is good practice to test pointers to see if they are null in C. Even if you are sure they are not ever Null. It is a practice every C programmer should get in the habit of doing. C for good or bad is not Python or C++ or any other "Modern Language" and doesn't really throw error exceptions unless you code it.

 

As to what evas_object_del would do if passed a null pointer I am not sure probably crash and burn. I really don't feel like looking thru EFL for that function definition. Can I test, print or log  the value of w->forecast_obj of course I can. But that code block has nothing to do with the segfault issue.

 

Without going into all the technical issues I am about 95% sure the segfault problem has to do with how the module implements it's settings. 


"No technology can ever be too arcane or complicated for the black t-shirt crowd."


#40 Kev

Kev

    An Aged Technophile

  • Members
  • 323 posts
  • LocationMichigan USA

Posted 20 May 2016 - 10:44 AM

Yeah I agree on the testing for NULL its part of my normal programming practice, its just looks funny seeing it treated like a bool expression.  Since almost all my coding is C# these years I almost always wrap my logic in try/catches.  So I get what the method is trying to do.... was just curious about how it was implemented.  one of these days I will spend some time on the API set. 

 

As I mentioned as I was just curious... thanks for the feedback :)


- Kevin




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users