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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 - Gadget Documentation Request

Gadget Documentation Request

Discuss OrbForms Designer and PocketC Architect

Postby tonyhunterajh on Fri Mar 03, 2006 10:48 pm

The ability to create custom controls is one of the most powerful features of PCA. I would like to see more indepth documentation on how to really create and use gadgets. For example, examples that begin with creating and using a simple control like a label and possibly end with examples of more complex controls.

I want to write a datagrid gadget but I dont know really where to begin. I know C/C++ but my primary development has been with Visual Basic and Web Development tools like PHP, etc. So I dont have all the C skills right now to just jump in and create the sort of complex gadgets I want to. I can figure it out, but that takes time. I would rather have some detailed documentation to help me along.

Just my thoughts!

Tony
tonyhunterajh
 
Posts: 29
Joined: Sat Feb 11, 2006 12:28 pm
Location: USA

Postby sangahm on Thu Mar 09, 2006 1:25 am

That's what I'm looking for too (gadget documentation and a table grid gadget).

I'm new to Designer and relatively new to programming, so it may be beyond my skills.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby sangahm on Sun Mar 12, 2006 2:03 pm

<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>
<br />That's what I'm looking for too (gadget documentation and a table grid gadget).

I'm new to Designer and relatively new to programming, so it may be beyond my skills.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Hmm, based on the response this is discouraging.

I am trying to decide between OD and PDA Toolbox for my developing needs, and support and question responses play a big part of my decision since I am starting new (not a complete novice with programming but very limited experience, mostly as a hobby).

-S
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby tonyhunterajh on Sun Mar 12, 2006 6:30 pm

<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>
<br /><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>
<br />That's what I'm looking for too (gadget documentation and a table grid gadget).

I'm new to Designer and relatively new to programming, so it may be beyond my skills.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Hmm, based on the response this is discouraging.

I am trying to decide between OD and PDA Toolbox for my developing needs, and support and question responses play a big part of my decision since I am starting new (not a complete novice with programming but very limited experience, mostly as a hobby).

-S
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I own PDA Toolbox too. I think it is a great too but they force you to buy the tool twice to get basic coding functionality. I bought the standard version for 25 bucks and discovered I could not create menus and perform extended calculations without paying another 50 bucks for the upgrade to the pro version - that sucks! At least with PocketC Architect I have full development capabilities without the need to buy additional libraries and extended functionality for simple stuff. When I want to create a very simple application, I use PDAT but when I want a fully robust app I uses PCA.

As to the response times on post and support issues, I must agree that it is very slow if at all! :(

Now, in defense of Orbworks, I think this is a very small (possibly one-man) shop; and in that case, he probably has a full-time job to work as well as get this product off the ground. Most of my questions I get fairly decent answers to from searching the forum. I do hope that in the future, support responsiveness improves; however, in the interim, I think that PCA and Orbworks is the best choice for me - especially for the money and what you get for the money.

Tony
tonyhunterajh
 
Posts: 29
Joined: Sat Feb 11, 2006 12:28 pm
Location: USA

Postby sangahm on Sun Mar 12, 2006 7:57 pm

Thanks for your response.

Yeah, I agree with the pricing model, however it looks to me that PDAT is more similar to Designer since both are more of a RAD environment than Architect (Please correct me if I'm wrong). In that case, pricing is very similar.

But based on your input, I am going to take a serious look at Architect, since I dismissed it since it seemed just like the old PocketC environment, which I own but is just to tedious to create menus, graphics on buttons, database management, table views, etc. Again, if I'm mistaken please let me know.

-S
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby nmc on Sun Mar 12, 2006 10:29 pm

Before you continue to critizise the support, take a llok at other threads in this forum.
Normaly, jeremy is very quick and compentent in his answers (as well as some other people reading this forum), but obviously he is kind of "offline" at the moment.

Maybe its your question that is not very motivating to answer ;-)
Earnest: at my start with orbforms, I found the docs for gadgets very clear and my first gadget was quickly working.
So maybe you should be a little more precise in what you want help for, i am sure your would get some helpfull answers then.

As a start on how to build gadgets, look in the sample folder, there is a project named "progressbar" which shows how to use the gadget concept.
nmc
 
Posts: 197
Joined: Tue May 27, 2003 8:42 pm
Location: Germany

Postby sangahm on Sun Mar 12, 2006 11:25 pm

OK, I'll wait and see how others respond in a few more days.

BTW, I have looked at all of the other forums for various ideas and how to do various types of programs.

And I did look at the progressbar gadget before I posted.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby tonyhunterajh on Sun Mar 12, 2006 11:45 pm

S,

It sounds like you probably do want to use OrbForms since it does have the GUI designer. For me, its not worth the upgrade (right now) since I have no problem at all building my gui interfaces manually. In my estimation, PCA is OrbForms without the gui builder; other than that, it is the same language and features.

PDAT on the other hand encapsulates even the database management behind forms very easily. In summary, both tools are great, but for me PCA gives me the low-level control I need to build some really quality apps. More coding is required with PCA but for me, that is what I want and need to build the apps on my agenda.

Tony
tonyhunterajh
 
Posts: 29
Joined: Sat Feb 11, 2006 12:28 pm
Location: USA

Postby sangahm on Mon Mar 13, 2006 12:01 am

Alright that is very interesting. The aspect of being able to get further into the details with PCA, and thus maybe have a longer "useful" life for me, is something that I was wondering.

Regarding the forum support, please don't misunderstand my intentions. It's not just the support from the orb person/people, but other participation on the boards to help less experienced developers like myself. It seems that there was more of this type of support on PDAT.

Like I mentioned previously, I own PocketC but it has sat on my (virtual) shelf, since much of the development seemed to be very complex. I even bought the Palm Programming book that featured PocketC, but all of the apps seemed very basic, not polished, and slow. I am looking a bit closer at PCA to see if it addresses these issues.

So, several follow on questions: what kind of database support is there or must I code it myself? What tools do you use for gui development (is that what RsrEdit is good for?

-S
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby tonyhunterajh on Mon Mar 13, 2006 12:02 am

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by nmc</i>
<br />...Maybe its your question that is not very motivating to answer ;-)
Earnest: at my start with orbforms, I found the docs for gadgets very clear and my first gadget was quickly working.
So maybe you should be a little more precise in what you want help for, i am sure your would get some helpfull answers then.

As a start on how to build gadgets, look in the sample folder, there is a project named "progressbar" which shows how to use the gadget concept.

<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

nmc,

Please don't take this in the wrong way, because I am in no way trying to be negative in attitude; but, any product that people pay money for should have prompt support. Even if the question is not very "motivating", the customer was motivated enough to spend money, so the seller should be motivated enough to be prompt and qualitative in their response. I have had some very prompt responses from Jeremy that I appreciate very much. I love this product and I look forward to its future. But there have been times when I wonder if anyone is out there.

Here is a suggestion, maybe Jeremy could recruit some sysops for the forum who would be responsible for monitoring the forums at different times. This way, most people who post will have very prompt responses. I am not guru-level at PCA yet so I don't think I would qualify; but, I am sure there are some out here who are extremely versed in the toolsets that Jeremy could use. Maybe you guys could be compensated with free upgrades for life or something! :) Anyway, this is just a suggestion.

Just my opinion with good intentions and no ill will.

Tony
tonyhunterajh
 
Posts: 29
Joined: Sat Feb 11, 2006 12:28 pm
Location: USA

Postby tonyhunterajh on Mon Mar 13, 2006 12:15 am

<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>
<br />...So, several follow on questions: what kind of database support is there or must I code it myself? What tools do you use for gui development (is that what RsrEdit is good for?

-S
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

S,

Yes, you have to code database support yourself. The basic response you will get from the forum on how to do it is to look at the "Survey" sample application. While it does show you "a way" to get db programming done, it does not really give you the 1-2-3's on how to do it step-by-step. Seeing something that works as an end result is not a substitute for documentation the guides you through the process and illustrates the not only the "how" but also the "why" of using the Orbworks products. Looking at the survey app, I was able to take in enough to get it done - but I am in the process of building a wrapper to encapsulate the functionality. When I get it done I will share it with everyone; but it is not a top priority right now because I have an app to finish in the short term.

I dont use a gui tool, I build my user interface elements manually using the x,y coordinates. Since the screen is only 160x160 it is not difficult for me to guestimate where things should be positioned and then tweak them accordingly. I have not used any tools so perhaps someone else can comment on that.

Tony
tonyhunterajh
 
Posts: 29
Joined: Sat Feb 11, 2006 12:28 pm
Location: USA

Postby mlambrigger on Mon Mar 13, 2006 6:54 am

If you want something generic to manage database, I have recently develop that:
Code: Select all
<font size="1"><font color="navy">struct Gen{
   bool create(void* val, string type);
   bool read(int index, string type, void* val);
   bool write(int index, string type, void* val);
   bool clear(int index, string type);
};


const string MondDBName = "MondialData";

bool Gen.create(void* val, string type){
   Database db;
   DBRecord rec, recType;
   string stringType, typeval;
   bool result = false;
   int index;
   
   if(db.open(MondDBName, false)){
      index = -1;
      if(db.newrec(&index, rec)){
         switch(type){
            case "N": typeval = typeof(MatchNote);
            case "M": typeval = typeof(Match);
            case "E": typeval = typeof(Equipe);
            case "S": typeval = typeof(Stade);
            case "G": typeval = typeof(Group);
            case "L": typeval = typeof(Language);
         }
         if(rec.write(val, typeval, 1)){
            result = true;
            db.getrec(0, recType, false);
            recType.read(&stringType, "s", 1);
            stringType += type;
            recType.write(&stringType, "s", 1);
            recType.close();
         }
         rec.close();
      }
      rec.close();
   }
   else{
      if(db.create(MondDBName, "Datas", app.creator, false)){
         index = -1;
         db.newrec(&index, recType);
         stringType = "";
         recType.write(&stringType, typeof(stringType), 1);
         rec.close();
         db.close();
         result = create(val, type);
      }
   }
}

bool scanstr(string str, string val, int* array){
// array must be a 256 values array
   int i, j = 0;
   
   array[0] = -1;
   for(i=0; i<strlen(str); i++){
      if(substr(str, i, 1) == val){
         array[j++] = i;
         array[j] = -1;
      }
   }
   while(j<256) array[j++] = -1;
   return (bool) array[0];
}

bool scanstrclear(string* str, string val, int index){
   int i, j = 0;
   string newstr;
   bool result = false;
   
   for(i=0; i<strlen(*str); i++){
      if(substr(*str, i, 1) == val){
         j++;
         if(j == index){
            newstr = substr(*str, 0, i) + strlower(val) + substr(*str, i+1, strlen(*str));
            *str = newstr;
            i = strlen(*str);
            result = true;
         }
      }
   }
   return result;
}

bool Gen.read(int index, string type, void* val){
   Database db;
   DBRecord rec, recType;
   string strType, typeval;
   int array[256];
   bool result = false;
   
   if(db.open(MondDBName, true)){
      db.getrec(0, recType, true);
      recType.read(&typeval, "s", 1);
      recType.close();
      // scan the string of type
      if(scanstr(typeval, type, array)){
         if(array[index] != -1){
            if(db.getrec(array[index], rec, true)){
               switch(type){
                  case "N": typeval = typeof(MatchNote);
                  case "M": typeval = typeof(Match);
                  case "E": typeval = typeof(Equipe);
                  case "S": typeval = typeof(Stade);
                  case "G": typeval = typeof(Group);
                  case "L": typeval = typeof(Language);               
               }
               if(rec.read(val, typeval, 1)) result = true;
               rec.close();
            }
         }
      }
      db.close();
   }
   return result;
}

bool Gen.write(int index, string type, void* val){
   Database db;
   DBRecord rec, recType;
   string strType, typeval;
   int array[256];
   bool result = false;
   
   if(db.open(MondDBName, false)){
      if(db.getrec(0, recType, true)){
         recType.read(&typeval, "s", 1);
         recType.close();
         if(array[index] != -1){
            if(db.getrec(array[index], rec, false)){
               switch(type){
                  case "N": typeval = typeof(MatchNote);
                  case "M": typeval = typeof(Match);
                  case "E": typeval = typeof(Equipe);
                  case "S": typeval = typeof(Stade);
                  case "G": typeval = typeof(Group);
                  case "L": typeval = typeof(Language);               
               }
               if(rec.write(val, typeval, 1)) result = true;
               rec.close();
            }
         }
      }
      db.close();
   }
   return result;
}

bool Gen.clear(int index, string type){
   Database db;
   DBRecord recType;
   string typeval;
   bool result = false;
   
   if(db.open(MondDBName, true)){
      if(db.getrec(0, recType, false)){
         if(recType.read(&typeval, "s", 1)){
            result = scanstrclear(&typeval, type, index);
            if(!recType.write(&typeval, "s", 1)) result = false;
         }
         recType.close();
      }
      db.close();
   }
   return result;
}</font id="navy">
</font id="size1">


In this model, there is only one DB, if you want to have some different, add the string DBName in the functions parameters.

For the gadget, see the progress bar sample in the Orbform install directory.

Hope that will help you

Marc Lambrigger
Marc Lambrigger
mlambrigger
 
Posts: 113
Joined: Fri Feb 13, 2004 11:07 am
Location: Switzerland

Postby sangahm on Mon Mar 13, 2006 7:39 am

Thanks mlambrigger. I appreciate that code sample. I need to study it a little more, but I think that it will get me going in the right direction.
sangahm
 
Posts: 118
Joined: Mon Jul 04, 2005 3:43 pm
Location: USA

Postby mlambrigger on Mon Mar 13, 2006 8:24 am

Some more infos on this sample:

It will store all infos in the same DB. The first record is a string in witch I store the different struct type. Next records are datas.

When you read, the index is based on the type. So we can read the 12th record of type "?". This record can be the 30th in the DB.

If you add the DBName as parameter of the functions, you can store differents structs in different DB and delete the type switch choice.

it is a bit dificult to understand all, I know.

You can change the switch by a typeof() function. But in this case, you must change read and others function. You must store the stringtype of the data in the first record of the DB and add a token system as a special char.

Hope that will help you to do what you want.


Marc Lambrigger
Marc Lambrigger
mlambrigger
 
Posts: 113
Joined: Fri Feb 13, 2004 11:07 am
Location: Switzerland

Postby fredoak on Tue Mar 28, 2006 1:42 pm

But back to the basic question that I thought was presented here.

How to create a data grid gadget?

And don't mention the progress bar gadget because the code and maintenance of the two are entirely different.

I've had Pocket C since 1998, developed apps both for personal and commercial use and posted code here to help others

I've had OrbForms since it first became available and helped others with database and mathmatical problems, but not for the lack of trying, I cannot get a datagrid gadget to work properly.

Here is all it would take to help, take a 5 field database that displays the first 3 fields in a datagrid, with an on click routine. Just show me some sample code and I would be good to go.

And just as a side note about PDATB, you have some real power users in that group that aren't afraid to share code, realize that the more samples on how to do things the better, and no question is to basic.
They have created help tools, help libraries, demo apps using every tool and library, even videos showing how to do things. They have done everything to help try keep the learning curve down. As much as I love OrbForms getting enven sample code has always been like pulling teeth here.
fredoak
 
Posts: 32
Joined: Tue May 14, 2002 10:54 am
Location: USA

Next

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests

cron