[Bond-users] Couple questions

Dru andru at treshna.com
Tue Aug 14 18:17:58 EDT 2007


Davor Ocelic wrote:
> On Tue, Aug 14, 2007 at 12:08:25PM +1200, Dru wrote:
>> Davor Ocelic wrote:
>>> On Mon, Aug 13, 2007 at 10:20:23AM +1200, Dru wrote:
>>>> I always just align to the left to match gnome specifications.
>>> Oh, good to know. Well, in fact, my situation is this: I want to
>>> visually create something like this:
>>>
>>>  A:    _____
>>>    AA: _____
>>>    AB: _____
>>>    AC: _____
>>>
>>> So right-align would be useful. But I could also use left-align
>>> if I changed color or font to somehow make it obvious that AA, AB
>>> and AC are subelements of A.
>> Have you coded in GTK before? The functions in C are pretty 
>> straightforward in uigeneral.c for labels. So if you know the GTK 
>> commands to run on the widget it would be very easy to do this. I can 
>> help, I just not sure how in GTK you modify colours and layout.
> 
> I'll get around to coding this in, even though the schedule will permit
> it only in September.
> 
> If I get some time to work on bond, it will be updating the glade2bond
> xsl to support glade3. I found it much, much easier to write non-trivial
> forms with glade.

Considently I was finding the same thing with glade3, and played around 
a bit with it last night.
Conversion with xsl still kinda works with glade3, but it needs some 
changes. It needs to not include the name on every widget, and boxes 
cells lose their cell positions.  Still finding it slightly faster doing 
the form myself with vi editor and a good keyboard if i know exactly 
what i am doing. But yes glade3 is a big difference in usability and
will be faster to code in for forms your not certain on layout.

> 
> Also, one offtopic question, how is the login.xml file from bond
> trunk supposed to be used? Can you really display this window and
> have user type in username/password to connect to postgres? I 
> thought this information was embedded in the .conf file and you couldn't
> change it before connection.

User interface is initialised first, then the database.
It use to work, I haven't tested it in a year so theres always the 
chance it could of broken somewhere along the line.  But it is all 
written, and should work.

set this in config file
db_login_xml=login.xml
bond will look at pgusername/pgpassword etc and use them to connect 
instead of the config values.

You can then modify the editable or visibility of widgets with the 
security flag, so you can turn of parts of the app to certain postgresql 
roles/groups (also has not been tested in a while)


>>>>> 3) Could bonddb quote field names? I have a table whose column
>>>>>    names are pure numbers (like 208, 214, 301).
>>>> I just changed for updates. does it need it for inserts also?
>>>>
>>>> You need to checkout new version of bonddb from subversion for the fix.
> 
> Sure. I have tested it and it works great.
> 
>>> I think in inserts you never explicitly name fields, right? You just say
>>> insert into TABLE values (v1,v2,v3...)? In that case nothing has to be
>>> done for inserts.
>> I believe I explicity name them because the order of fields can be 
>> different if we use bondreplicate and have two different databases, so 
>> it explicitiy adds field name nw. I can change that to.
> 
> Yes, you are right. I tried adding a new record, and here's what
> happened:
> 
> <bonddb/bonddbwrite.c:593 bonddb_write_execsql();> Exec :
> INSERT INTO po (268,269,291,303,318,401,203,204,205,208) VALUES ('165','1415','17','10','123','44','12','12','12','12')
> Error bonddb/bonddbwrite.c: 615: bonddb_write_execsql(): SQL Failed with ERROR:  syntax error at or near "268"
> LINE 1: INSERT INTO po (268,269,291,303,318,401,203,20...
>                                       ^
> On: INSERT INTO po (268,269,291,303,318,401,203,204,205,208) VALUES ('165','1415','17','10','123','44','12','12','12','12')
> <bonddb/bonddbwrite.c:93 bonddb_write_freelist_special();> Dealing with special case where a mark fails to save and needs to creativly free. SELECT * FROM po
> 
> If you do the same fix like for updates, I'll just test it to make 
> sure it works.

Change made .

> 
> Thanks,
> -doc
> 
> _______________________________________________
> Bond-users mailing list
> Bond-users at hcoop.net
> http://hcoop.net/cgi-bin/mailman/listinfo/bond-users


-- 
Andrew Hill
treshna Enterprises Ltd
Tel: 03 366 3649
Cel: 021 660 819
Web: www.treshna.com
IT Consultancy - Websites - Database development - Computer tech support




More information about the Bond-users mailing list