Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Basic4ppc Wishlist > Bug Reports
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Bug Reports Post about errors or bugs encountered.

Problem with "Task.StartDate" in Outlook.dll

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2008, 09:04 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Exclamation Problem with "Task.StartDate" in Outlook.dll

I wanted to use the Outlook-function "Task", but there might be a bug in the Outlook.dll.

The first problem is to use "Task.StartDate".

If I use the sample-code from the help-file:
Code:
Task.StartDate = DateParse("09/13/2008") + (TimeParse("08:00"Mod cTicksPerDay)
the following message is shown:
Quote:
"... Es kann keine Fehlermeldung angezeigt werden, da die optionale Ressource der Assembly, die die Fehlermeldung enthält, nicht gefunden wurde. Continue?"
I tried also:
Code:
Task.StartDate = DateParse("09/13/2008")
with the same message ...
Because of the Error-Messages I made some more experiments with the code, but nothing worked.

If I use this:
Code:
Task.StartDate = ("13.09.2008")
... this:
Code:
Task.StartDate = (Date(Now))
... this:
Code:
Task.StartDate = Date(Now)
... or I use this:
Code:
Task.StartDate = "13.09.2008"
The following message is shown:
Quote:
"... Fehlermeldung:
Error description:
FormatException
Continue?"
The next problem is to use the "Reminder-function" As specci48 has written to you yesterday (it is always at 08:00).

All the time I thought it was my fault in programming, but now I think there must be a bug somewhere.

But in the whole time I liked your Basic4PPC more and more, it is a great software and worth every cent!
... and the forum is also very very good!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #2 (permalink)  
Old 09-12-2008, 10:37 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Code:
Task.StartDate = "13.09.2008"
Have you reset DateFormat to the European format "dd/mm/yyyy"? With the default USA format of "mm/dd/yyyy" 13 is a month and so is invalid. That is a different error to your original one, which is displaying a default error message as you don't have the complete error message set installed.

EDIT:- To see the actual message you need the German error message resource. The last post here http://www.basic4ppc.com/forum/quest...es-device.html might be what you need but I am not sure, it's for WM5.0 and WM6.0.

Last edited by agraham : 09-12-2008 at 11:02 AM.
Reply With Quote
  #3 (permalink)  
Old 09-12-2008, 01:54 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Arrow

Quote:
Originally Posted by agraham View Post
Code:
Task.StartDate = "13.09.2008"
Have you reset DateFormat to the European format "dd/mm/yyyy"?
Hello agraham,

thank you for your help.

I know the rules about the DateFormat in Europe (is written: "dd.mm.yyyy"), and I think this is not the reason for the error-messages, because I tried all formats (although the english/american ones).

I will check out you link to the error-messages on the device, maybe it helps me for better understanding, what the error-message means.

THANKS
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #4 (permalink)  
Old 09-14-2008, 09:51 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Please try:
Code:
Task.StartDate = now
Date(now) returns a string while StartDate expects a number (number of ticks).
Did you install the error-messages cab?
Reply With Quote
  #5 (permalink)  
Old 09-19-2008, 07:12 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Arrow

Hi Erel,

thank you for helping me.
Code:
 Task.StartDate = now
That´s a solution for the moment, but what can be done if you need a StartDate for "tomorrow" or in 3 weeks?

Is there another solution?
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #6 (permalink)  
Old 09-19-2008, 09:55 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

This code should work:
Code:
Sub App_Start
    task1.New1
    task1.CreateNew
    Task1.StartDate = DateParse(
"09/20/2008"
    
Msgbox("Date: " & Date(task1.StartDate))
End Sub
There is a mistake in the example from the manual.
StartDate and DueDate resolution is whole days only. You can't change the time.

Last edited by Erel : 09-19-2008 at 11:42 AM. Reason: Typo error: You can't change the time.
Reply With Quote
  #7 (permalink)  
Old 09-19-2008, 11:32 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Arrow

Hi Erel,

I´m sorry, but the code isn´t working proper.

First I have changed the date format into "20.09.2008" (Europe). It works.

If I use your code above, there are some Problems for the User on the Pocket-PC:

1) You wrote: "You can change the time."
But I can change it only in the code, but a User can´t change it on the Pocket-PC.

2) Another problem is, when today (DueDate) is the 09/19/2008 (19.09.2008) and the StartDate is the 09/20/2008 (20.09.2008) = in the future, an error-message is shown:
Quote:
An Error occurred ... PimCol.AddItem(Task.Value)
Error description:
Native method call failed.
Continue?
There should be a possibility for the user to put in the StartDate and the DueDate, also to set an Alarm. (This would be the best solution)

The "DueDate" function is working correct.

Now I made this:
Code:
Task.StartDate = DateParse(""&BeginnDatum.Text&"") + (TimeParse(""&BeginnUhrzeit.Text&""Mod cTicksPerDay)
... and the "StartDate" function is also working! (the Date- and Time-Fields must be TextBoxes, although it is not working!)

So, only the "Alarm"-function is needed.

Question to case 2) How can I avoid the error-message an show instead a messagebox like that: "Your Due-Date is set before the Start-Date. Please correct that ..."

Thanks in advance!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #8 (permalink)  
Old 09-19-2008, 11:38 AM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

P.S.:
Quote:
Originally Posted by Erel View Post
Did you install the error-messages cab?
I did, but there is no other message as before.

Do I had to reset the PPC after installing the CAB-File?
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
  #9 (permalink)  
Old 09-19-2008, 11:44 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

There was a typo in my previous post. You can't change the time.
You can use ErrorLabel to to catch the error.
Reply With Quote
  #10 (permalink)  
Old 09-19-2008, 03:19 PM
Basic4ppc Veteran
 
Join Date: Jul 2008
Location: Schwäbisch Gmünd
Posts: 353
Default

Quote:
Originally Posted by Erel View Post
You can use ErrorLabel to to catch the error.
Thank you Erel.
It works!
__________________
JOTHA | Greetz from the Schwabenländle.
Pocket-PC: HTC HD2 (Dual-Boot WindowsMobile 6.51 + Android 2.2 Froyo)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SetUpBuilder Problem - "Build Cabs first" dhillinmkewi Questions (Windows Mobile) 4 11-29-2008 11:57 PM
"AddEvent" and "buttonUp/buttonDown" Byak@ Questions (Windows Mobile) 12 09-10-2008 04:04 PM
TabControl "addControl" problem. burd27 Questions (Windows Mobile) 4 04-20-2008 09:42 AM
Problem with Serial. ("before loop" error) jesb4ppc Questions (Windows Mobile) 3 02-15-2008 06:41 PM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 03:59 AM


All times are GMT. The time now is 02:57 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0