![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Open Source Projects The place to discuss Basic4ppc open source applications. |
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
|||
|
Current Version: 1.2.5
Description: Pocket Forecast is a weather application that supports mutliple locations, multiple languages, QVGA AND VGA display, cached AND user defined updates, customized theme, AND is open source written in Basic4PPC. Source code and CAB installer at: pocket_forecast [CampusBBS Wiki] Last update: 6/4/09 Last edited by digitaldon37 : 06-04-2009 at 06:29 PM. |
|
|||
|
I am getting an error while reading a file's attributes with the FilesEx library - but only when I run a compiled version. I don't get the error from within the IDE. Any ideas?
The GetYahooRSS code (with some msgbox's to display steps): Code:
If FileExist(AppPath & "\" & CurrentLocationCode & ".cache") = True Then
' Requires FilesEx library - agraham
Msgbox("creating reference to FilesEx library...")
filb.New1
Msgbox("getting file attributes via FilesEx library...")
fileInfo()=filb.FileInfo(AppPath & "\" & CurrentLocationCode & ".cache")
' Msgbox(filb.Dllversion)
Msgbox("splitting file into into array...")
arrDateTime()=StrSplit(fileInfo(2))
Msgbox("comparing file datestamp with current date...")
UPDATE: Never mind. I was using version 1.2 of the FilesEx library and the current one is 1.3 - the latest version fixes this. Last edited by digitaldon37 : 11-12-2008 at 07:05 PM. |
|
|||
|
With version .16 I have a usable weather application that supports up to 5 locations. I am currently working on the settings editor (accessible by clicking on the tiny weather icon next to the "Last update" status on the main page) but I have enough working that multiple locations can be loaded from the INI file and the default location (ie the one that is in view) can be changed.
Changes are not saved when the program exits - that is the code I am currently working on. Any feedback is welcome - I took the comments made on other weather applications and used those as functional requirements. Update: Location & Settings completed, uploading v.17 on 1st post Last edited by digitaldon37 : 11-14-2008 at 02:04 AM. |
|
|||
|
I have a bug that I haven't been able to track down yet. When clicking on the "Close" button on the configuration screen, the application updates global variables for location id, theme, timeouts, etc and then updates the INI file.
The problem is that (3) variables (for theme, http, refresh) are updated with no values. I am using the form controls values to update the global variables, so I am at a lost why some work and some don't. As a temporary solution, I added a code check to see if the form controls are empty and then update the global variable only if there is a value, but this isn't the best solution since some of those controls get updated. I've uploaded the latest code (v.19) on the 1st post if anyone can help. |
|
||||
|
Looks like a great program
![]() How can I get to the configuration page?
__________________
Basic4ppc reference list |
|
|||
|
Quote:
You get to the configuration screen by pressing the tiny weather icon near the status message on the main page. |
|
|||
|
(cross posted at xda-developers.com)
Version .20 has been uploaded to the main post. 1. Portrait/Landscape mode (repaint screen when switching between two) 2. Finger-swipe down opens configuration screen (the tiny weather icon is still there until this is fully tested) 3. Button and misc. messaging changes (per suggestions) 4. Cache (if available) is loaded on application start-up - updates can be done manually or configured every X minutes 5. Location cache are deleted if the location/zip code is deleted 6. RetrieveRSS functions (remote/local) rewritten Next to do: apply theme settings (theme.ini) |
|
||||
|
Weather.jpg should be located under gfx folder instead of the root folder.
Code:
' application image buttons
If FileExist(AppPath & "\gfx\weather.jpg") Then
imgHotKey.Image=AppPath & "\gfx\weather.jpg"
End If
__________________
Basic4ppc reference list |
|
||||
|
You are only updating the three variables when the user presses on rbtnSettings.
If the user just opens the settings page and closes it these three variables will not be updated. Here is a possible solution: Code:
Sub editLocations
rbtnLocations.Checked=True
pnlLocations.Enabled=True
pnlLocations.Visible=True
pnlSettings.Enabled=False
pnlSettings.Visible=False
lblDefault.Visible=True
lblLocationDescription.Visible=True
lblDelete.Visible=True
Select CurrentLocationCode
Case Location(0)
rbtnLocation1.Checked=True
Case Location(1)
rbtnLocation2.Checked=True
Case Location(2)
rbtnLocation3.Checked=True
Case Location(3)
rbtnLocation4.Checked=True
Case Location(4)
rbtnLocation5.Checked=True
End Select
form3.show
End Sub
Sub editSettings
rbtnSettings.Checked=True
pnlSettings.Enabled=True
pnlSettings.Visible=True
pnlLocations.Enabled=False
pnlLocations.Visible=False
lblDefault.Visible=False
lblLocationDescription.Visible=False
lblDelete.Visible=False
Select ini.mainWeatherUnits
Case "c"
rbtnCelcius.Checked=True
Case "f"
rbtnFarenheit.Checked=True
End Select
form3.Show
End Sub
Sub updateSettings
txtThemeSetting.Text=INI.themeDir
txtHttpSetting.Text=INI.httpTimeout
txtRefreshSetting.Text=INI.refreshInterval
txtLocation1.Text=Location(0)
txtlocation2.Text=Location(1)
txtLocation3.Text=Location(2)
txtLocation4.Text=Location(3)
txtLocation5.Text=Location(4)
End Sub
Sub Form3_Show
updateSettings
End Sub
That way the images will be merged in the executable.
__________________
Basic4ppc reference list |
|
|||
|
Thanks Erel for looking through the code and for the suggestion. I am going to make those changes and test it out.
I didn't want to merge the images into the executable because I want to give users (of the compiled version) to be able to use different sets of weather images - part of how themes will be implemented. The customer service and community forums are reasons why B4PPC is such a great product! |
![]() |
LinkBacks (?)
LinkBack to this Thread: http://www.basic4ppc.com/forum/open-source-projects/3323-pocket-weather.html
|
||||
| Posted By | For | Type | Date | |
| 1800 PocketPC - Pocket Pc Freeware and Windows Mobile 6 Software - Part 2 | This thread | Refback | 11-24-2008 11:40 AM | |
| Pocket Forecast [v.25] (formerly Pocket Weather) - xda-developers | This thread | Refback | 11-17-2008 10:17 PM | |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Another Pocket Wiki | digitaldon37 | Open Source Projects | 4 | 12-30-2009 02:12 AM |
| Personal Pocket PC Wiki | tsteward | Open Source Projects | 133 | 02-24-2009 10:01 AM |
| Pocket Burning Sand | neilnapier | Questions & Help Needed | 2 | 11-05-2007 07:53 PM |
| print class for pocket pc | tanrikuluahmet | Basic4ppc Wishlist | 1 | 10-01-2007 09:10 AM |
| Weather web service using HTTP | lost2 | Share Your Creations | 3 | 06-10-2007 02:40 PM |