Register to post in forums, or Log in to your existing account
 

This forum is locked: you cannot post, reply to, or edit topics.  This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Fri Jul 08, 2005 2:55 am   

Need Help
 
Zugg,

Could you please answer a few questions for me? When I run the following code all TEXT fields (using SQLite) say "[MEMO]" when I click in them to edit the values. How can I fix this so the text can be edited? How can I left align the text for numeric values? Also, I notice that when I change the theme the checkboxes background becomes black. Also, how can I get the background behind the edit fields to change with the themes (I tried using a panel, as you'll see, but that doesn't help. EDITED TO ADD: I notice it changes for some themes but the navigator doesn't all the times either. In fact, play around with changing the themes from the menu and theme selection dialog. You will notice inconsistencies and sometimes the navigator icons disappear.) Also, is there any way to set it so the user can press the tab key to move from cell to cell in the grid?

Here's the ZML code (I took out some unnecessary stuff):

Code:

<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE zapp [
  <!ENTITY AppTitle "zModel Inventory">
  <!ENTITY AppAuthor "Steven C Picard">
  <!ENTITY AppVersion "1.0">
  <!ENTITY AppURL "http://">
  <!ENTITY AppImage "ZAPP">
  <!ENTITY AboutBox SYSTEM "aboutbox.xml">
  ]>
<zapp>
  <splash color='#C4D2ED'>
    <image image='zapp' deltaleft='8' deltatop='8'/>
    <label align='Client' bevelouter='Lowered' autoleft='true' deltaleft='8' width='-8' height='-8' gradienttype='FullVertical' color='#C4D2ED' colorto='#7E98CB'><![CDATA[<b>&AppTitle;</b><br><br>
Version &AppVersion;<br><br>
by &AppAuthor;]]></label>
  </splash>
  <toolbar name='mainmenu'>
    <menu caption='&amp;File'>
      <item action='_FileExit'/>
    </menu> 
    <menu caption='&amp;View'>
      <item caption='Normal' script='core.themeindex = -1'/>
      <item caption='Aqua' script='core.theme = "aqua"'/>
      <item caption='Watercolor' script='core.themeindex = 2'/>
      <item caption='Flat' script='core.theme = "Flat"'/>
      <item caption='Standard' script='core.theme = "Standard"'/>
      <item caption='UltraFlat' script='core.theme = "UltraFlat"'/>
      <item caption='Office11' script='core.theme = "Office11"'/>
      <item caption='OfficeXP' script='core.theme = "OfficeXP"'/>
      <item action='_ThemeSelect'/>
    </menu>
    <menu caption='&amp;Help'>
      <item caption='&amp;About' script='core.execwindow( "About")'/>
    </menu>
  </toolbar>
  <toolbar name='maintoolbar'>
    <navigator/>
  </toolbar>
  <window name='main' caption='&AppTitle;' width="640" height="480">   
    <connection name='DBConn' filename='models.db'>
       <script event='OnCreate'>
       CREATE TABLE models (
         model_id INTEGER PRIMARY KEY,
         Number TEXT,
         Origin TEXT,
         Year INT,
         Description TEXT,
         Scale TEXT,
         Quantity INT,
         Kit_Number TEXT,
         Notes TEXT,
         Price INT,
         Shipping INT,
         Tax INT,
         Article_Body TEXT,
         Purchased BOOL
         );
        </script>
      <query name='DBQuery' text='SELECT * FROM models'>
        <datasource name='DBSource'/>
      </query>
    </connection>
    <dock position='top'>
      <toolbar name='mainmenu'/>
      <toolbar name='maintoolbar'/>
    </dock>   
    <PANEL fullheight='true' fullwidth='true'>
    <edit caption='Number:' field='Number' autotop='true' deltatop='2' deltaleft='80' width='-30'/>
    <edit caption='Origin:' field='Origin' autotop='true' deltatop='2'/>
    <edit caption='Year:' field='Year'  autotop='true' deltatop='2'/>
    <edit caption='Description:' field='Description' autotop='true' deltatop='2'/>
    <edit caption='Scale:' field='Scale' autotop='true' deltatop='2'/>
    <checkbox caption='Purchased:' field='Purchased' autotop='true' deltatop='2'/>
   <grid deltatop='10' fullheight='true' autotop='true' name='DBGrid' datasource='DBSource' left='0' width='680' fullwidth='true'/>
   </PANEL>
    <script>
        DBSource.Active = false
        DBQuery.Text = "SELECT * FROM models"
        DBSource.Active = true       
    </script>
    </window>
    &AboutBox;
</zapp>


Thanks! (Now that I've loaded you down with questions! Very Happy )
Reply with quote
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Sat Jul 09, 2005 4:20 pm   
 
Okay, if I use "CHAR" instead of "TEXT" for the datatypes then the binding works.


Last edited by theNerd on Sat Jul 09, 2005 4:47 pm; edited 2 times in total
Reply with quote
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Sat Jul 09, 2005 4:22 pm   
 
I would also like to apologize for my jumble of questions. I should of given each a line with a number. Embarassed
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 09, 2005 4:55 pm   
 
To override the defaults for the columns in a grid, you need to use the COLUMN tag and then set the Editor property to what you want. In this case, to set up a multiline memo editor you'd set the Editor property to "Memo" for the text columns.

Changing from Text to Char has limits with some databases. Text is the proper type when you want an unlimited length text field (like the body of a email message, for example). Char only will give you the default single-line text editor in a grid.

The Edit fields *should* be changing with the theme. At least it does here. It will only change if the theme has an editor color defined, and some themes don't. My usual test theme for this is the OddWood theme since it completely changes all of the colors, including the edit color.

For your other questions you'll need to number them and give me details on reproducing them. I'm afraid your post (as you said) was too much of a jumble to really follow.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 09, 2005 4:58 pm   
 
As far as tabbing between cells, I'm not sure. I'll have to look at the DevExpress stuff to see how to turn on that option. But I'm on my laptop today and not at my development system. You might want to send me an email on this request so I don't forget since I probably won't have time to do much about it until after the conference this week.
Reply with quote
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Sat Jul 09, 2005 5:26 pm   
 
Zugg,

1) If I have the database fields set to "TEXT" rather than "CHAR" and then click in an EDIT object (I'm not talking about in the grid I am talking about the edit text boxes) it says "[MEMO]" and doesn't let me change anything. What do I do for this?

2) Also, another thing of importance is the checkbox. When I change the theme the background goes black (try it by selecting one of the theme menu items.)

3) Switching themes sometimes causes the navigation bar icons to disappear.

I wanted to give the guy his application tomorrow so he can start entering data into his database. That way I can worry about reports, etc. later but at least he'll have something to start with. I am excited at how easy zApp has made this. Your design decisions have been very logical.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 09, 2005 5:38 pm   
 
2) Sounds like a bug. I hope to have the bug database set up on the web site in a couple of days. I need to wait for the hosting company server move to be completed.

3) Also sounds like a bug.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 09, 2005 5:38 pm   
 
1) A "Text" field (or "Memo" field) is a large multi-line database field. You need to use a MEMO component to edit this. The EDIT component can only edit the single-line "Char" field type. So, yes, either change your database field to CHAR or use a MEMO component to edit it.

(1) is more of a design decision on your part. You need to decide which fields are large, multiline fields (TEXT type) and which are just normal single line fields (CHAR type).
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Jul 09, 2005 5:39 pm   
 
Unfortunately, I'm not going to be able to release any new version of zApp until after the conference, so you'll have to live with these bugs for a couple of weeks. You might just want to remove the theme switching for now if he just needs to start entering data.
Reply with quote
theNerd
Adept


Joined: 01 Mar 2005
Posts: 277

PostPosted: Sat Jul 09, 2005 5:46 pm   
 
Thanks for the answers. I'll just remove the theme support (for now.)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jul 12, 2005 6:43 pm   
 
OK, the bug tracking system is up and running. Go ahead and submit (2) and (3) into the bug system (make a separate report for each bug). Go to the Support menu at the top of the page, then select Bug Reports, then select zApp Bug Report.
Reply with quote
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Home » Forums » General zApp Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2009 Zugg Software. Hosted on Wolfpaw.net