Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - add-ins: Taking object as a parameter

add-ins: Taking object as a parameter

Discuss OrbForms Designer and PocketC Architect

Postby Percival on Thu May 31, 2007 9:24 pm

I am having trouble with taking objects as a parameter. I want to do something like this:
Code: Select all
int addAppointment(string description, Date d, ....) { ... }

Native code:
Code: Select all
void addAppointment(OrbFormsInterface* ofi) { ... }

How can I access the fields in the Date object? Can anyone provide an example? The three sample add-ins that come with PocketC Architect haven't implemented something like this.

The documentation does mention objects as parameters, but 'm still puzzled.
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Note: If your function takes an object (or structure) as a parameter, this is converted to a pointer by the compiler. So, a function declared as "void box(Point top_left, Point bottom_right)" will be implemented as if it were "void box(Point* top_left, Point* bottom_right)".<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Thanks in advance.
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands

Postby Percival on Fri Jun 01, 2007 7:25 pm

Ok, I found out how to do it by myself...

I was working on a datebook add-in. Here are the results if anyone is still interested in this :-)
It adds a new appointment into the PalmOS Datebook app. With optional alarm.
http://www.cs.vu.nl/~tljchung/palm/DatebookAddIn.zip
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands

Postby sangahm on Fri Jun 01, 2007 9:22 pm

This looks good from my brief testing it out. I had to set up the form since I couldn't read in the Architect ocp file, but it worked fine.

Some requests to make it more functional:
- Can there be another option besides start/end times? It would be nice to have an All Day event.
- Add the Private flag
- Add the ability to choose a Repeat feature
- Set a category
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby sangahm on Fri Jun 01, 2007 11:13 pm

Actually, upon further testing, the alarm looks like it gets set but it really doesn't. In the simulator, I set an alarm directly in Datebook and another using the Orb code using your DatebookAddIn. The alarm never went off for the one put in by the Orb code.

Upon further troubleshooting, using the program FlashInfo, only the alarms set directly in Datebook are in the alarm list not the ones put in by the Orb application. I also used Palm Insider Pro to view the alarms and got similar results.

One other interesting thing is that the appointments and alarms put in by the Orb code show up with red lines in Datebook (the lines that show the appointment time start and end).

Perhaps, as mentioned elsewhere on this forum, there needs to be a sort of the alarms when placed in the alarm list in order for it to be correct.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby Percival on Sat Jun 02, 2007 3:13 am

Hmm I didn't test it out good enough myself. Sorry about that.
I will try to fix those problems.

By the way, why couldn't you read from the architect file?
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands

Postby sangahm on Sat Jun 02, 2007 8:44 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Percival</i>
<br />
By the way, why couldn't you read from the architect file?
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I think you can read in Designer .orb project files directly into Architect, but not the other way around. Since Designer must work with specific format, numbering, and placement in the file, you can't even manually tweak things yourself in the file. Thus reading an Architect .ocp file would not work since it's manually created.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby Percival on Sun Jun 03, 2007 10:55 pm

Updated the Datebook add-in.
The changes:
-Fixed the alarms, but still need to thoroughly test it
-Added repeat
-Added private/secret appointments
Minor change:
-Example usage at the end of the .oc file
Todo:
-repeat exceptions

It can be downloaded here:
http://www.cs.vu.nl/~tljchung/palm/DatebookAddIn_11.zip

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by sangahm</i>
- Can there be another option besides start/end times? It would be nice to have an All Day event.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Datebook handles this by looking at the preferences to see what the start and end times are in the day view. There is no all-day option in the appointment struct (see ApptDBRecordType in the datebook source).
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by sangahm</i>
- Set a category
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Datebook doesn't even use categories :?:
It shouldn't be hard to implement though. I will add this after the repeat exceptions are done.
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands

Postby sangahm on Mon Jun 04, 2007 12:49 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Datebook handles this by looking at the preferences to see what the start and end times are in the day view. There is no all-day option in the appointment struct (see ApptDBRecordType in the datebook source).<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Perhaps I should have said "No time", which shows at the top of the Calendar as a no time, or all day event.

Anyway, this version seems to work much better. And thanks for adding the suggested options. I'm gonna play around with this some more, but so far it looks great!
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby Percival on Mon Jun 04, 2007 9:44 am

There is already a "no time" function ;)
Just set the bool noTime parameter to true.
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands

Postby sangahm on Mon Jun 04, 2007 5:21 pm

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Percival</i>
<br />There is already a "no time" function ;)
Just set the bool noTime parameter to true.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Ah, yes, now I see it. Fantastic!
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby Percival on Mon Jun 04, 2007 5:40 pm

Another update.
Now you can specify on which days a repeated appointment should not appear.

http://www.cs.vu.nl/~tljchung/palm/DatebookAddIn_12.zip
Percival
 
Posts: 45
Joined: Sat Jul 19, 2003 10:31 am
Location: Netherlands


Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests

cron