[V4RB] 3 simple [?] questions

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Feb 26 09:19:06 CST 2003


on 2/26/03 8:02 AM, Pedro fp at lists at pedro.net.au wrote:

Hi Pedro,

> Three questions that I suspect are all rather simple matters but I
> haven't found answered in the Valentina docs.
> 
> 1. Closing vCursor ... With READdb I found that it is absolutely
> crucial that RecordSets be explicitly closed when finished with. I
> started porting my project planning to follow similar practice with
> Valentina but haven't found any way to explicitly close a vCursor. Is
> it necessary? If so how is it done? With cur = nil?

IF your cursor is local variable of some function, then it will die self on
function exit. 

If function is big, and you create several cursors inside of it, then you
can wish explicitly kill some cursors when they not needed.

Yes to kill cursor you need do curs = nil

If you store cursor as property of a window, for example, then you MUST kill
it self.


> 2. Dates. I'd like to display dates as a REALbasic ShortDate because
> that formats the date according to the users system preferences.
> Currently I'm doing that with the following ...
> 
>  d = new date
>  d.year = data.DateField( "dateAdded" ).year
>  d.month = data.DateField( "dateAdded" ).month
>  d.day = data.DateField( "dateAdded" ).day
>  efDateAdded.text = d.shortDate
> 
> Can anyone suggest a more concise approach?

1) I need add support of Date into V4RB

2) you can make small function to isolate this code

> 3. I have a listbox that will used display at 4 different sets of
> fields. I'd like, if possible, to populate it with a generic block of
> code rather than a block for each set of fields. Am I correct in
> believing that ...
> 
>  cur.field( indexOrName ).getString
> 
> will return the field contents as a string for all or most field types?

Yes!

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list